about summary refs log tree commit diff
path: root/pkgs/applications/networking/firehol/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/firehol/default.nix')
-rw-r--r--pkgs/applications/networking/firehol/default.nix18
1 files changed, 18 insertions, 0 deletions
diff --git a/pkgs/applications/networking/firehol/default.nix b/pkgs/applications/networking/firehol/default.nix
index 2435b2dcc98df..6c0d43b1c129f 100644
--- a/pkgs/applications/networking/firehol/default.nix
+++ b/pkgs/applications/networking/firehol/default.nix
@@ -63,6 +63,24 @@ stdenv.mkDerivation rec {
       -SYSCONFDIR="@sysconfdir_POST@"
       +SYSCONFDIR="/etc"
       '')
+
+    # we must quote "$UNAME_CMD", or the dash in /nix/store/...-coreutils-.../bin/uname
+    # will be interpreted as IFS -> error. this might be considered an upstream bug
+    # but only appears when there are dashes in the command path
+    (pkgs.writeText "firehol-uname-command.patch"
+      ''
+      --- a/sbin/firehol
+      +++ b/sbin/firehol
+      @@ -10295,7 +10295,7 @@
+       	kmaj=$1
+       	kmin=$2
+       
+      -	set -- $($UNAME_CMD -r)
+      +	set -- $("$UNAME_CMD" -r)
+       	eval $kmaj=\$1 $kmin=\$2
+       }
+       kernel_maj_min KERNELMAJ KERNELMIN
+      '')
   ];
   
   nativeBuildInputs = [ autoconf automake ];