summary refs log tree commit diff
path: root/pkgs/stdenv/adapters.nix
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2017-07-12 19:00:19 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2017-07-13 19:05:36 -0400
commite826a6a24774045b7d7d4e9814d8356278b84568 (patch)
tree24e3f6f69d1576a2429f896f917ee7f07c532ef7 /pkgs/stdenv/adapters.nix
parent30a14204149c8fb43001c4f2188e8e655a9a389a (diff)
downloadnixpkgs-e826a6a24774045b7d7d4e9814d8356278b84568.tar
nixpkgs-e826a6a24774045b7d7d4e9814d8356278b84568.tar.gz
nixpkgs-e826a6a24774045b7d7d4e9814d8356278b84568.tar.bz2
nixpkgs-e826a6a24774045b7d7d4e9814d8356278b84568.tar.lz
nixpkgs-e826a6a24774045b7d7d4e9814d8356278b84568.tar.xz
nixpkgs-e826a6a24774045b7d7d4e9814d8356278b84568.tar.zst
nixpkgs-e826a6a24774045b7d7d4e9814d8356278b84568.zip
stdenv: Move some logic from cross adapter to stdenv proper
Eventually the adapter will be removed.  Moved is

 - Name suffix from hostPlatform

 - configurePlatforms

   To not cause more breakage, the default is currently [], but
   eventually it will be [ "build" "host" ], as the cross adapter makes
   it today.
Diffstat (limited to 'pkgs/stdenv/adapters.nix')
-rw-r--r--pkgs/stdenv/adapters.nix19
1 files changed, 1 insertions, 18 deletions
diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix
index 5848ee87b1b..ac382927b1b 100644
--- a/pkgs/stdenv/adapters.nix
+++ b/pkgs/stdenv/adapters.nix
@@ -73,15 +73,8 @@ rec {
     };
   in stdenv // {
     mkDerivation =
-      { name ? "", buildInputs ? [], nativeBuildInputs ? []
+      { buildInputs ? [], nativeBuildInputs ? []
       , propagatedBuildInputs ? [], propagatedNativeBuildInputs ? []
-      , # Disabling the tests by default when cross compiling, as usually the
-        # tests rely on being able to run produced binaries.
-        doCheck ? false
-      , configureFlags ? []
-      , # Target is not included by default because most programs don't care.
-        # Including it then would cause needless massive rebuilds.
-        configurePlatforms   ? args.crossAttrs.configurePlatforms   or [ "build" "host" ]
       , selfNativeBuildInput ? args.crossAttrs.selfNativeBuildInput or false
       , ...
       } @ args:
@@ -106,7 +99,6 @@ rec {
         nativeInputsFromBuildInputs = stdenv.lib.filter hostAsNativeDrv buildInputsNotNull;
       in
         stdenv.mkDerivation (args // {
-          name = name + "-" + hostPlatform.config;
           nativeBuildInputs = nativeBuildInputs
             ++ nativeInputsFromBuildInputs
             ++ stdenv.lib.optional selfNativeBuildInput nativeDrv
@@ -116,15 +108,6 @@ rec {
             ++ stdenv.lib.optional (hostPlatform.config == "aarch64-linux-gnu") pkgs.updateAutotoolsGnuConfigScriptsHook
             ;
 
-          inherit doCheck;
-
-          # This parameter is sometimes a string and sometimes a list, yuck
-          configureFlags = let inherit (stdenv.lib) optional elem; in
-            (if stdenv.lib.isString configureFlags then [configureFlags] else configureFlags)
-            ++ optional (elem "build"  configurePlatforms) "--build=${buildPlatform.config}"
-            ++ optional (elem "host"   configurePlatforms) "--host=${hostPlatform.config}"
-            ++ optional (elem "target" configurePlatforms) "--target=${targetPlatform.config}";
-
           # Cross-linking dynamic libraries, every buildInput should
           # be propagated because ld needs the -rpath-link to find
           # any library needed to link the program dynamically at