mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-22 14:45:27 +00:00
miniupnpd: wrap iptables scripts to use correct PATH
This commit is contained in:
parent
b78348d1a4
commit
2039327879
|
@ -1,5 +1,10 @@
|
|||
{ stdenv, fetchurl, iptables, libuuid, pkgconfig }:
|
||||
{ stdenv, lib, fetchurl, iptables, libuuid, pkgconfig
|
||||
, which, iproute, gnused, coreutils, gawk, makeWrapper
|
||||
}:
|
||||
|
||||
let
|
||||
scriptBinEnv = lib.makeBinPath [ which iproute iptables gnused coreutils gawk ];
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "miniupnpd-2.1";
|
||||
|
||||
|
@ -10,7 +15,7 @@ stdenv.mkDerivation rec {
|
|||
};
|
||||
|
||||
buildInputs = [ iptables libuuid ];
|
||||
nativeBuildInputs= [ pkgconfig ];
|
||||
nativeBuildInputs= [ pkgconfig makeWrapper ];
|
||||
|
||||
makefile = "Makefile.linux";
|
||||
|
||||
|
@ -18,6 +23,13 @@ stdenv.mkDerivation rec {
|
|||
|
||||
installFlags = [ "PREFIX=$(out)" "INSTALLPREFIX=$(out)" ];
|
||||
|
||||
postFixup = ''
|
||||
for script in $out/etc/miniupnpd/ip{,6}tables_{init,removeall}.sh
|
||||
do
|
||||
wrapProgram $script --set PATH '${scriptBinEnv}:$PATH'
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://miniupnp.free.fr/;
|
||||
description = "A daemon that implements the UPnP Internet Gateway Device (IGD) specification";
|
||||
|
|
Loading…
Reference in a new issue