Skip to content

Commit

Permalink
packages.perlNetInterface: patch grepping for library headers
Browse files Browse the repository at this point in the history
The make file has a check to grep for the AF_INET symbol in
/usr/include/sys. Patching this out so that it builds. Not certain if
this will cause runtime failures.
  • Loading branch information
djacu committed Dec 4, 2024
1 parent bfc6d19 commit 3179981
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -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/} (<F>)) {
- 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);
20 changes: 4 additions & 16 deletions nix/packages/perl-net-interface/package.nix
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 3179981

Please sign in to comment.