From 95f38fc409a0aae08a18fb7b4554275166f28e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Mon, 2 Feb 2009 21:57:18 +0000 Subject: [PATCH] Fixing the aircrack-ng build, so it doesn't depend on any profile and points, as usual, only to the store for its dependencies. svn path=/nixpkgs/trunk/; revision=13965 --- .../networking/aircrack-ng/add-paths.patch | 17 ----------------- pkgs/tools/networking/aircrack-ng/default.nix | 9 +++++---- pkgs/top-level/all-packages.nix | 10 +++------- 3 files changed, 8 insertions(+), 28 deletions(-) delete mode 100644 pkgs/tools/networking/aircrack-ng/add-paths.patch diff --git a/pkgs/tools/networking/aircrack-ng/add-paths.patch b/pkgs/tools/networking/aircrack-ng/add-paths.patch deleted file mode 100644 index 6a79484e92c..00000000000 --- a/pkgs/tools/networking/aircrack-ng/add-paths.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/src/osdep/linux.c b/src/osdep/linux.c -index 9f3b1ef..ba7e584 100644 ---- a/src/osdep/linux.c -+++ b/src/osdep/linux.c -@@ -235,7 +235,11 @@ static char * wiToolsPath(const char * tool) - "/bin", - "/usr/bin", - "/usr/local/bin", -- "/tmp" -+ "/tmp", -+ "/var/run/current-system/sw/bin", -+ "/var/run/current-system/sw/sbin", -+ "/root/.nix-profile/bin", -+ "/root/.nix-profile/sbin" - }; - - nbelems = sizeof(paths) / sizeof(char *); diff --git a/pkgs/tools/networking/aircrack-ng/default.nix b/pkgs/tools/networking/aircrack-ng/default.nix index 6bedb6bc75b..a83506efa1c 100644 --- a/pkgs/tools/networking/aircrack-ng/default.nix +++ b/pkgs/tools/networking/aircrack-ng/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, libpcap, openssl, zlib}: +{stdenv, fetchurl, libpcap, openssl, zlib, wirelesstools}: stdenv.mkDerivation { name = "aircrack-ng-1.0-rc2"; @@ -10,9 +10,10 @@ stdenv.mkDerivation { buildInputs = [libpcap openssl zlib]; - patches = [ ./add-paths.patch ]; - - postPatch = "sed -e 's@^prefix.*@prefix = '$out@ -i common.mak"; + patchPhase = '' + sed -e 's@^prefix.*@prefix = '$out@ -i common.mak + sed -e 's@/usr/local/bin@'${wirelesstools}@ -i src/osdep/linux.c + ''; meta = { description = "Wireless encryption crackign tools"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 07d0a26b91e..11b595e601f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -482,13 +482,9 @@ let inherit fetchurl stdenv fuse; }; - # It builds, but it has paths pointing to the default profile, - # hardcoded to /nix/var/nix/profiles/default/bin. We need to - # know its dependencies for the executable paths and stop - # using the profiles, pointing directly to the store paths needed. - #aircrackng = import ../tools/networking/aircrack-ng { - # inherit fetchurl stdenv libpcap openssl zlib; - #}; + aircrackng = import ../tools/networking/aircrack-ng { + inherit fetchurl stdenv libpcap openssl zlib wirelesstools; + }; amule = import ../tools/networking/p2p/amule { inherit fetchurl stdenv zlib perl cryptopp gettext libupnp makeWrapper;