1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-01-22 14:45:27 +00:00

nsjail: fix path to new{u|g}idmap (#51523)

This commit is contained in:
Renaud 2018-12-04 22:47:48 +01:00 committed by GitHub
parent 059c61d001
commit b38dd07eaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,6 @@
{ stdenv, fetchFromGitHub, autoconf, bison, flex, libtool, pkgconfig, which
, libnl, protobuf, protobufc }:
, libnl, protobuf, protobufc, shadow
}:
stdenv.mkDerivation rec {
name = "nsjail-${version}";
@ -13,6 +14,12 @@ stdenv.mkDerivation rec {
sha256 = "0cgycj0cz74plmz4asxryqprg6mkzpmnxzqbfsp1wwackinxq5fq";
};
postPatch = ''
substituteInPlace user.cc \
--replace "/usr/bin/newgidmap" "${shadow}/bin/newgidmap" \
--replace "/usr/bin/newuidmap" "${shadow}/bin/newuidmap"
'';
nativeBuildInputs = [ autoconf bison flex libtool pkgconfig which ];
buildInputs = [ libnl protobuf protobufc ];
enableParallelBuilding = true;