Merge pull request #5142 from bosu/static-proot
proot: allow static compilation
This commit is contained in:
commit
ba82a5d609
@ -24,6 +24,10 @@ stdenv.mkDerivation rec {
|
|||||||
"--builtin-libraries=replace"
|
"--builtin-libraries=replace"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
ar qf $out/lib/libtalloc.a bin/default/talloc_5.o
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Hierarchical pool based memory allocator with destructors";
|
description = "Hierarchical pool based memory allocator with destructors";
|
||||||
homepage = http://tdb.samba.org/;
|
homepage = http://tdb.samba.org/;
|
||||||
|
@ -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…
x
Reference in New Issue
Block a user