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".
This commit is contained in:
Thomas Tuegel 2016-02-01 11:18:39 -06:00
parent 3ef7671cea
commit da972b6cc4
6 changed files with 13 additions and 5 deletions

View file

@ -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"
;

View file

@ -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 = ''

View file

@ -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 = ''

View file

@ -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"
'';
}

View file

@ -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"

View file

@ -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
'';