Merge pull request #5142 from bosu/static-proot

proot: allow static compilation
This commit is contained in:
Michael Raskin
2015-04-04 13:26:21 +03:00
2 changed files with 8 additions and 2 deletions
+4 -2
View File
@@ -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"
'';