diff options
Diffstat (limited to 'pkgs/os-specific/gnu/hurd/default.nix')
-rw-r--r-- | pkgs/os-specific/gnu/hurd/default.nix | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/pkgs/os-specific/gnu/hurd/default.nix b/pkgs/os-specific/gnu/hurd/default.nix index 5eccee62468d..ae1c504fd19e 100644 --- a/pkgs/os-specific/gnu/hurd/default.nix +++ b/pkgs/os-specific/gnu/hurd/default.nix @@ -75,25 +75,16 @@ stdenv.mkDerivation ({ // -(if !headersOnly && buildTarget != null - then assert installTarget != null; { - # Use the default `buildPhase' and `installPhase' so that the usual hooks - # can still be used. - buildFlags = buildTarget; - installTargets = installTarget; - } - else {}) +stdenv.lib.optionalAttrs (!headersOnly && buildTarget != null) { + # Use the default `buildPhase' and `installPhase' so that the usual hooks + # can still be used. + buildFlags = buildTarget; + installTargets = assert installTarget != null; installTarget; +} // -(if headersOnly - then { dontBuild = true; installPhase = "make install-headers"; } - else (if (cross != null) - then { - crossConfig = cross.config; - - # The `configure' script wants to build executables so tell it where - # to find `crt1.o' et al. - LDFLAGS = "-B${glibcCross}/lib"; - } - else { }))) +stdenv.lib.optionalAttrs headersOnly { + dontBuild = true; + installPhase = "make install-headers"; +}) |