mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-21 04:49:01 +02:00
lz4: fix pkgsStatic build
This commit is contained in:
parent
af2cebe78f
commit
cb5a7bdc3a
|
@ -1,4 +1,6 @@
|
||||||
{ stdenv, fetchFromGitHub, valgrind }:
|
{ stdenv, fetchFromGitHub, valgrind
|
||||||
|
, enableStatic ? false, enableShared ? true
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "lz4-${version}";
|
name = "lz4-${version}";
|
||||||
|
@ -17,12 +19,23 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
makeFlags = [ "PREFIX=$(out)" "INCLUDEDIR=$(dev)/include" ];
|
makeFlags = [
|
||||||
|
"PREFIX=$(out)"
|
||||||
|
"INCLUDEDIR=$(dev)/include"
|
||||||
|
# TODO do this instead
|
||||||
|
#"BUILD_STATIC=${if enableStatic then "yes" else "no"}"
|
||||||
|
#"BUILD_SHARED=${if enableShared then "yes" else "no"}"
|
||||||
|
]
|
||||||
|
# TODO delete and do above
|
||||||
|
++ stdenv.lib.optional (enableStatic) "BUILD_STATIC=yes"
|
||||||
|
++ stdenv.lib.optional (!enableShared) "BUILD_SHARED=no"
|
||||||
|
;
|
||||||
|
|
||||||
doCheck = false; # tests take a very long time
|
doCheck = false; # tests take a very long time
|
||||||
checkTarget = "test";
|
checkTarget = "test";
|
||||||
|
|
||||||
postInstall = "rm $out/lib/*.a";
|
# TODO remove
|
||||||
|
postInstall = stdenv.lib.optionalString (!enableStatic) "rm $out/lib/*.a";
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Extremely fast compression algorithm";
|
description = "Extremely fast compression algorithm";
|
||||||
|
|
|
@ -139,6 +139,10 @@ in {
|
||||||
# it doesn’t like the --disable-shared flag
|
# it doesn’t like the --disable-shared flag
|
||||||
stdenv = super.stdenv;
|
stdenv = super.stdenv;
|
||||||
};
|
};
|
||||||
|
lz4 = super.lz4.override {
|
||||||
|
enableShared = false;
|
||||||
|
enableStatic = true;
|
||||||
|
};
|
||||||
|
|
||||||
darwin = super.darwin // {
|
darwin = super.darwin // {
|
||||||
libiconv = super.darwin.libiconv.override {
|
libiconv = super.darwin.libiconv.override {
|
||||||
|
|
Loading…
Reference in a new issue