diff options
author | Shea Levy <shea@shealevy.com> | 2011-09-23 16:58:45 +0000 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2011-09-23 16:58:45 +0000 |
commit | 01df54f5cc19244915417a606e23d4b0b8c94c06 (patch) | |
tree | 87dac4390baec5d6d4f6397523d5abada0a79557 /pkgs/shells | |
parent | 99863cb87b3231e6bfef139a7b54c35f6aa63a16 (diff) | |
parent | 8770aaea0ee564e99befb4a5c28e260f94b4b359 (diff) |
Merge from trunk
svn path=/nixpkgs/branches/stdenv-updates/; revision=29461
Diffstat (limited to 'pkgs/shells')
-rw-r--r-- | pkgs/shells/bash-completion/default.nix | 1 | ||||
-rw-r--r-- | pkgs/shells/bash/default.nix | 12 |
2 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/shells/bash-completion/default.nix b/pkgs/shells/bash-completion/default.nix index 0cda358b8efbe..916c7600dfd0f 100644 --- a/pkgs/shells/bash-completion/default.nix +++ b/pkgs/shells/bash-completion/default.nix @@ -14,6 +14,7 @@ stdenv.mkDerivation { postInstall = '' rm $out/etc/profile.d/bash_completion.sh rmdir $out/etc/profile.d + sed -i -e "s|/etc/bash_completion|$out/etc/bash_completion|g" $out/etc/bash_completion ''; meta = { diff --git a/pkgs/shells/bash/default.nix b/pkgs/shells/bash/default.nix index 5de0a2fae7df5..6f39d627bdb95 100644 --- a/pkgs/shells/bash/default.nix +++ b/pkgs/shells/bash/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, readline ? null, interactive ? false, texinfo ? null, bison}: +{stdenv, fetchurl, readline ? null, interactive ? false, texinfo ? null, bison, bashCompletion ? null}: assert interactive -> readline != null; @@ -47,18 +47,22 @@ stdenv.mkDerivation rec { buildNativeInputs = [bison] ++ stdenv.lib.optional (texinfo != null) texinfo ++ stdenv.lib.optional interactive readline; - + postInstall = '' # Add an `sh' -> `bash' symlink. ln -s bash "$out/bin/sh" + '' + (if interactive && bashCompletion != null then '' + ensureDir "$out/etc" + echo >"$out/etc/bash_completion" '. "${bashCompletion}/etc/bash_completion"' + '' else '' # Install the completion examples. ensureDir "$out/etc" cp -v "examples/complete/bash_completion" "$out/etc" ensureDir "$out/etc/bash_completion.d" cp -v "examples/complete/complete.gnu-longopt" "$out/etc/bash_completion.d" - ''; + ''); meta = { homepage = http://www.gnu.org/software/bash/; @@ -79,7 +83,7 @@ stdenv.mkDerivation rec { license = "GPLv3+"; - maintainers = [ stdenv.lib.maintainers.ludo ]; + maintainers = [ stdenv.lib.maintainers.ludo stdenv.lib.maintainers.simons ]; platforms = stdenv.lib.platforms.all; }; |