@@ -1,5 +1,6 @@
11{ stdenv, fetchFromGitHub, autoconf, bison, flex, libtool, pkgconfig, which
2−, libnl, protobuf, protobufc }:
2+, libnl, protobuf, protobufc, shadow
3+}:
34
45stdenv.mkDerivation rec {
56 name = "nsjail-${version}";
@@ -13,6 +14,12 @@ stdenv.mkDerivation rec {
1314 sha256 = "0cgycj0cz74plmz4asxryqprg6mkzpmnxzqbfsp1wwackinxq5fq";
1415 };
1516
17+ postPatch = ''
18+ substituteInPlace user.cc \
19+ --replace "/usr/bin/newgidmap" "${shadow}/bin/newgidmap" \
20+ --replace "/usr/bin/newuidmap" "${shadow}/bin/newuidmap"
21+ '';
22+
1623 nativeBuildInputs = [ autoconf bison flex libtool pkgconfig which ];
1724 buildInputs = [ libnl protobuf protobufc ];
1825 enableParallelBuilding = true;