summaryrefslogtreecommitdiffstats
path: root/pkgs/stdenv
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r--pkgs/stdenv/cross/default.nix4
-rw-r--r--pkgs/stdenv/darwin/default.nix9
-rw-r--r--pkgs/stdenv/generic/check-meta.nix13
-rw-r--r--pkgs/stdenv/generic/default.nix7
4 files changed, 21 insertions, 12 deletions
diff --git a/pkgs/stdenv/cross/default.nix b/pkgs/stdenv/cross/default.nix
index cc49af7de3b5..0f575289889f 100644
--- a/pkgs/stdenv/cross/default.nix
+++ b/pkgs/stdenv/cross/default.nix
@@ -38,7 +38,7 @@ in lib.init bootStages ++ [
(buildPackages: {
inherit config;
overlays = overlays ++ crossOverlays
- ++ (if crossSystem.isWasm then [(import ../../top-level/static.nix)] else []);
+ ++ (if (with crossSystem; isWasm || isRedox) then [(import ../../top-level/static.nix)] else []);
selfBuild = false;
stdenv = buildPackages.stdenv.override (old: rec {
buildPlatform = localSystem;
@@ -72,7 +72,7 @@ in lib.init bootStages ++ [
(hostPlatform.isLinux && !buildPlatform.isLinux)
[ buildPackages.patchelf ]
++ lib.optional
- (let f = p: !p.isx86 || p.libc == "musl" || p.libc == "wasilibc" || p.isiOS; in f hostPlatform && !(f buildPlatform))
+ (let f = p: !p.isx86 || builtins.elem p.libc [ "musl" "wasilibc" "relibc" ] || p.isiOS; in f hostPlatform && !(f buildPlatform))
buildPackages.updateAutotoolsGnuConfigScriptsHook
# without proper `file` command, libtool sometimes fails
# to recognize 64-bit DLLs
diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix
index b69de041fd23..9de6ef63bfea 100644
--- a/pkgs/stdenv/darwin/default.nix
+++ b/pkgs/stdenv/darwin/default.nix
@@ -90,11 +90,11 @@ in rec {
inherit shell;
inherit (last) stdenvNoCC;
- extraPackages = lib.optional (libcxx != null) libcxx;
+ extraPackages = [];
nativeTools = false;
nativeLibc = false;
- inherit buildPackages coreutils gnugrep bintools;
+ inherit buildPackages coreutils gnugrep bintools libcxx;
libc = last.pkgs.darwin.Libsystem;
isClang = true;
cc = { name = "${name}-clang"; outPath = bootstrapTools; };
@@ -168,8 +168,9 @@ in rec {
ln -s ${bootstrapTools}/lib/libc++.dylib $out/lib/libc++.dylib
ln -s ${bootstrapTools}/include/c++ $out/include/c++
'';
- linkCxxAbi = false;
- setupHook = ../../development/compilers/llvm/7/libc++/setup-hook.sh;
+ passthru = {
+ isLLVM = true;
+ };
};
libcxxabi = stdenv.mkDerivation {
diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix
index 21ae809a2225..c06f17b6fc19 100644
--- a/pkgs/stdenv/generic/check-meta.nix
+++ b/pkgs/stdenv/generic/check-meta.nix
@@ -108,7 +108,12 @@ let
You can install it anyway by whitelisting this package, using the
following methods:
- a) for `nixos-rebuild` you can add ‘${getName attrs}’ to
+ a) To temporarily allow all insecure packages, you can use an environment
+ variable for a single invocation of the nix tools:
+
+ $ export NIXPKGS_ALLOW_INSECURE=1
+
+ b) for `nixos-rebuild` you can add ‘${getName attrs}’ to
`nixpkgs.config.permittedInsecurePackages` in the configuration.nix,
like so:
@@ -118,9 +123,9 @@ let
];
}
- b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
- ‘${getName attrs}’ to `permittedInsecurePackages` in
- ~/.config/nixpkgs/config.nix, like so:
+ c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
+ ‘${getName attrs}’ to `permittedInsecurePackages` in
+ ~/.config/nixpkgs/config.nix, like so:
{
permittedInsecurePackages = [
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix
index e17b41eab320..b57989786904 100644
--- a/pkgs/stdenv/generic/default.nix
+++ b/pkgs/stdenv/generic/default.nix
@@ -138,8 +138,11 @@ let
is32bit is64bit
isAarch32 isAarch64 isMips isBigEndian;
- # The derivation's `system` is `buildPlatform.system`.
- inherit (buildPlatform) system;
+ # Override `system` so that packages can get the system of the host
+ # platform through `stdenv.system`. `system` is originally set to the
+ # build platform within the derivation above so that Nix directs the build
+ # to correct type of machine.
+ inherit (hostPlatform) system;
inherit (import ./make-derivation.nix {
inherit lib config stdenv;