about summary refs log tree commit diff
path: root/pkgs/tools/misc/coreutils
diff options
context:
space:
mode:
authorJanne Heß <janne@hess.ooo>2022-05-26 12:24:52 +0200
committerJanne Heß <janne@hess.ooo>2022-05-26 13:28:14 +0200
commita9468b99ef2d776131cd98032f31738a8de4c560 (patch)
tree1355b523d428fa25d7274caefb74f3905bc23851 /pkgs/tools/misc/coreutils
parent5de817cd3f09823f8639920149767c8b5b17e05e (diff)
coreutils: Get rid of the optionalAttrs
Diffstat (limited to 'pkgs/tools/misc/coreutils')
-rw-r--r--pkgs/tools/misc/coreutils/default.nix9
1 files changed, 4 insertions, 5 deletions
diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix
index 1e6925ce36340..b7ee796795391 100644
--- a/pkgs/tools/misc/coreutils/default.nix
+++ b/pkgs/tools/misc/coreutils/default.nix
@@ -117,6 +117,10 @@ stdenv.mkDerivation (rec {
 
   NIX_LDFLAGS = optionalString selinuxSupport "-lsepol";
   FORCE_UNSAFE_CONFIGURE = optionalString stdenv.hostPlatform.isSunOS "1";
+  NIX_CFLAGS_COMPILE = []
+    # Work around a bogus warning in conjunction with musl.
+    ++ optional stdenv.hostPlatform.isMusl "-Wno-error"
+    ++ optional stdenv.hostPlatform.isAndroid "-D__USE_FORTIFY_LEVEL=0";
 
   # Works around a bug with 8.26:
   # Makefile:3440: *** Recursive variable 'INSTALL' references itself (eventually).  Stop.
@@ -147,9 +151,4 @@ stdenv.mkDerivation (rec {
     priority = 10;
     maintainers = [ maintainers.das_j ];
   };
-} // optionalAttrs stdenv.hostPlatform.isMusl {
-  # Work around a bogus warning in conjunction with musl.
-  NIX_CFLAGS_COMPILE = "-Wno-error";
-} // lib.optionalAttrs stdenv.hostPlatform.isAndroid {
-  NIX_CFLAGS_COMPILE = "-D__USE_FORTIFY_LEVEL=0";
 })