Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

shellHook fails when sourcing bash completions #492

Open
haslersn opened this issue Jan 26, 2021 · 1 comment
Open

shellHook fails when sourcing bash completions #492

haslersn opened this issue Jan 26, 2021 · 1 comment

Comments

@haslersn
Copy link

The following shell.nix works with nix-shell but fails with Lorri:

with import <nixpkgs> {};

mkShell {
  nativeBuildInputs = [
    kubectl
  ];
  shellHook = ''
    source <(kubectl completion bash)
  '';
}

Metadata

  • Lorri 1.2
  • fish
  • But somebody else had the same problem using bash.
Jan 26 21:03:02.550 INFO build message, message: BuildEvent(Started { nix_file: NixFile("/home/haslersn/shelltest/shell.nix"), reason: ProjectAdded(NixFile("/home/haslersn/shelltest/shell.nix")) }), expr: /home/haslersn/shelltest/shell.nix
Jan 26 21:03:03.969 INFO build message, message: BuildEvent(Failure { nix_file: NixFile("/home/haslersn/shelltest/shell.nix"), failure: Exit { cmd: "\"nix-build\" \"--out-link\" \"/tmp/.tmpTn7wKi/result\" \"--\" \"/tmp/.tmpObKCvv/result\"", status: Some(100), logs: [LogLine("these derivations will be built:"), LogLine("  /nix/store/hwrxhq6rnabcypfnpfczq9ayn2lpaydb-lorri-keep-env-hack-nix-shell.drv"), LogLine("building \'/nix/store/hwrxhq6rnabcypfnpfczq9ayn2lpaydb-lorri-keep-env-hack-nix-shell.drv\'..."), LogLine("/dev/fd/63: line 12982: complete: command not found"), LogLine("builder for \'/nix/store/hwrxhq6rnabcypfnpfczq9ayn2lpaydb-lorri-keep-env-hack-nix-shell.drv\' failed with exit code 127"), LogLine("error: build of \'/nix/store/hwrxhq6rnabcypfnpfczq9ayn2lpaydb-lorri-keep-env-hack-nix-shell.drv\' failed")] } }), expr: /home/haslersn/shelltest/shell.nix
$ uname -a
Linux beaver 5.4.91 #1-NixOS SMP Tue Jan 19 17:26:19 UTC 2021 x86_64 GNU/Linux
@neumantm
Copy link

I guess the cause is, that a non interactive bash is used by lorri.
Therefore this issue is relaeted to #488

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants