summary refs log tree commit diff
path: root/pkgs/stdenv/freebsd
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/stdenv/freebsd')
-rw-r--r--pkgs/stdenv/freebsd/default.nix115
1 files changed, 68 insertions, 47 deletions
diff --git a/pkgs/stdenv/freebsd/default.nix b/pkgs/stdenv/freebsd/default.nix
index ea2ebcc7917..e0256e26f5f 100644
--- a/pkgs/stdenv/freebsd/default.nix
+++ b/pkgs/stdenv/freebsd/default.nix
@@ -1,65 +1,86 @@
-{ lib, allPackages
+{ lib
 , system, platform, crossSystem, config
 }:
 
 assert crossSystem == null;
 
-rec {
-  inherit allPackages;
 
-  bootstrapTools = derivation {
-    inherit system;
+[
 
-    name    = "trivial-bootstrap-tools";
-    builder = "/usr/local/bin/bash";
-    args    = [ ./trivial-bootstrap.sh ];
+  ({}: {
+    __raw = true;
 
-    mkdir   = "/bin/mkdir";
-    ln      = "/bin/ln";
-  };
+    bootstrapTools = derivation {
+      inherit system;
+
+      name = "trivial-bootstrap-tools";
+      builder = "/usr/local/bin/bash";
+      args = [ ./trivial-bootstrap.sh ];
+
+      mkdir = "/bin/mkdir";
+      ln = "/bin/ln";
+    };
+  })
+
+  ({ bootstrapTools, ... }: rec {
+    __raw = true;
+
+    inherit bootstrapTools;
+
+    fetchurl = import ../../build-support/fetchurl {
+      inherit stdenv;
+      curl = bootstrapTools;
+    };
 
-  fetchurl = import ../../build-support/fetchurl {
     stdenv = import ../generic {
       name = "stdenv-freebsd-boot-1";
       inherit system config;
-
-      initialPath  = [ "/" "/usr" ];
-      shell        = "${bootstrapTools}/bin/bash";
+      initialPath = [ "/" "/usr" ];
+      shell = "${bootstrapTools}/bin/bash";
       fetchurlBoot = null;
       cc = null;
-    };
-    curl = bootstrapTools;
-  };
-
-  stdenvFreeBSD = import ../generic {
-    name = "stdenv-freebsd-boot-3";
-
-    inherit system config;
-
-    initialPath  = [ bootstrapTools ];
-    shell        = "${bootstrapTools}/bin/bash";
-    fetchurlBoot = fetchurl;
-
-    cc = import ../../build-support/cc-wrapper {
-      nativeTools  = true;
-      nativePrefix = "/usr";
-      nativeLibc   = true;
-      stdenv = import ../generic {
-        inherit system config;
-        name         = "stdenv-freebsd-boot-0";
-        initialPath  = [ bootstrapTools ];
-        shell = stdenvFreeBSD.shell;
-        fetchurlBoot = fetchurl;
-        cc           = null;
+      overrides = self: super: {
       };
-      cc           = {
-        name    = "clang-9.9.9";
-        cc      = "/usr";
-        outPath = "/usr";
+    };
+  })
+
+  (prevStage: {
+    __raw = true;
+
+    stdenv = import ../generic {
+      name = "stdenv-freebsd-boot-0";
+      inherit system config;
+      initialPath = [ prevStage.bootstrapTools ];
+      inherit (prevStage.stdenv) shell;
+      fetchurlBoot = prevStage.fetchurl;
+      cc = null;
+    };
+  })
+
+  (prevStage: {
+    inherit system crossSystem platform config;
+    stdenv = import ../generic {
+      name = "stdenv-freebsd-boot-3";
+      inherit system config;
+
+      inherit (prevStage.stdenv)
+        initialPath shell fetchurlBoot;
+
+      cc = import ../../build-support/cc-wrapper {
+        nativeTools  = true;
+        nativePrefix = "/usr";
+        nativeLibc   = true;
+        inherit (prevStage) stdenv;
+        cc           = {
+          name    = "clang-9.9.9";
+          cc      = "/usr";
+          outPath = "/usr";
+        };
+        isClang      = true;
       };
-      isClang      = true;
+
+      preHook = ''export NIX_NO_SELF_RPATH=1'';
     };
+  })
 
-    preHook = ''export NIX_NO_SELF_RPATH=1'';
-  };
-}
+]