summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorJames Cook <jcook@cs.berkeley.edu>2016-07-05 00:54:53 +0000
committerGitHub <noreply@github.com>2016-07-05 00:54:53 +0000
commit96ec2b6c66d31f45d308c2be68f2b1a2bb41cfd5 (patch)
treeb9c1221ff472798cca6136c182a92ffea8c73e2a /pkgs/applications
parentc6a641eb07b77778fe780ce465d0e3461420c0a5 (diff)
parentaf074c0972861f8db07aa200f476c790dc862b32 (diff)
downloadnixlib-96ec2b6c66d31f45d308c2be68f2b1a2bb41cfd5.tar
nixlib-96ec2b6c66d31f45d308c2be68f2b1a2bb41cfd5.tar.gz
nixlib-96ec2b6c66d31f45d308c2be68f2b1a2bb41cfd5.tar.bz2
nixlib-96ec2b6c66d31f45d308c2be68f2b1a2bb41cfd5.tar.lz
nixlib-96ec2b6c66d31f45d308c2be68f2b1a2bb41cfd5.tar.xz
nixlib-96ec2b6c66d31f45d308c2be68f2b1a2bb41cfd5.tar.zst
nixlib-96ec2b6c66d31f45d308c2be68f2b1a2bb41cfd5.zip
Merge pull request #16714 from vrthra/gnunet
gnunet: Fix build
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/networking/p2p/gnunet/default.nix28
1 files changed, 12 insertions, 16 deletions
diff --git a/pkgs/applications/networking/p2p/gnunet/default.nix b/pkgs/applications/networking/p2p/gnunet/default.nix
index 54e042f17b9a..54c232674bf6 100644
--- a/pkgs/applications/networking/p2p/gnunet/default.nix
+++ b/pkgs/applications/networking/p2p/gnunet/default.nix
@@ -20,25 +20,21 @@ stdenv.mkDerivation rec {
     # Brute force: since nix-worker chroots don't provide
     # /etc/{resolv.conf,hosts}, replace all references to `localhost'
     # by their IPv4 equivalent.
-    for i in $(find . \( -name \*.c -or -name \*.conf \) \
-                    -exec grep -l '\<localhost\>' {} \;)
-    do
-      echo "$i: substituting \`127.0.0.1' to \`localhost'..."
-      sed -i "$i" -e's/\<localhost\>/127.0.0.1/g'
-    done
+    find . \( -name \*.c -or -name \*.conf \) | \
+      xargs sed -ie 's|\<localhost\>|127.0.0.1|g'
 
     # Make sure the tests don't rely on `/tmp', for the sake of chroot
     # builds.
-    for i in $(find . \( -iname \*test\*.c -or -name \*.conf \) \
-                    -exec grep -l /tmp {} \;)
-    do
-      echo "$i: replacing references to \`/tmp' by \`$TMPDIR'..."
-      substituteInPlace "$i" --replace "/tmp" "$TMPDIR"
-    done
+    find . \( -iname \*test\*.c -or -name \*.conf \) | \
+      xargs sed -ie "s|/tmp|$TMPDIR|g"
 
     # Ensure NSS installation works fine
     configureFlags="$configureFlags --with-nssdir=$out/lib"
     patchShebangs src/gns/nss/install-nss-plugin.sh
+
+    sed -ie 's|@LDFLAGS@|@LDFLAGS@ $(Z_LIBS)|g' \
+      src/regex/Makefile.in \
+      src/fs/Makefile.in
   '';
 
   doCheck = false;
@@ -53,7 +49,7 @@ stdenv.mkDerivation rec {
     '';
   */
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "GNU's decentralized anonymous and censorship-resistant P2P framework";
 
     longDescription = ''
@@ -73,9 +69,9 @@ stdenv.mkDerivation rec {
 
     homepage = http://gnunet.org/;
 
-    license = stdenv.lib.licenses.gpl2Plus;
+    license = licenses.gpl2Plus;
 
-    maintainers = with stdenv.lib.maintainers; [ viric ];
-    platforms = stdenv.lib.platforms.gnu;
+    maintainers = with maintainers; [ viric vrthra ];
+    platforms = platforms.gnu;
   };
 }