mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-22 14:45:27 +00:00
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"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
ar qf $out/lib/libtalloc.a bin/default/talloc_5.o
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Hierarchical pool based memory allocator with destructors";
|
||||
homepage = http://tdb.samba.org/;
|
||||
|
|
|
@ -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 a new issue