summary refs log tree commit diff
path: root/pkgs/tools/misc/coreutils
diff options
context:
space:
mode:
authorDanny Wilson <danny@prime.vc>2015-11-17 18:28:51 +0100
committerDanny Wilson <danny@prime.vc>2015-11-17 18:29:54 +0100
commit590eec7945f7718c9f9ea96ad0828624a7e7c190 (patch)
tree466f29e39406f76ac7f3b2b332db509808a86661 /pkgs/tools/misc/coreutils
parent62ff7367d533da02b92427997f5d2beb525fd61a (diff)
downloadnixlib-590eec7945f7718c9f9ea96ad0828624a7e7c190.tar
nixlib-590eec7945f7718c9f9ea96ad0828624a7e7c190.tar.gz
nixlib-590eec7945f7718c9f9ea96ad0828624a7e7c190.tar.bz2
nixlib-590eec7945f7718c9f9ea96ad0828624a7e7c190.tar.lz
nixlib-590eec7945f7718c9f9ea96ad0828624a7e7c190.tar.xz
nixlib-590eec7945f7718c9f9ea96ad0828624a7e7c190.tar.zst
nixlib-590eec7945f7718c9f9ea96ad0828624a7e7c190.zip
Simplify FORCE_UNSAFE_CONFIGURE by making it an optional string.
postInstall references ${self} and requires self to be a derivation.
Diffstat (limited to 'pkgs/tools/misc/coreutils')
-rw-r--r--pkgs/tools/misc/coreutils/default.nix8
1 files changed, 3 insertions, 5 deletions
diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix
index 9f763115f9a9..c9aacd0ba6b8 100644
--- a/pkgs/tools/misc/coreutils/default.nix
+++ b/pkgs/tools/misc/coreutils/default.nix
@@ -11,7 +11,7 @@ assert selinuxSupport -> libselinux != null && libsepol != null;
 with { inherit (stdenv.lib) optional optionals optionalString optionalAttrs; };
 
 let
-  self = rec {
+  self = stdenv.mkDerivation rec {
     name = "coreutils-8.24";
 
     src = fetchurl {
@@ -82,6 +82,7 @@ let
     enableParallelBuilding = false;
 
     NIX_LDFLAGS = optionalString selinuxSupport "-lsepol";
+    FORCE_UNSAFE_CONFIGURE = stdenv.lib.optionalString (stdenv.system == "armv7l-linux" || stdenv.isSunOS) "1";
 
     makeFlags = optionalString stdenv.isDarwin "CFLAGS=-D_FORTIFY_SOURCE=0";
 
@@ -104,7 +105,4 @@ let
     };
   };
 in
-  stdenv.mkDerivation (self
-  // stdenv.lib.optionalAttrs (stdenv.system == "armv7l-linux" || stdenv.isSunOS) {
-    FORCE_UNSAFE_CONFIGURE = 1;
-  })
+  self;