-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
packages.perlNetInterface: patch grepping for library headers
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
Showing
2 changed files
with
20 additions
and
16 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
nix/packages/perl-net-interface/net-interface-remove-grep-af-inet.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |