Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Be mindful about the default arguments passed to nixpkgs in nix-shell
Starting with 6eeb6f9 Nix started injecting `inNixShell` unconditonally into all nix-shell calls. This caused to a minor breakage with old Nix expressions that had a thin wrapper around nixpkgs. While we can fix those projects we should try to be backwards compatible in this regard. The error encountered in those cases looked like this: error: anonymous function at /home/andi/dev/nixos/nix/tests/shell-empty-attrs-args.nix:1:1 called with unexpected argument 'inNixShell' at «string»:1:18: 1| {...}@Args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (foo) (run) (echo "$(foo)") ]; } "" | ^ … while evaluating anonymous lambda at «string»:1:1: 1| {...}@Args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (foo) (run) (echo "$(foo)") ]; } "" | ^ … from call site
- Loading branch information