From da972b6cc40b4be7492df1661a522e12bf747807 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Mon, 1 Feb 2016 11:18:39 -0600 Subject: [PATCH] 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". --- pkgs/applications/misc/girara/default.nix | 2 +- pkgs/applications/misc/zathura/core/default.nix | 2 +- pkgs/development/libraries/ncurses/default.nix | 8 ++++++++ pkgs/development/tools/misc/drush/default.nix | 2 +- pkgs/shells/fish/default.nix | 2 +- pkgs/tools/misc/entr/default.nix | 2 +- 6 files changed, 13 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/misc/girara/default.nix b/pkgs/applications/misc/girara/default.nix index 6598c13253bb..cfa38a118614 100644 --- a/pkgs/applications/misc/girara/default.nix +++ b/pkgs/applications/misc/girara/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" ; diff --git a/pkgs/applications/misc/zathura/core/default.nix b/pkgs/applications/misc/zathura/core/default.nix index f09c971351f3..62e7ee60cb3e 100644 --- a/pkgs/applications/misc/zathura/core/default.nix +++ b/pkgs/applications/misc/zathura/core/default.nix @@ -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 = '' diff --git a/pkgs/development/libraries/ncurses/default.nix b/pkgs/development/libraries/ncurses/default.nix index ed582fd3ed13..edd263605960 100644 --- a/pkgs/development/libraries/ncurses/default.nix +++ b/pkgs/development/libraries/ncurses/default.nix @@ -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 = '' diff --git a/pkgs/development/tools/misc/drush/default.nix b/pkgs/development/tools/misc/drush/default.nix index 0751f51281de..72bbe50422ca 100644 --- a/pkgs/development/tools/misc/drush/default.nix +++ b/pkgs/development/tools/misc/drush/default.nix @@ -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" ''; } diff --git a/pkgs/shells/fish/default.nix b/pkgs/shells/fish/default.nix index 521212940672..5dcf61a55562 100644 --- a/pkgs/shells/fish/default.nix +++ b/pkgs/shells/fish/default.nix @@ -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" diff --git a/pkgs/tools/misc/entr/default.nix b/pkgs/tools/misc/entr/default.nix index a99e28c6f817..69ddbd6dbfe7 100644 --- a/pkgs/tools/misc/entr/default.nix +++ b/pkgs/tools/misc/entr/default.nix @@ -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 '';