summaryrefslogtreecommitdiff
path: root/pkgs/shells
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/shells')
-rw-r--r--pkgs/shells/bash/5.1.nix6
-rw-r--r--pkgs/shells/bash/undistract-me/default.nix79
-rw-r--r--pkgs/shells/fish/default.nix10
-rw-r--r--pkgs/shells/fish/plugins/default.nix2
-rw-r--r--pkgs/shells/fish/plugins/forgit.nix6
-rw-r--r--pkgs/shells/hilbish/default.nix26
-rw-r--r--pkgs/shells/ion/default.nix13
-rw-r--r--pkgs/shells/nushell/default.nix9
-rw-r--r--pkgs/shells/oil/default.nix6
-rw-r--r--pkgs/shells/powershell/default.nix6
-rw-r--r--pkgs/shells/zsh/antibody/default.nix2
-rw-r--r--pkgs/shells/zsh/zsh-z/default.nix28
12 files changed, 172 insertions, 21 deletions
diff --git a/pkgs/shells/bash/5.1.nix b/pkgs/shells/bash/5.1.nix
index 3bce408ce8c7..21d26dbe5b12 100644
--- a/pkgs/shells/bash/5.1.nix
+++ b/pkgs/shells/bash/5.1.nix
@@ -7,14 +7,14 @@
# patch for cygwin requires readline support
, interactive ? stdenv.isCygwin
-, readline80 ? null
+, readline81 ? null
, withDocs ? false
, texinfo ? null
}:
with lib;
-assert interactive -> readline80 != null;
+assert interactive -> readline81 != null;
assert withDocs -> texinfo != null;
assert stdenv.hostPlatform.isDarwin -> binutils != null;
let
@@ -74,7 +74,7 @@ stdenv.mkDerivation rec {
++ optional withDocs texinfo
++ optional stdenv.hostPlatform.isDarwin binutils;
- buildInputs = optional interactive readline80;
+ buildInputs = optional interactive readline81;
enableParallelBuilding = true;
diff --git a/pkgs/shells/bash/undistract-me/default.nix b/pkgs/shells/bash/undistract-me/default.nix
new file mode 100644
index 000000000000..e6641d9039c5
--- /dev/null
+++ b/pkgs/shells/bash/undistract-me/default.nix
@@ -0,0 +1,79 @@
+{ lib
+, stdenvNoCC
+, fetchFromGitHub
+, fetchpatch
+, coreutils
+, gnused
+, libnotify
+, pulseaudio
+, sound-theme-freedesktop
+, xprop
+}:
+
+stdenvNoCC.mkDerivation rec {
+ pname = "undistract-me";
+ version = "unstable-2020-08-09";
+
+ src = fetchFromGitHub {
+ owner = "jml";
+ repo = pname;
+ rev = "2f8ac25c6ad8efcf160d2b480825b1cbb6772aab";
+ hash = "sha256-Qw7Cu9q0ZgK/RTvyDdHM5N3eBaKjtYqYH0J+hKMUZX8=";
+ };
+
+ patches = [
+ # Don't block the terminal when notification sound is played
+ #
+ # See https://github.com/jml/undistract-me/pull/69
+ (fetchpatch {
+ url = "https://github.com/jml/undistract-me/commit/2356ebbe8bf2bcb4b95af1ae2bcdc786ce7cc6e8.patch";
+ sha256 = "sha256-Ij3OXTOnIQsYhKVmqjChhN1q4ASZ7waOkfQTTp5XfPo=";
+ })
+
+ # Fix showing notifications when using Wayland apps with XWayland
+ # running, or connection to X server fails.
+ #
+ # NOTE: Without a real X server, notifications will not be
+ # suppressed when the window running the command is focused.
+ #
+ # See https://github.com/jml/undistract-me/pull/71
+ (fetchpatch {
+ url = "https://github.com/jml/undistract-me/commit/3f4ceaf5a4eba8e3cb02236c48247f87e3d1124f.patch";
+ sha256 = "sha256-9AK9Jp3TXJ75Y+jwZXlwQ6j54FW1rOBddoktrm0VX68=";
+ })
+ ];
+
+ # Patch in dependencies. Can't use makeWrapper because the bash
+ # functions will be sourced and invoked in a different environment
+ # for each command invocation.
+ postPatch = ''
+ for script in *.bash *.sh; do
+ substituteInPlace "$script" \
+ --replace /usr/share/undistract-me "$out/share/undistract-me" \
+ --replace basename ${coreutils}/bin/basename \
+ --replace 'cut ' '${coreutils}/bin/cut ' \
+ --replace date ${coreutils}/bin/date \
+ --replace dirname ${coreutils}/bin/dirname \
+ --replace sed ${gnused}/bin/sed \
+ --replace notify-send ${libnotify}/bin/notify-send \
+ --replace paplay ${pulseaudio}/bin/paplay \
+ --replace /usr/share/sounds/freedesktop ${sound-theme-freedesktop}/share/sounds/freedesktop \
+ --replace xprop ${xprop}/bin/xprop
+ done
+ '';
+
+ installPhase = ''
+ mkdir -p "$out/share/undistract-me" "$out/etc/profile.d" "$out/share/licenses/undistract-me"
+ cp long-running.bash "$out/share/undistract-me"
+ cp preexec.bash "$out/share/undistract-me"
+ cp undistract-me.sh "$out/etc/profile.d"
+ cp LICENSE "$out/share/licenses/undistract-me"
+ '';
+
+ meta = with lib; {
+ description = "Notifies you when long-running terminal commands complete";
+ homepage = "https://github.com/jml/undistract-me";
+ license = licenses.mit;
+ maintainers = with maintainers; [ metadark ];
+ };
+}
diff --git a/pkgs/shells/fish/default.nix b/pkgs/shells/fish/default.nix
index b2677715d514..a5754290426d 100644
--- a/pkgs/shells/fish/default.nix
+++ b/pkgs/shells/fish/default.nix
@@ -19,6 +19,9 @@
, fishPlugins
, procps
+# used to generate autocompletions from manpages and for configuration editing in the browser
+, usePython ? true
+
, runCommand
, writeText
, nixosTests
@@ -200,12 +203,10 @@ let
'';
# Required binaries during execution
- # Python: Autocompletion generated from manpages and config editing
propagatedBuildInputs = [
coreutils
gnugrep
gnused
- python3
groff
gettext
] ++ lib.optional (!stdenv.isDarwin) man-db;
@@ -233,18 +234,17 @@ let
sed -e "s|sed |${gnused}/bin/sed |" \
-i "$out/share/fish/functions/alias.fish" \
"$out/share/fish/functions/prompt_pwd.fish"
- sed -i "s|nroff |${groff}/bin/nroff |" \
+ sed -i "s|nroff|${groff}/bin/nroff|" \
"$out/share/fish/functions/__fish_print_help.fish"
sed -e "s|clear;|${getBin ncurses}/bin/clear;|" \
-i "$out/share/fish/functions/fish_default_key_bindings.fish"
- sed -e "s|python3|${getBin python3}/bin/python3|" \
- -i $out/share/fish/functions/{__fish_config_interactive.fish,fish_config.fish,fish_update_completions.fish}
sed -i "s|/usr/local/sbin /sbin /usr/sbin||" \
$out/share/fish/completions/{sudo.fish,doas.fish}
sed -e "s| awk | ${gawk}/bin/awk |" \
-i $out/share/fish/functions/{__fish_print_packages.fish,__fish_print_addresses.fish,__fish_describe_command.fish,__fish_complete_man.fish,__fish_complete_convert_options.fish} \
$out/share/fish/completions/{cwebp,adb,ezjail-admin,grunt,helm,heroku,lsusb,make,p4,psql,rmmod,vim-addons}.fish
+ '' + optionalString usePython ''
cat > $out/share/fish/functions/__fish_anypython.fish <<EOF
function __fish_anypython
echo ${python3.interpreter}
diff --git a/pkgs/shells/fish/plugins/default.nix b/pkgs/shells/fish/plugins/default.nix
index 42252ccbe38c..0ce172ec489a 100644
--- a/pkgs/shells/fish/plugins/default.nix
+++ b/pkgs/shells/fish/plugins/default.nix
@@ -15,7 +15,7 @@ lib.makeScope newScope (self: with self; {
foreign-env = callPackage ./foreign-env { };
- forgit-fish = callPackage ./forgit.nix { };
+ forgit = callPackage ./forgit.nix { };
fzf-fish = callPackage ./fzf-fish.nix { };
diff --git a/pkgs/shells/fish/plugins/forgit.nix b/pkgs/shells/fish/plugins/forgit.nix
index b905b7a25895..5fc647c73ee3 100644
--- a/pkgs/shells/fish/plugins/forgit.nix
+++ b/pkgs/shells/fish/plugins/forgit.nix
@@ -4,7 +4,11 @@ buildFishPlugin rec {
pname = "forgit";
version = "unstable-2021-04-09";
- buildInputs = [ git fzf ];
+ preFixup = ''
+ substituteInPlace $out/share/fish/vendor_conf.d/forgit.plugin.fish \
+ --replace "fzf " "${fzf}/bin/fzf " \
+ --replace "git " "${git}/bin/git "
+ '';
src = fetchFromGitHub {
owner = "wfxr";
diff --git a/pkgs/shells/hilbish/default.nix b/pkgs/shells/hilbish/default.nix
new file mode 100644
index 000000000000..e0449ce24c22
--- /dev/null
+++ b/pkgs/shells/hilbish/default.nix
@@ -0,0 +1,26 @@
+{ lib, buildGoModule, fetchFromGitHub, readline }:
+
+buildGoModule rec {
+ pname = "hilbish";
+ version = "0.4.0";
+
+ src = fetchFromGitHub {
+ owner = "Hilbis";
+ repo = "Hilbish";
+ rev = "v${version}";
+ sha256 = "sha256-7YJkjkA6lGyO4PwJcdeUzqQvFsslDfIqAH6vlBtyYz8=";
+ };
+
+ vendorSha256 = "sha256-9FftzTn5nxjfsHStcnrn9a+sECmcHRBUEtFjsMp8/ks=";
+
+ buildInputs = [ readline ];
+
+ meta = with lib; {
+ description = "An interactive Unix-like shell written in Go";
+ changelog = "https://github.com/Hilbis/Hilbish/releases/tag/v${version}";
+ homepage = "https://github.com/Hilbis/Hilbish";
+ maintainers = with maintainers; [ fortuneteller2k ];
+ license = licenses.mit;
+ platforms = platforms.linux; # only officially supported on Linux
+ };
+}
diff --git a/pkgs/shells/ion/default.nix b/pkgs/shells/ion/default.nix
index 77691e99b255..f20c80810a0b 100644
--- a/pkgs/shells/ion/default.nix
+++ b/pkgs/shells/ion/default.nix
@@ -1,17 +1,17 @@
-{ lib, stdenv, fetchFromGitHub, rustPlatform, Security }:
+{ lib, stdenv, fetchFromGitHub, rustPlatform, Security, libiconv }:
rustPlatform.buildRustPackage rec {
pname = "ion";
- version = "unstable-2020-03-22";
+ version = "unstable-2021-05-10";
src = fetchFromGitHub {
owner = "redox-os";
repo = "ion";
- rev = "1fbd29a6d539faa6eb0f3186a361e208d0a0bc05";
- sha256 = "0r5c87cs8jlc9kpb6bi2aypldw1lngf6gzjirf13gi7iy4q08ik7";
+ rev = "1170b84587bbad260a3ecac8e249a216cb1fd5e9";
+ sha256 = "sha256-lI1GwA3XerRJaC/Z8vTZc6GzRDLjv3w768C+Ui6Q+3Q=";
};
- cargoSha256 = "1ph3r3vspy700mb8pica8478v9arqz07k2nzpbrdkdkqgfcwlgcg";
+ cargoSha256 = "sha256-hURpgxc99iIMtzIlR6Kbfqcbu1uYLDHnfVLqgmMbvFA=";
meta = with lib; {
description = "Modern system shell with simple (and powerful) syntax";
@@ -22,8 +22,11 @@ rustPlatform.buildRustPackage rec {
buildInputs = lib.optional stdenv.hostPlatform.isDarwin [
Security
+ libiconv
];
+ doCheck = !stdenv.hostPlatform.isDarwin;
+
passthru = {
shellPath = "/bin/ion";
};
diff --git a/pkgs/shells/nushell/default.nix b/pkgs/shells/nushell/default.nix
index 98a73e1acd38..7d4b04d3c94b 100644
--- a/pkgs/shells/nushell/default.nix
+++ b/pkgs/shells/nushell/default.nix
@@ -10,6 +10,8 @@
, libiconv
, AppKit
, Security
+, nghttp2
+, libgit2
, withStableFeatures ? true
}:
@@ -32,10 +34,15 @@ rustPlatform.buildRustPackage rec {
buildInputs = [ openssl ]
++ lib.optionals stdenv.isDarwin [ zlib libiconv Security ]
++ lib.optionals (withStableFeatures && stdenv.isLinux) [ xorg.libX11 ]
- ++ lib.optionals (withStableFeatures && stdenv.isDarwin) [ AppKit ];
+ ++ lib.optionals (withStableFeatures && stdenv.isDarwin) [ AppKit nghttp2 libgit2 ];
cargoBuildFlags = lib.optional withStableFeatures "--features stable";
+ # TODO investigate why tests are broken on darwin
+ # failures show that tests try to write to paths
+ # outside of TMPDIR
+ doCheck = ! stdenv.isDarwin;
+
checkPhase = ''
runHook preCheck
echo "Running cargo test"
diff --git a/pkgs/shells/oil/default.nix b/pkgs/shells/oil/default.nix
index 9df88affb9f1..654476bd5ae0 100644
--- a/pkgs/shells/oil/default.nix
+++ b/pkgs/shells/oil/default.nix
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "oil";
- version = "0.8.8";
+ version = "0.8.11";
src = fetchurl {
url = "https://www.oilshell.org/download/oil-${version}.tar.xz";
- sha256 = "sha256-J9aNuw72qufoVY6VnbdpCtpcI6GAI7ON10XGEJuqieI=";
+ sha256 = "sha256-GVV+532dPrXkQ3X2+wa4u6aCPBvQAIiypeoqzJqvk9Y=";
};
postPatch = ''
@@ -37,6 +37,6 @@ stdenv.mkDerivation rec {
};
passthru = {
- shellPath = "/bin/osh";
+ shellPath = "/bin/osh";
};
}
diff --git a/pkgs/shells/powershell/default.nix b/pkgs/shells/powershell/default.nix
index dfc4f94e12b6..cedf578d46ab 100644
--- a/pkgs/shells/powershell/default.nix
+++ b/pkgs/shells/powershell/default.nix
@@ -38,6 +38,9 @@ stdenv.mkDerivation rec {
rm -f $pslibs/libcrypto${ext}.1.0.0
rm -f $pslibs/libssl${ext}.1.0.0
+ # At least the 7.1.3-osx package does not have the executable bit set.
+ chmod a+x $pslibs/pwsh
+
ls $pslibs
'' + lib.optionalString (!stdenv.isDarwin) ''
patchelf --replace-needed libcrypto${ext}.1.0.0 libcrypto${ext}.1.1 $pslibs/libmi.so
@@ -55,7 +58,8 @@ stdenv.mkDerivation rec {
doInstallCheck = true;
installCheckPhase = ''
- $out/bin/pwsh --help > /dev/null
+ # May need a writable home, seen on Darwin.
+ HOME=$TMP $out/bin/pwsh --help > /dev/null
'';
meta = with lib; {
diff --git a/pkgs/shells/zsh/antibody/default.nix b/pkgs/shells/zsh/antibody/default.nix
index bcf091f8e769..d5c197d5da6e 100644
--- a/pkgs/shells/zsh/antibody/default.nix
+++ b/pkgs/shells/zsh/antibody/default.nix
@@ -21,6 +21,6 @@ buildGoModule rec {
description = "The fastest shell plugin manager";
homepage = "https://github.com/getantibody/antibody";
license = licenses.mit;
- maintainers = with maintainers; [ Br1ght0ne worldofpeace ];
+ maintainers = with maintainers; [ Br1ght0ne ];
};
}
diff --git a/pkgs/shells/zsh/zsh-z/default.nix b/pkgs/shells/zsh/zsh-z/default.nix
new file mode 100644
index 000000000000..9623ff6648cd
--- /dev/null
+++ b/pkgs/shells/zsh/zsh-z/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenvNoCC, fetchFromGitHub }:
+
+stdenvNoCC.mkDerivation rec {
+ pname = "zsh-z";
+ version = "unstable-2021-02-15";
+
+ src = fetchFromGitHub {
+ owner = "agkozak";
+ repo = pname;
+ rev = "595c883abec4682929ffe05eb2d088dd18e97557";
+ sha256 = "sha256-HnwUWqzwavh/Qox+siOe5lwTp7PBdiYx+9M0NMNFx00=";
+ };
+
+ dontBuild = true;
+
+ installPhase = ''
+ mkdir -p $out/share/zsh-z
+ cp _zshz zsh-z.plugin.zsh $out/share/zsh-z
+ '';
+
+ meta = with lib; {
+ description = "Jump quickly to directories that you have visited frequently in the past, or recently";
+ homepage = "https://github.com/agkozak/zsh-z";
+ license = licenses.mit;
+ platforms = platforms.unix;
+ maintainers = [ maintainers.evalexpr ];
+ };
+}