target / lorri

Your project's nix-env
Apache License 2.0
993 stars 69 forks source link

Lorri does not use bashInteractive like nix-shell #488

Open erikarvstedt opened 3 years ago

erikarvstedt commented 3 years ago

Description Lorri uses pkgs.bash instead of pkgs.bashInteractive like nix-shell, causing some shell derivations to fail.

Reproduce Lorri fails when evaluating the following shell.nix. Reason: shellHook uses the function compgen which is unavailable in noninteractive bash.

{ pkgs ? import <nixpkgs> {} }:

pkgs.mkShell {
 shellHook = ''
   compgen -e
 '';
}

Expected behavior Lorri should support all shell derivations that work with nix-shell.

Details I'm using compgen in nix-shells in the context of export -n $(compgen -e) to clear exports and reexport specific variables.

If lorri would use bashInteractive, the following workaround could be removed: https://github.com/target/lorri/pull/392