From 84868b8b06e54f0d1a9eb3140ed80b4d697f35d3 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 14 May 2018 20:33:54 -0400 Subject: [PATCH] misc hurd stuff: Get rid of crossConfig This stuff is horribly bit-rotted anyways, but I'm getting rid of crossConfig so it must be changed. --- pkgs/os-specific/gnu/hurd/default.nix | 29 +++++++-------------- pkgs/os-specific/gnu/libpthread/default.nix | 2 -- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/pkgs/os-specific/gnu/hurd/default.nix b/pkgs/os-specific/gnu/hurd/default.nix index 5eccee62468..ae1c504fd19 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"; +}) diff --git a/pkgs/os-specific/gnu/libpthread/default.nix b/pkgs/os-specific/gnu/libpthread/default.nix index 294a1548582..a2e1081a1e8 100644 --- a/pkgs/os-specific/gnu/libpthread/default.nix +++ b/pkgs/os-specific/gnu/libpthread/default.nix @@ -55,8 +55,6 @@ stdenv.mkDerivation ({ (if cross != null then { - crossConfig = cross.config; - # Tell gcc where to find `crt1.o' et al. This is specified in two # different ways: one for gcc as run from `configure', and one for linking # libpthread.so (by default `libtool --mode=link' swallows `-B', hence