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 {
|
stdenv.mkDerivation rec {
|
||||||
name = "proot-${version}";
|
name = "proot-${version}";
|
||||||
|
@ -12,7 +12,9 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
buildInputs = [ talloc ];
|
buildInputs = [ talloc ];
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = stdenv.lib.optionalString enableStatic ''
|
||||||
|
export LDFLAGS="-static -L${talloc}/lib"
|
||||||
|
'' + ''
|
||||||
substituteInPlace GNUmakefile --replace "/usr/local" "$out"
|
substituteInPlace GNUmakefile --replace "/usr/local" "$out"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue