proot: allow static build
This commit is contained in:
parent
b1b5712c43
commit
9bc82e0952
|
@ -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"
|
||||
'';
|
||||
|
||||
|
|
Loading…
Reference in New Issue