mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 07:46:09 +01:00
gnunet: cleanup patching
Do not use loop and sed since sed can take a list of files.
This commit is contained in:
parent
b31ab67a81
commit
af074c0972
1 changed files with 8 additions and 16 deletions
|
@ -20,21 +20,13 @@ stdenv.mkDerivation rec {
|
||||||
# Brute force: since nix-worker chroots don't provide
|
# Brute force: since nix-worker chroots don't provide
|
||||||
# /etc/{resolv.conf,hosts}, replace all references to `localhost'
|
# /etc/{resolv.conf,hosts}, replace all references to `localhost'
|
||||||
# by their IPv4 equivalent.
|
# by their IPv4 equivalent.
|
||||||
for i in $(find . \( -name \*.c -or -name \*.conf \) \
|
find . \( -name \*.c -or -name \*.conf \) | \
|
||||||
-exec grep -l '\<localhost\>' {} \;)
|
xargs sed -ie 's|\<localhost\>|127.0.0.1|g'
|
||||||
do
|
|
||||||
echo "$i: substituting \`127.0.0.1' to \`localhost'..."
|
|
||||||
sed -i "$i" -e's/\<localhost\>/127.0.0.1/g'
|
|
||||||
done
|
|
||||||
|
|
||||||
# Make sure the tests don't rely on `/tmp', for the sake of chroot
|
# Make sure the tests don't rely on `/tmp', for the sake of chroot
|
||||||
# builds.
|
# builds.
|
||||||
for i in $(find . \( -iname \*test\*.c -or -name \*.conf \) \
|
find . \( -iname \*test\*.c -or -name \*.conf \) | \
|
||||||
-exec grep -l /tmp {} \;)
|
xargs sed -ie "s|/tmp|$TMPDIR|g"
|
||||||
do
|
|
||||||
echo "$i: replacing references to \`/tmp' by \`$TMPDIR'..."
|
|
||||||
substituteInPlace "$i" --replace "/tmp" "$TMPDIR"
|
|
||||||
done
|
|
||||||
|
|
||||||
# Ensure NSS installation works fine
|
# Ensure NSS installation works fine
|
||||||
configureFlags="$configureFlags --with-nssdir=$out/lib"
|
configureFlags="$configureFlags --with-nssdir=$out/lib"
|
||||||
|
@ -57,7 +49,7 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
*/
|
*/
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
description = "GNU's decentralized anonymous and censorship-resistant P2P framework";
|
description = "GNU's decentralized anonymous and censorship-resistant P2P framework";
|
||||||
|
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
|
@ -77,9 +69,9 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
homepage = http://gnunet.org/;
|
homepage = http://gnunet.org/;
|
||||||
|
|
||||||
license = stdenv.lib.licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
|
|
||||||
maintainers = with stdenv.lib.maintainers; [ viric vrthra ];
|
maintainers = with maintainers; [ viric vrthra ];
|
||||||
platforms = stdenv.lib.platforms.gnu;
|
platforms = platforms.gnu;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue