diff --git a/nix/packages/perl-net-interface/net-interface-remove-grep-af-inet.patch b/nix/packages/perl-net-interface/net-interface-remove-grep-af-inet.patch new file mode 100644 index 00000000..eb742ded --- /dev/null +++ b/nix/packages/perl-net-interface/net-interface-remove-grep-af-inet.patch @@ -0,0 +1,16 @@ +diff --git a/Makefile.PL b/Makefile.PL +index 973e65e..6ad0d51 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -176,11 +176,6 @@ unless (open(F,'./netsymbolC.inc')) { + exit; + } + +-unless (scalar grep {/# define\s+_NI_AF_INET/} ()) { +- close F; +- die "AF_INET not found in netsymbolsC.inc,\nprerequisite development library header files missing from /usr/include/sys\n"; +- exit 0; +-} + close F; + + WriteMakefile(%makeparms); diff --git a/nix/packages/perl-net-interface/package.nix b/nix/packages/perl-net-interface/package.nix index 382615de..eaf3d27a 100644 --- a/nix/packages/perl-net-interface/package.nix +++ b/nix/packages/perl-net-interface/package.nix @@ -1,29 +1,17 @@ { perlPackages, fetchurl, - linuxHeaders, - which }: - perlPackages.buildPerlPackage { pname = "NetInterface"; version = "1.016"; - buildInputs = [ linuxHeaders which ]; - doCheck = false; - - CPPFLAGS="-Iusr/include"; - - postPatch = '' - mkdir -p usr/include/sys/ - cp -pr ${linuxHeaders}/include usr/ - ln -s ${linuxHeaders}/include/linux/socket.h usr/include/sys/socket.h - ls -lahR usr/ - echo "aaaaaaaa" - echo $CPPFLAGS - ''; src = fetchurl { url = "mirror://cpan/authors/id/M/MI/MIKER/Net-Interface-1.016.tar.gz"; hash = "sha256-e+RGk14BPQ7dPTcfkvuQo7s4q+mVYoidgXiVMSnlNQg="; }; + + patches = [ ./net-interface-remove-grep-af-inet.patch ]; + + doCheck = false; }