diff --git a/pkgs/tools/system/proot/default.nix b/pkgs/tools/system/proot/default.nix index 3eaa85e41ea..4faf8e561d8 100644 --- a/pkgs/tools/system/proot/default.nix +++ b/pkgs/tools/system/proot/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, talloc }: +{ stdenv, fetchgit, talloc, enableStatic ? false }: stdenv.mkDerivation rec { name = "proot-${version}"; @@ -12,7 +12,9 @@ stdenv.mkDerivation rec { buildInputs = [ talloc ]; - preBuild = '' + preBuild = stdenv.lib.optionalString enableStatic '' + export LDFLAGS="-static -L${talloc}/lib" + '' + '' substituteInPlace GNUmakefile --replace "/usr/local" "$out" '';