about summary refs log tree commit diff
path: root/pkgs/tools/compression
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-12-20 06:11:26 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2021-01-03 19:18:16 +0000
commitf52263ced0937e72453e7fbce9fefb5f425f650b (patch)
tree55b8627bc37cfdc7ce683f14b6180609fa7e3dbe /pkgs/tools/compression
parent0df75bc04e14e4af11e0124791bfd41bbff51b88 (diff)
downloadnixlib-f52263ced0937e72453e7fbce9fefb5f425f650b.tar
nixlib-f52263ced0937e72453e7fbce9fefb5f425f650b.tar.gz
nixlib-f52263ced0937e72453e7fbce9fefb5f425f650b.tar.bz2
nixlib-f52263ced0937e72453e7fbce9fefb5f425f650b.tar.lz
nixlib-f52263ced0937e72453e7fbce9fefb5f425f650b.tar.xz
nixlib-f52263ced0937e72453e7fbce9fefb5f425f650b.tar.zst
nixlib-f52263ced0937e72453e7fbce9fefb5f425f650b.zip
treewide: Start to break up static overlay
We can use use `stdenv.hostPlatform.isStatic` instead, and move the
logic per package. The least opionated benefit of this is that it makes
it much easier to replace packages with modified ones, as there is no
longer any issue of overlay order.

CC @FRidh @matthewbauer
Diffstat (limited to 'pkgs/tools/compression')
-rw-r--r--pkgs/tools/compression/bzip2/default.nix2
-rw-r--r--pkgs/tools/compression/lz4/default.nix3
-rw-r--r--pkgs/tools/compression/xz/default.nix4
3 files changed, 6 insertions, 3 deletions
diff --git a/pkgs/tools/compression/bzip2/default.nix b/pkgs/tools/compression/bzip2/default.nix
index 3e20258cbbee..96d560145df7 100644
--- a/pkgs/tools/compression/bzip2/default.nix
+++ b/pkgs/tools/compression/bzip2/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl
-, linkStatic ? (stdenv.hostPlatform.system == "i686-cygwin")
+, linkStatic ? with stdenv.hostPlatform; isStatic || isCygwin
 , autoreconfHook
 }:
 
diff --git a/pkgs/tools/compression/lz4/default.nix b/pkgs/tools/compression/lz4/default.nix
index 0124a0b3d63b..7fceb3854ebc 100644
--- a/pkgs/tools/compression/lz4/default.nix
+++ b/pkgs/tools/compression/lz4/default.nix
@@ -1,5 +1,6 @@
 { stdenv, fetchFromGitHub, valgrind, fetchpatch
-, enableStatic ? false, enableShared ? true
+, enableStatic ? stdenv.hostPlatform.isStatic
+, enableShared ? !stdenv.hostPlatform.isStatic
 }:
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/tools/compression/xz/default.nix b/pkgs/tools/compression/xz/default.nix
index 0b6082bb5780..161619a04836 100644
--- a/pkgs/tools/compression/xz/default.nix
+++ b/pkgs/tools/compression/xz/default.nix
@@ -1,4 +1,6 @@
-{ stdenv, fetchurl, enableStatic ? false }:
+{ stdenv, fetchurl
+, enableStatic ? stdenv.hostPlatform.isStatic
+}:
 
 # Note: this package is used for bootstrapping fetchurl, and thus
 # cannot use fetchpatch! All mutable patches (generated by GitHub or