Skip to content

Commit

Permalink
fix: using with nixpkgs config.allowAliases = false (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
amarshall authored Feb 26, 2024
1 parent 83cb93d commit 5ddecd6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions nix/mkNakedShell.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{ bashInteractive
, coreutils
, system
, stdenv
, writeTextFile
}:
let
bashPath = "${bashInteractive}/bin/bash";
stdenv = writeTextFile {
nakedStdenv = writeTextFile {
name = "naked-stdenv";
destination = "/setup";
text = ''
Expand All @@ -27,7 +27,9 @@ in
, passthru ? { }
}:
(derivation {
inherit name system;
inherit name;

system = stdenv.hostPlatform.system;

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

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

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

0 comments on commit 5ddecd6

Please sign in to comment.