Skip to content

Commit 5ddecd6

Browse files
authored
fix: using with nixpkgs config.allowAliases = false (#302)
1 parent 83cb93d commit 5ddecd6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

nix/mkNakedShell.nix

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{ bashInteractive
22
, coreutils
3-
, system
3+
, stdenv
44
, writeTextFile
55
}:
66
let
77
bashPath = "${bashInteractive}/bin/bash";
8-
stdenv = writeTextFile {
8+
nakedStdenv = writeTextFile {
99
name = "naked-stdenv";
1010
destination = "/setup";
1111
text = ''
@@ -27,7 +27,9 @@ in
2727
, passthru ? { }
2828
}:
2929
(derivation {
30-
inherit name system;
30+
inherit name;
31+
32+
system = stdenv.hostPlatform.system;
3133

3234
# `nix develop` actually checks and uses builder. And it must be bash.
3335
builder = bashPath;
@@ -37,7 +39,7 @@ in
3739

3840
# $stdenv/setup is loaded by nix-shell during startup.
3941
# https://github.com/nixos/nix/blob/377345e26f1ac4bbc87bb21debcc52a1d03230aa/src/nix-build/nix-build.cc#L429-L432
40-
stdenv = stdenv;
42+
stdenv = nakedStdenv;
4143

4244
# The shellHook is loaded directly by `nix develop`. But nix-shell
4345
# requires that other trampoline.

0 commit comments

Comments
 (0)