summary refs log tree commit diff
path: root/pkgs/tools/misc/coreutils/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/misc/coreutils/default.nix')
-rw-r--r--pkgs/tools/misc/coreutils/default.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix
index 42f8e74df31..9a988a2b431 100644
--- a/pkgs/tools/misc/coreutils/default.nix
+++ b/pkgs/tools/misc/coreutils/default.nix
@@ -70,7 +70,7 @@ stdenv.mkDerivation rec {
     && builtins.storeDir == "/nix/store";
 
   # Prevents attempts of running 'help2man' on cross-built binaries.
-  ${if hostPlatform == buildPlatform then null else "PERL"} = "missing";
+  PERL = if hostPlatform == buildPlatform then null else "missing";
 
   # Saw random failures like ‘help2man: can't get '--help' info from
   # man/sha512sum.td/sha512sum’.
@@ -83,11 +83,11 @@ stdenv.mkDerivation rec {
 
   # Works around a bug with 8.26:
   # Makefile:3440: *** Recursive variable 'INSTALL' references itself (eventually).  Stop.
-  ${if hostPlatform == buildPlatform then null else "preInstall"} = ''
+  preInstall = optionalString (hostPlatform != buildPlatform) ''
     sed -i Makefile -e 's|^INSTALL =.*|INSTALL = ${buildPackages.coreutils}/bin/install -c|'
   '';
 
-  ${if hostPlatform == buildPlatform then null else "postInstall"} = ''
+  postInstall = optionalString (hostPlatform != buildPlatform) ''
     rm $out/share/man/man1/*
     cp ${buildPackages.coreutils}/share/man/man1/* $out/share/man/man1
   '';