diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/compression')
-rw-r--r-- | nixpkgs/pkgs/tools/compression/bzip2/default.nix | 11 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/compression/zstd/default.nix | 5 |
2 files changed, 11 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/tools/compression/bzip2/default.nix b/nixpkgs/pkgs/tools/compression/bzip2/default.nix index be456cf59442..bfab2dbb9467 100644 --- a/nixpkgs/pkgs/tools/compression/bzip2/default.nix +++ b/nixpkgs/pkgs/tools/compression/bzip2/default.nix @@ -1,5 +1,6 @@ { lib, stdenv, fetchurl -, linkStatic ? with stdenv.hostPlatform; isStatic || isCygwin +, enableStatic ? with stdenv.hostPlatform; isStatic || isCygwin +, enableShared ? true , autoreconfHook , testers }: @@ -47,8 +48,12 @@ in { outputs = [ "bin" "dev" "out" "man" ]; - configureFlags = - lib.optionals linkStatic [ "--enable-static" "--disable-shared" ]; + configureFlags = lib.concatLists [ + (lib.optional enableStatic "--enable-static") + (lib.optional (!enableShared) "--disable-shared") + ]; + + dontDisableStatic = enableStatic; enableParallelBuilding = true; diff --git a/nixpkgs/pkgs/tools/compression/zstd/default.nix b/nixpkgs/pkgs/tools/compression/zstd/default.nix index 791dda4f11ef..75b306b368aa 100644 --- a/nixpkgs/pkgs/tools/compression/zstd/default.nix +++ b/nixpkgs/pkgs/tools/compression/zstd/default.nix @@ -2,7 +2,8 @@ , fixDarwinDylibNames , file , legacySupport ? false -, static ? stdenv.hostPlatform.isStatic +, static ? stdenv.hostPlatform.isStatic # generates static libraries *only* +, enableStatic ? static # these need to be ran on the host, thus disable when cross-compiling , buildContrib ? stdenv.hostPlatform == stdenv.buildPlatform , doCheck ? stdenv.hostPlatform == stdenv.buildPlatform @@ -54,7 +55,7 @@ stdenv.mkDerivation rec { cmakeFlags = lib.attrsets.mapAttrsToList (name: value: "-DZSTD_${name}:BOOL=${if value then "ON" else "OFF"}") { BUILD_SHARED = !static; - BUILD_STATIC = static; + BUILD_STATIC = enableStatic; BUILD_CONTRIB = buildContrib; PROGRAMS_LINK_SHARED = !static; LEGACY_SUPPORT = legacySupport; |