shorewall: fix packages for nixos-19.03
authorJulien Moutinho <julm@autogeree.net>
Fri, 21 Jun 2019 12:46:20 +0000 (12:46 +0000)
committerJulien Moutinho <julm@autogeree.net>
Fri, 21 Jun 2019 12:46:20 +0000 (12:46 +0000)
install/overlays/tools/networking/shorewall-core/default.nix
install/overlays/tools/networking/shorewall.nix
install/overlays/tools/networking/shorewall/default.nix
install/overlays/tools/networking/shorewall6.nix
install/overlays/tools/networking/shorewall6/default.nix

index dd7c9172b0961ab24931387b60b18545e2240d90..7c41a876ed36398bdbfe64cb10709b3d2d4499bc 100644 (file)
@@ -14,6 +14,7 @@ stdenv.mkDerivation rec {
     perl
   ];
   configurePhase = ''
+    substituteInPlace ./configure --replace '#!/bin/bash' ${stdenv.shell}
     ./configure \
       HOST=linux \
       PREFIX=$out \
@@ -27,6 +28,7 @@ stdenv.mkDerivation rec {
       DEFAULT_PAGER=
   '';
   installPhase = ''
+    substituteInPlace ./install.sh --replace '#!/bin/sh' ${stdenv.shell}
     ./install.sh
     # Remove hardcoded PATH
     sed -i $out/share/shorewall/lib.cli \
index 0bcc72dc7c1d6625c7aab544a639a85132d60b69..8f655c839d9f46d6efe656226e00b702f0206a13 100644 (file)
@@ -1,7 +1,3 @@
 self: super:  {
-  shorewall = super.callPackage ./shorewall {
-    # For the `logger' command, we can use either `utillinux' or
-    # GNU Inetutils.  The latter is more portable.
-    logger = if super.stdenv.isLinux then self.utillinux else self.inetutils;
-  };
+  shorewall = super.callPackage ./shorewall {};
 }
index 9705c9a97712ffb5093496a7f448b855c9e4723e..54d849e054e3737f0ce30f077576e84eb8f23955 100644 (file)
@@ -1,13 +1,14 @@
 { stdenv
 , fetchurl
 , perl
+, perlPackages
 , coreutils
 , iproute
 , ipset
 , iptables
 , ebtables
 , shorewall-core
-, logger
+, utillinux
 , gnugrep
 , gnused
 }:
@@ -18,7 +19,7 @@ let
              "${iptables}/bin"
              "${ipset}/bin"
              "${ebtables}/bin"
-             "${logger}/bin"
+             "${utillinux}/bin"
              "${gnugrep}/bin"
              "${gnused}/bin"
            ];
@@ -40,11 +41,15 @@ stdenv.mkDerivation rec {
     iptables
     ebtables
     shorewall-core
-    logger
+    utillinux
     gnugrep
     gnused
-  ];
+    perl
+  ] ++ (with perlPackages; [
+    DigestSHA1
+  ]);
   configurePhase = ''
+    substituteInPlace ./configure --replace '#!/bin/bash' ${stdenv.shell}
     PATH=$PATH:${shorewall-core}/bin \
     ./configure \
       HOST=linux \
@@ -65,6 +70,7 @@ stdenv.mkDerivation rec {
     ln -fns bin $out/sbin
     # Install shorewallrc and shorewall
     cp --remove-destination shorewallrc $out/share/shorewall/
+    substituteInPlace ./install.sh --replace '#!/bin/sh' ${stdenv.shell}
     ./install.sh
     cp ${shorewall-core}/sbin/shorewall $out/sbin/shorewall4
     ln -fns shorewall4 $out/sbin/shorewall
index 14e1ab18fa3191162f61a663593fbb9fbabf20ca..a5000bc060a1b00dbc6f864a222db3b1eda79044 100644 (file)
@@ -1,7 +1,3 @@
 self: super:  {
-  shorewall6 = super.callPackage ./shorewall6 {
-    # For the `logger' command, we can use either `utillinux' or
-    # GNU Inetutils.  The latter is more portable.
-    logger = if super.stdenv.isLinux then self.utillinux else self.inetutils;
-  };
+  shorewall6 = super.callPackage ./shorewall6 {};
 }
index e01e70408aa4d90c262402cd9d864cc0fc6b2b08..8051637eaf5b0007ae650d6669b6ab0bd1a40a82 100644 (file)
@@ -8,7 +8,7 @@
 , ebtables
 , shorewall-core
 , shorewall
-, logger
+, utillinux
 , gnugrep
 , gnused
 }:
@@ -19,7 +19,7 @@ let
              "${iptables}/bin"
              "${ipset}/bin"
              "${ebtables}/bin"
-             "${logger}/bin"
+             "${utillinux}/bin"
              "${gnugrep}/bin"
              "${gnused}/bin"
            ];
@@ -41,12 +41,13 @@ stdenv.mkDerivation rec {
     iptables
     ebtables
     shorewall-core
-    logger
+    utillinux
     gnugrep
     gnused
     shorewall
   ];
   configurePhase = ''
+    substituteInPlace ./configure --replace '#!/bin/bash' ${stdenv.shell}
     PATH=$PATH:${shorewall-core}/bin \
     ./configure \
       HOST=linux \
@@ -70,6 +71,7 @@ stdenv.mkDerivation rec {
     # Install shorewallrc and shorewall6
     cp --remove-destination shorewallrc $out/share/shorewall/
     #ln -s ${shorewall}/share/shorewall/compiler.pl $out/share/shorewall/
+    substituteInPlace ./install.sh --replace '#!/bin/sh' ${stdenv.shell}
     ./install.sh
     cp --remove-destination ${shorewall-core}/sbin/shorewall $out/sbin/shorewall6
     # Actual config will be expected in /etc/shorewall6