1

I am experimenting with the Nix package manager on macOS. The bash package I got from Nix doesn’t seem to have readline support enabled:

$ nix-env -i bash
installing ‘bash-4.3-p46’
building path(s) ‘/nix/store/468xvd20nj86yr6k16g2918849f3w7pn-user-environment’
created 119 symlinks in user environment
$ bash
Restored session: Thu Nov 24 14:21:31 CET 2016
$ foo^A^K

How do I get Bash with readline from Nix?

  • Have you tried nix-env -i readline? – Zimm i48 Nov 25 '16 at 17:04
  • Didn’t previously. Did just now, didn’t help. – zoul Nov 25 '16 at 17:12
4

Are you passing a boolean true to the expression for the 'interactive' attribute? It appears this is required in the expression for the bash package for readline support.

There's also an expression with the boolean already supplied so nix-env -iA nixpkgs.bashInteractive should give bash with readline support enabled.

  • I didn’t know the right syntax to install packages by attributes, this looks like it should work. I have already aborted my Nix experiment (too much hassle right now), but when I return to it later, I will give it a try. Thank you! – zoul Nov 29 '16 at 14:42
  • @zoul: Installing by attribute is definitely the recommended way. There is talk of making it the default way as well, I think. – Zimm i48 Dec 2 '16 at 14:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .