diff --git a/pkgs/os-specific/linux/libcap/default.nix b/pkgs/os-specific/linux/libcap/default.nix index b7b1c07072f8..aac8c06172d4 100644 --- a/pkgs/os-specific/linux/libcap/default.nix +++ b/pkgs/os-specific/linux/libcap/default.nix @@ -8,9 +8,7 @@ stdenv.mkDerivation { }; preBuild = " - sed 's|/usr/include|${stdenv.glibc}/include|' < libcap/Makefile > libcap/Makefile.tmp - mv libcap/Makefile.tmp libcap/Makefile - + substituteInPlace libcap/Makefile --replace /usr/include ${stdenv.glibc}/include installFlags=\"LIBDIR=$out/lib INCDIR=$out/include SBINDIR=$out/sbin MANDIR=$out/man\" "; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index addaf1ac41bd..43ade0db676e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2212,7 +2212,8 @@ rec { }; libcap = import ../os-specific/linux/libcap { - inherit fetchurl stdenv; + inherit fetchurl; + stdenv = overrideSetup stdenv ../stdenv/generic/setup-new2.sh; }; lvm2 = import ../os-specific/linux/lvm2 {