There seems to be no man page for ed, the standard text editor.
$ nix-shell --pure -p ed -p man -p less \
-I nixpkgs=https://github.com/NixOS/nixpkgs/archive/master.tar.gz
$ man ed
No manual entry for ed
$ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 4.9.58, NixOS, 17.09.1880.ac2bb5684c (Hummingbird)`
- multi-user?: `yes`
- sandbox: `no`
- version: `nix-env (Nix) 1.11.15`
- channels(root): `"nixos-17.09.1880.ac2bb5684c"`
- channels(kristoffer): `"nixpkgs-17.09pre112229.e619ace733"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs`
It looks like an issue in how ed installs things:
$ tree /nix/store/ann881y0l5f72fim46mnzc13yy4xf6p2-ed-1.14.2/
/nix/store/ann881y0l5f72fim46mnzc13yy4xf6p2-ed-1.14.2/
โโโ bin
โย ย โโโ ed
โย ย โโโ red
โโโ nix
โโโ store
โโโ ann881y0l5f72fim46mnzc13yy4xf6p2-ed-1.14.2
โโโ share
โโโ info
โย ย โโโ ed.info
โโโ man
โโโ man1
โโโ ed.1
โโโ red.1 -> ed.1
8 directories, 5 files
The target directory is set with:
installFlags = [ "DESTDIR=$(out)" ];
configureFlags = [
"--exec-prefix=${stdenv.cc.prefix}"
"CC=${stdenv.cc.prefix}cc"
];
There's another configure flag, --prefix, that defaults to /usr/local. I think nix automatically replaces that by $(out). Resulting in $(out)/$(out).
--exec-prefix would default to '$(prefix)`, but since it was set, the bin files ended up in the right place.
Not setting any installFlags results in a correct tree. It basically lets nix figure it out.
# installFlags = [ "DESTDIR=$(out)" ];
configureFlags = [
"--exec-prefix=${stdenv.cc.prefix}"
"CC=${stdenv.cc.prefix}cc"
];
I noticed @Ericson2314 very recently replaced stdenv.cc.prefix by `stdenv.cc.targetPrefix'.
Todo:
DESTDIRFIXME comment in the source about Darwin is solved.Yes, removing DESTDIR is usually the correct option.
Fixed by #32322.
Most helpful comment
It looks like an issue in how ed installs things: