ncurses: move runtime utilities to $out

All the programs provided by ncurses were being installed to the $dev
output, but several of them are intended for runtime use, e.g. to
operate on the running terminal. These user-facing programs are moved to
the $bin output.

Several packages referred to "${ncurses}/bin" or "${ncurses.dev}/bin" at
runtime; these paths are also updated to refer to "${ncurses.bin}/bin".
wip/yesman
Thomas Tuegel 8 years ago
parent 3ef7671cea
commit da972b6cc4
  1. 2
      pkgs/applications/misc/girara/default.nix
  2. 2
      pkgs/applications/misc/zathura/core/default.nix
  3. 8
      pkgs/development/libraries/ncurses/default.nix
  4. 2
      pkgs/development/tools/misc/drush/default.nix
  5. 2
      pkgs/shells/fish/default.nix
  6. 2
      pkgs/tools/misc/entr/default.nix

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
buildInputs = [ pkgconfig gtk gettext ];
makeFlags = [ "PREFIX=$(out)" ]
++ optional withBuildColors "TPUT=${ncurses.dev}/bin/tput"
++ optional withBuildColors "TPUT=${ncurses.out}/bin/tput"
++ optional (!withBuildColors) "TPUT_AVAILABLE=0"
;

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
"PREFIX=$(out)"
"RSTTOMAN=${docutils}/bin/rst2man.py"
"VERBOSE=1"
"TPUT=${ncurses.dev}/bin/tput"
"TPUT=${ncurses.out}/bin/tput"
];
postInstall = ''

@ -98,6 +98,14 @@ stdenv.mkDerivation rec {
ln -svf ''${library}$suffix.pc $dev/lib/pkgconfig/$library$newsuffix.pc
done
done
# move some utilities to $bin
# these programs are used at runtime and don't really belong in $dev
moveToOutput "bin/clear" "$out"
moveToOutput "bin/reset" "$out"
moveToOutput "bin/tabs" "$out"
moveToOutput "bin/tput" "$out"
moveToOutput "bin/tset" "$out"
'';
preFixup = ''

@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
mkdir -p "$out"
cp -r . "$out/src"
mkdir "$out/bin"
wrapProgram "$out/src/drush" --prefix PATH : "${which}/bin:${php}/bin:${bash}/bin:${coreutils}/bin:${ncurses.dev}/bin"
wrapProgram "$out/src/drush" --prefix PATH : "${which}/bin:${php}/bin:${bash}/bin:${coreutils}/bin:${ncurses.out}/bin"
ln -s "$out/src/drush" "$out/bin/drush"
'';
}

@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
-i "$out/share/fish/functions/alias.fish" \
"$out/share/fish/functions/prompt_pwd.fish"
substituteInPlace "$out/share/fish/functions/fish_default_key_bindings.fish" \
--replace "clear;" "${ncurses}/bin/clear;"
--replace "clear;" "${ncurses.out}/bin/clear;"
'' + stdenv.lib.optionalString stdenv.isLinux ''
substituteInPlace "$out/share/fish/functions/__fish_print_help.fish" \
--replace "| ul" "| ${utillinux}/bin/ul"

@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
postPatch = ''
substituteInPlace Makefile.bsd --replace /bin/echo echo
substituteInPlace entr.c --replace /bin/cat ${coreutils}/bin/cat
substituteInPlace entr.c --replace /usr/bin/clear ${ncurses.dev}/bin/clear
substituteInPlace entr.c --replace /usr/bin/clear ${ncurses.out}/bin/clear
substituteInPlace entr.1 --replace /bin/cat cat
substituteInPlace entr.1 --replace /usr/bin/clear clear
'';

Loading…
Cancel
Save