Nixpkgs: No man page for ed, the standard text editor

Created on 29 Nov 2017  ยท  4Comments  ยท  Source: NixOS/nixpkgs

Issue description

There seems to be no man page for ed, the standard text editor.

Steps to reproduce

$ 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

Technical details

$ 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`

Most helpful comment

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

All 4 comments

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:

  • [x] Confirm it's ok to not set the DESTDIR
    [ ] Check if the FIXME comment in the source about Darwin is solved.

Yes, removing DESTDIR is usually the correct option.

Fixed by #32322.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ayyess picture ayyess  ยท  3Comments

copumpkin picture copumpkin  ยท  3Comments

yawnt picture yawnt  ยท  3Comments

langston-barrett picture langston-barrett  ยท  3Comments

ghost picture ghost  ยท  3Comments