diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-04-09 18:28:16 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-04-12 18:46:15 +0000 |
commit | fd2e737e0678ee7d8081baef05b305146a2c0034 (patch) | |
tree | ac3e9b27576a0382335532d126f9a66d486bc638 /nixpkgs/pkgs/shells | |
parent | cc207d720b6aa836e256c1ee9842bc739e630a8a (diff) | |
parent | 9e377a6ce42dccd9b624ae4ce8f978dc892ba0e2 (diff) | |
download | nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.gz nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.bz2 nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.lz nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.xz nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.zst nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.zip |
Merge remote-tracking branch 'nixpkgs/nixos-unstable'
Diffstat (limited to 'nixpkgs/pkgs/shells')
29 files changed, 319 insertions, 135 deletions
diff --git a/nixpkgs/pkgs/shells/any-nix-shell/default.nix b/nixpkgs/pkgs/shells/any-nix-shell/default.nix index 3a9f0a0bfbd1..3bd41a53844c 100644 --- a/nixpkgs/pkgs/shells/any-nix-shell/default.nix +++ b/nixpkgs/pkgs/shells/any-nix-shell/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "any-nix-shell"; - version = "1.2.0"; + version = "1.2.1"; src = fetchFromGitHub { owner = "haslersn"; repo = "any-nix-shell"; rev = "v${version}"; - sha256 = "05xixgsdfv0qk648r74nvazw16dpw49ryz8dax9kwmhqrgkjaqv6"; + sha256 = "0q27rhjhh7k0qgcdcfm8ly5za6wm4rckh633d0sjz87faffkp90k"; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/nixpkgs/pkgs/shells/bash/5.1.nix b/nixpkgs/pkgs/shells/bash/5.1.nix index 5dd060db7efb..d234b18e6c90 100644 --- a/nixpkgs/pkgs/shells/bash/5.1.nix +++ b/nixpkgs/pkgs/shells/bash/5.1.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { -DSSH_SOURCE_BASHRC ''; - patchFlags = [ "-p0" "-T" ]; + patchFlags = [ "-p0" ]; patches = upstreamPatches ++ [ ./pgrp-pipe-5.1.patch ]; diff --git a/nixpkgs/pkgs/shells/bash/pgrp-pipe-5.1.patch b/nixpkgs/pkgs/shells/bash/pgrp-pipe-5.1.patch index 2a9fa6f33c3b..478327cafc45 100644 --- a/nixpkgs/pkgs/shells/bash/pgrp-pipe-5.1.patch +++ b/nixpkgs/pkgs/shells/bash/pgrp-pipe-5.1.patch @@ -14,18 +14,3 @@ diff -u ./configure ../bash-5.0-fixed/configure netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;; *qnx[67]*) LOCAL_LIBS="-lncurses" ;; *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; -diff -u ./configure.ac ../bash-5.0-fixed/configure.ac ---- ./configure.ac 2019-01-02 15:39:11.000000000 +0100 -+++ ../bash-5.0-fixed/configure.ac 2019-01-02 15:39:11.000000000 +0100 -@@ -1108,10 +1108,7 @@ - solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; - lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; - linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading -- case "`uname -r`" in -- 1.*|2.[[0123]]*) : ;; -- *) AC_DEFINE(PGRP_PIPE) ;; -- esac ;; -+ AC_DEFINE(PGRP_PIPE) ;; - netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;; - *qnx[[67]]*) LOCAL_LIBS="-lncurses" ;; - *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; diff --git a/nixpkgs/pkgs/shells/dash/default.nix b/nixpkgs/pkgs/shells/dash/default.nix index 24d5af7e74ee..f044c41b73d6 100644 --- a/nixpkgs/pkgs/shells/dash/default.nix +++ b/nixpkgs/pkgs/shells/dash/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, buildPackages, autoreconfHook, fetchurl }: +{ lib, stdenv, buildPackages, autoreconfHook, fetchurl, libedit }: stdenv.mkDerivation rec { pname = "dash"; @@ -11,7 +11,6 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; - # Temporary fix until a proper one is accepted upstream patches = [ (fetchurl { # Dash executes code when noexec ("-n") is specified @@ -19,9 +18,18 @@ stdenv.mkDerivation rec { url = "https://git.kernel.org/pub/scm/utils/dash/dash.git/patch/?id=29d6f2148f10213de4e904d515e792d2cf8c968e"; sha256 = "08q90bx36ixwlcj331dh7420qyj8i0qh1cc1gljrhd83fhl9w0y5"; }) - ] ++ lib.optional stdenv.isDarwin ./0001-fix-dirent64-et-al-on-darwin.patch; + ] ++ lib.optionals stdenv.isDarwin [ + # Temporary fix until a proper one is accepted upstream + ./0001-fix-dirent64-et-al-on-darwin.patch + ]; + depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = lib.optional stdenv.isDarwin autoreconfHook; + buildInputs = [ libedit ]; + + configureFlags = [ "--with-libedit" ]; + + enableParallelBuilding = true; meta = with lib; { homepage = "http://gondor.apana.org.au/~herbert/dash/"; diff --git a/nixpkgs/pkgs/shells/es/default.nix b/nixpkgs/pkgs/shells/es/default.nix index 7b2251a3f440..5efb860c1d5f 100644 --- a/nixpkgs/pkgs/shells/es/default.nix +++ b/nixpkgs/pkgs/shells/es/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, readline, yacc }: +{ lib, stdenv, fetchurl, readline, bison }: let version = "0.9.1"; @@ -20,7 +20,7 @@ stdenv.mkDerivation { sourceRoot=. ''; - buildInputs = [ readline yacc ]; + buildInputs = [ readline bison ]; configureFlags = [ "--with-readline" ]; diff --git a/nixpkgs/pkgs/shells/fish/default.nix b/nixpkgs/pkgs/shells/fish/default.nix index 7e38d9dec3a1..b2677715d514 100644 --- a/nixpkgs/pkgs/shells/fish/default.nix +++ b/nixpkgs/pkgs/shells/fish/default.nix @@ -17,6 +17,7 @@ , python3 , cmake , fishPlugins +, procps , runCommand , writeText @@ -56,8 +57,12 @@ let # source both, but source the more global configuration files earlier # than the more local ones, so that more local configurations inherit # from but override the more global locations. + # + # Special care needs to be taken, when fish is called from an FHS user env + # or similar setup, because this configuration file will then be relocated + # to /etc/fish/config.fish, so we test for this case to avoid nontermination. - if test -f /etc/fish/config.fish + if test -f /etc/fish/config.fish && test /etc/fish/config.fish != (status filename) source /etc/fish/config.fish end @@ -126,7 +131,7 @@ let fish = stdenv.mkDerivation rec { pname = "fish"; - version = "3.1.2"; + version = "3.2.2"; src = fetchurl { # There are differences between the release tarball and the tarball GitHub @@ -135,13 +140,44 @@ let # the shell's actual version (and what it displays when running `fish # --version`), as well as the local documentation for all builtins (and # maybe other things). - url = "https://github.com/fish-shell/fish-shell/releases/download/${version}/${pname}-${version}.tar.gz"; - sha256 = "1vblmb3x2k2cb0db5jdyflppnlqsm7i6jjaidyhmvaaw7ch2gffm"; + url = "https://github.com/fish-shell/fish-shell/releases/download/${version}/${pname}-${version}.tar.xz"; + sha256 = "WUTaGoiT0RsIKKT9kTbuF0VJ2v+z0K392JF4Vv5rQAk="; }; - # We don't have access to the codesign executable, so we patch this out. - # For more information, see: https://github.com/fish-shell/fish-shell/issues/6952 - patches = lib.optional stdenv.isDarwin ./dont-codesign-on-mac.diff; + # Fix FHS paths in tests + postPatch = '' + # src/fish_tests.cpp + sed -i 's|/bin/ls|${coreutils}/bin/ls|' src/fish_tests.cpp + sed -i 's|is_potential_path(L"/usr"|is_potential_path(L"/nix"|' src/fish_tests.cpp + sed -i 's|L"/bin/echo"|L"${coreutils}/bin/echo"|' src/fish_tests.cpp + sed -i 's|L"/bin/c"|L"${coreutils}/bin/c"|' src/fish_tests.cpp + sed -i 's|L"/bin/ca"|L"${coreutils}/bin/ca"|' src/fish_tests.cpp + + # tests/checks/cd.fish + sed -i 's|/bin/pwd|${coreutils}/bin/pwd|' tests/checks/cd.fish + + # tests/checks/redirect.fish + sed -i 's|/bin/echo|${coreutils}/bin/echo|' tests/checks/redirect.fish + + # tests/checks/vars_as_commands.fish + sed -i 's|/usr/bin|${coreutils}/bin|' tests/checks/vars_as_commands.fish + + # tests/checks/jobs.fish + sed -i 's|ps -o stat|${procps}/bin/ps -o stat|' tests/checks/jobs.fish + sed -i 's|/bin/echo|${coreutils}/bin/echo|' tests/checks/jobs.fish + + # tests/checks/job-control-noninteractive.fish + sed -i 's|/bin/echo|${coreutils}/bin/echo|' tests/checks/job-control-noninteractive.fish + + # tests/checks/complete.fish + sed -i 's|/bin/ls|${coreutils}/bin/ls|' tests/checks/complete.fish + '' + lib.optionalString stdenv.isDarwin '' + # Tests use pkill/pgrep which are currently not built on Darwin + # See https://github.com/NixOS/nixpkgs/pull/103180 + rm tests/pexpects/exit.py + rm tests/pexpects/job_summary.py + rm tests/pexpects/signals.py + ''; nativeBuildInputs = [ cmake @@ -155,6 +191,8 @@ let cmakeFlags = [ "-DCMAKE_INSTALL_DOCDIR=${placeholder "out"}/share/doc/fish" + ] ++ lib.optionals stdenv.isDarwin [ + "-DMAC_CODESIGN_ID=OFF" ]; preConfigure = '' @@ -172,16 +210,23 @@ let gettext ] ++ lib.optional (!stdenv.isDarwin) man-db; + doCheck = true; + + checkInputs = [ + coreutils + (python3.withPackages (ps: [ ps.pexpect ])) + procps + ]; + + checkPhase = '' + make test + ''; + postInstall = with lib; '' sed -r "s|command grep|command ${gnugrep}/bin/grep|" \ -i "$out/share/fish/functions/grep.fish" - sed -i "s|which |${which}/bin/which |" \ - "$out/share/fish/functions/type.fish" sed -e "s|\|cut|\|${coreutils}/bin/cut|" \ -i "$out/share/fish/functions/fish_prompt.fish" - sed -e "s|gettext |${gettext}/bin/gettext |" \ - -e "s|which |${which}/bin/which |" \ - -i "$out/share/fish/functions/_.fish" sed -e "s|uname|${coreutils}/bin/uname|" \ -i "$out/share/fish/functions/__fish_pwd.fish" \ "$out/share/fish/functions/prompt_pwd.fish" @@ -251,7 +296,7 @@ let # if we don't set `delete=False`, the file will get cleaned up # automatically (leading the test to fail because there's no # tempfile to check) - sed -e "s@, mode='w'@, mode='w', delete=False@" -i webconfig.py + sed -e 's@, mode="w"@, mode="w", delete=False@' -i webconfig.py # we delete everything after the fileurl is assigned sed -e '/fileurl =/q' -i webconfig.py diff --git a/nixpkgs/pkgs/shells/fish/dont-codesign-on-mac.diff b/nixpkgs/pkgs/shells/fish/dont-codesign-on-mac.diff deleted file mode 100644 index c61350b0549f..000000000000 --- a/nixpkgs/pkgs/shells/fish/dont-codesign-on-mac.diff +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7d220a032..786b60e6e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -183,7 +183,6 @@ ENDFUNCTION(CODESIGN_ON_MAC target) - # Define a function to link dependencies. - FUNCTION(FISH_LINK_DEPS_AND_SIGN target) - TARGET_LINK_LIBRARIES(${target} fishlib) -- CODESIGN_ON_MAC(${target}) - ENDFUNCTION(FISH_LINK_DEPS_AND_SIGN) - - # Define libfish.a. diff --git a/nixpkgs/pkgs/shells/fish/plugins/build-fish-plugin.nix b/nixpkgs/pkgs/shells/fish/plugins/build-fish-plugin.nix index a52c57464929..5bb4ffa243fc 100644 --- a/nixpkgs/pkgs/shells/fish/plugins/build-fish-plugin.nix +++ b/nixpkgs/pkgs/shells/fish/plugins/build-fish-plugin.nix @@ -11,8 +11,6 @@ attrs@{ buildPhase ? ":", preInstall ? "", postInstall ? "", - # name of the subdirectory in which to store the plugin - installPath ? lib.getName pname, checkInputs ? [], # plugin packages to add to the vendor paths of the test fish shell @@ -26,7 +24,15 @@ attrs@{ ... }: -stdenv.mkDerivation (attrs // { +let + # Do not pass attributes that are only relevant to buildFishPlugin to mkDerivation. + drvAttrs = builtins.removeAttrs attrs [ + "checkPlugins" + "checkFunctionDirs" + ]; +in + +stdenv.mkDerivation (drvAttrs // { inherit name; inherit unpackPhase configurePhase buildPhase; diff --git a/nixpkgs/pkgs/shells/fish/plugins/clownfish.nix b/nixpkgs/pkgs/shells/fish/plugins/clownfish.nix new file mode 100644 index 000000000000..cd5c997d3114 --- /dev/null +++ b/nixpkgs/pkgs/shells/fish/plugins/clownfish.nix @@ -0,0 +1,20 @@ +{ lib, buildFishPlugin, fetchFromGitHub }: + +buildFishPlugin { + pname = "clownfish"; + version = "unstable-2021-01-17"; + + src = fetchFromGitHub { + owner = "IlanCosman"; + repo = "clownfish"; + rev = "a0db28d8280d05561b8f48c0465480725feeca4c"; + sha256 = "04xvikyrdm6yxh588vbpwvm04fas76pa7sigsaqrip7yh021xxab"; + }; + + meta = with lib; { + description = "Fish function to mock the behaviour of commands"; + homepage = "https://github.com/IlanCosman/clownfish"; + license = licenses.mit; + maintainers = with maintainers; [ pacien ]; + }; +} diff --git a/nixpkgs/pkgs/shells/fish/plugins/default.nix b/nixpkgs/pkgs/shells/fish/plugins/default.nix index e543d49516a8..50b8eb4d981e 100644 --- a/nixpkgs/pkgs/shells/fish/plugins/default.nix +++ b/nixpkgs/pkgs/shells/fish/plugins/default.nix @@ -4,10 +4,17 @@ lib.makeScope newScope (self: with self; { buildFishPlugin = callPackage ./build-fish-plugin.nix { }; + clownfish = callPackage ./clownfish.nix { }; + + # Fishtape 2.x and 3.x aren't compatible, + # but both versions are used in the tests of different other plugins. fishtape = callPackage ./fishtape.nix { }; + fishtape_3 = callPackage ./fishtape_3.nix { }; foreign-env = callPackage ./foreign-env { }; + fzf-fish = callPackage ./fzf-fish.nix { }; + pure = callPackage ./pure.nix { }; }) diff --git a/nixpkgs/pkgs/shells/fish/plugins/fishtape_3.nix b/nixpkgs/pkgs/shells/fish/plugins/fishtape_3.nix new file mode 100644 index 000000000000..893e6d65ffb3 --- /dev/null +++ b/nixpkgs/pkgs/shells/fish/plugins/fishtape_3.nix @@ -0,0 +1,25 @@ +{ lib, buildFishPlugin, fetchFromGitHub }: + +buildFishPlugin rec { + pname = "fishtape"; + version = "3.0.1"; + + src = fetchFromGitHub { + owner = "jorgebucaran"; + repo = "fishtape"; + rev = version; + sha256 = "072a3qbk1lpxw53bxp91drsffylx8fbywhss3x0jbnayn9m8i7aa"; + }; + + checkFunctionDirs = [ "./functions" ]; # fishtape is introspective + checkPhase = '' + fishtape tests/*.fish + ''; + + meta = with lib; { + description = "100% pure-Fish test runner"; + homepage = "https://github.com/jorgebucaran/fishtape"; + license = licenses.mit; + maintainers = with maintainers; [ pacien ]; + }; +} diff --git a/nixpkgs/pkgs/shells/fish/plugins/fzf-fish.nix b/nixpkgs/pkgs/shells/fish/plugins/fzf-fish.nix new file mode 100644 index 000000000000..51e7dcc096b8 --- /dev/null +++ b/nixpkgs/pkgs/shells/fish/plugins/fzf-fish.nix @@ -0,0 +1,34 @@ +{ lib, buildFishPlugin, fetchFromGitHub, fzf, clownfish, fishtape_3 }: + +buildFishPlugin rec { + pname = "fzf.fish"; + version = "5.6"; + + src = fetchFromGitHub { + owner = "PatrickF1"; + repo = "fzf.fish"; + rev = "v${version}"; + sha256 = "1b280n8bh00n4vkm19zrn84km52296ljlm1zhz95jgaiwymf2x73"; + }; + + checkInputs = [ fzf ]; + checkPlugins = [ clownfish fishtape_3 ]; + checkFunctionDirs = [ "./functions" ]; + checkPhase = '' + # Disable git tests which inspect the project's git repo, which isn't + # possible since we strip the impure .git from our build input + rm -r tests/*git* + + # Disable tests that are failing, probably because of our wrappers + rm -r tests/search_shell_variables + + fishtape tests/*/*.fish + ''; + + meta = with lib; { + description = "Augment your fish command line with fzf key bindings"; + homepage = "https://github.com/PatrickF1/fzf.fish"; + license = licenses.mit; + maintainers = with maintainers; [ pacien ]; + }; +} diff --git a/nixpkgs/pkgs/shells/fish/wrapper.nix b/nixpkgs/pkgs/shells/fish/wrapper.nix index 053568bc6b9b..6713a69d560e 100644 --- a/nixpkgs/pkgs/shells/fish/wrapper.nix +++ b/nixpkgs/pkgs/shells/fish/wrapper.nix @@ -14,12 +14,12 @@ let complPath = completionDirs ++ map (vendorDir "completions") pluginPkgs; funcPath = functionDirs ++ map (vendorDir "functions") pluginPkgs; confPath = confDirs ++ map (vendorDir "conf") pluginPkgs; - safeConfPath = map escapeShellArg confPath; in writeShellScriptBin "fish" '' ${fish}/bin/fish --init-command " set --prepend fish_complete_path ${escapeShellArgs complPath} set --prepend fish_function_path ${escapeShellArgs funcPath} - for c in {${concatStringsSep "," safeConfPath}}/*; source $c; end + set --local fish_conf_source_path ${escapeShellArgs confPath} + for c in $fish_conf_source_path/*; source $c; end " "$@" '') diff --git a/nixpkgs/pkgs/shells/ksh/default.nix b/nixpkgs/pkgs/shells/ksh/default.nix index 822f1dc3491b..cfd278aaca65 100644 --- a/nixpkgs/pkgs/shells/ksh/default.nix +++ b/nixpkgs/pkgs/shells/ksh/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, meson, ninja, fetchFromGitHub, which, python, fetchpatch +{ lib, stdenv, meson, ninja, fetchFromGitHub, which, python3, fetchpatch , libiconv }: stdenv.mkDerivation rec { @@ -19,10 +19,12 @@ stdenv.mkDerivation rec { }) ]; - nativeBuildInputs = [ meson ninja which python ]; + nativeBuildInputs = [ meson ninja which python3 ]; buildInputs = [ libiconv ]; + strictDeps = true; + meta = with lib; { description = "KornShell Command And Programming Language"; longDescription = '' diff --git a/nixpkgs/pkgs/shells/liquidprompt/default.nix b/nixpkgs/pkgs/shells/liquidprompt/default.nix index 4463d70cf526..5fa331b85401 100644 --- a/nixpkgs/pkgs/shells/liquidprompt/default.nix +++ b/nixpkgs/pkgs/shells/liquidprompt/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "liquidprompt"; - version = "1.12.1"; + version = "2.0.2"; src = fetchFromGitHub { owner = "nojhan"; repo = pname; rev = "v${version}"; - sha256 = "0vlwwkdbkxjsjcfmcspmq3f163kf0x4mwa8svxkzgnn2g4kl41ja"; + sha256 = "sha256-FXBClOkGRUey/FnLw3g3uiHUJeNiB4tXqP4Na6CuwIM="; }; installPhase = '' diff --git a/nixpkgs/pkgs/shells/mksh/default.nix b/nixpkgs/pkgs/shells/mksh/default.nix index c10537959d75..360380e19b34 100644 --- a/nixpkgs/pkgs/shells/mksh/default.nix +++ b/nixpkgs/pkgs/shells/mksh/default.nix @@ -1,4 +1,8 @@ -{ lib, stdenv, fetchurl }: +{ lib +, stdenv +, fetchurl +, installShellFiles +}: stdenv.mkDerivation rec { pname = "mksh"; @@ -6,20 +10,30 @@ stdenv.mkDerivation rec { src = fetchurl { urls = [ - "https://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R${version}.tgz" - "http://pub.allbsd.org/MirOS/dist/mir/mksh/mksh-R${version}.tgz" + "https://www.mirbsd.org/MirOS/dist/mir/mksh/${pname}-R${version}.tgz" + "http://pub.allbsd.org/MirOS/dist/mir/mksh/${pname}-R${version}.tgz" ]; - sha256 = "01n5ggw33bw4jv4d3148wlw9n4aj7vdn3ffnc66c9w9pldjidbkp"; + hash = "sha256-d64WZaM38cSMYda5Yds+UhGbOOWIhNHIloSvMfh7xQY="; }; + nativeBuildInputs = [ + installShellFiles + ]; + dontConfigure = true; - buildPhase = "sh ./Build.sh -r"; + buildPhase = '' + runHook preBuild + sh ./Build.sh -r + runHook postBuild + ''; installPhase = '' - install -D -m 755 mksh $out/bin/mksh - install -D -m 644 mksh.1 $out/share/man/man1/mksh.1 - install -D -m 644 dot.mkshrc $out/share/mksh/mkshrc + runHook preInstall + install -D mksh $out/bin/mksh + install -D dot.mkshrc $out/share/mksh/mkshrc + installManPage mksh.1 + runHook postInstall ''; meta = with lib; { @@ -32,7 +46,7 @@ stdenv.mkDerivation rec { systems. ''; homepage = "https://www.mirbsd.org/mksh.htm"; - license = licenses.bsd3; + license = with licenses; [ miros isc unicode-dfs-2016 ]; maintainers = with maintainers; [ AndersonTorres joachifm ]; platforms = platforms.unix; }; @@ -41,3 +55,5 @@ stdenv.mkDerivation rec { shellPath = "/bin/mksh"; }; } +# TODO [ AndersonTorres ]: lksh +# TODO [ AndersonTorres ]: a more accurate licensing info diff --git a/nixpkgs/pkgs/shells/mrsh/default.nix b/nixpkgs/pkgs/shells/mrsh/default.nix index 8efebb8f321d..be87b97ebd72 100644 --- a/nixpkgs/pkgs/shells/mrsh/default.nix +++ b/nixpkgs/pkgs/shells/mrsh/default.nix @@ -1,14 +1,14 @@ { lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, readline }: stdenv.mkDerivation rec { - pname = "mrsh"; - version = "2020-11-04"; + pname = "mrsh-unstable"; + version = "2021-01-10"; src = fetchFromGitHub { owner = "emersion"; repo = "mrsh"; - rev = "1738e41b2a35e5f99b9a1300a5f687478458226a"; - sha256 = "08gak5261d4sd6b2w2kscmdwa4gwcp5drgfyb3swyrj9cl0nlcbn"; + rev = "9f9884083831ea1f94bdda5151c5df3888932849"; + sha256 = "0vvdwzw3fq74lwgmy6xxkk01sd68fzhsw84c750lm1dma22xhjci"; }; nativeBuildInputs = [ meson ninja pkg-config ]; @@ -22,6 +22,9 @@ stdenv.mkDerivation rec { license = licenses.mit; maintainers = with maintainers; [ matthiasbeyer ]; platforms = platforms.unix; - broken = stdenv.isDarwin; + }; + + passthru = { + shellPath = "/bin/mrsh"; }; } diff --git a/nixpkgs/pkgs/shells/nushell/default.nix b/nixpkgs/pkgs/shells/nushell/default.nix index a0a070b92660..70022b5c2a8f 100644 --- a/nixpkgs/pkgs/shells/nushell/default.nix +++ b/nixpkgs/pkgs/shells/nushell/default.nix @@ -15,16 +15,16 @@ rustPlatform.buildRustPackage rec { pname = "nushell"; - version = "0.26.0"; + version = "0.29.0"; src = fetchFromGitHub { owner = pname; repo = pname; rev = version; - sha256 = "sha256-v0u04xY4iEbOTeaPKmbHImNTzEgdqf1wZWV0hKOV6Vg="; + sha256 = "sha256-RZz8hmcLOJRz0HpPXc3121B1UcbtDgCFv8Zdv29E+XQ="; }; - cargoSha256 = "sha256-0Ncjy6vZqiMNB+aRzf255tsIdrnpG0a4Xoid+mAAvUk="; + cargoSha256 = "sha256-V6Qdg8xSm2/6BbSEOH5mH92Gjx+xy0J2CZ9FQxmhI88="; nativeBuildInputs = [ pkg-config ] ++ lib.optionals (withStableFeatures && stdenv.isLinux) [ python3 ]; diff --git a/nixpkgs/pkgs/shells/oh/default.nix b/nixpkgs/pkgs/shells/oh/default.nix index 33e71358b4d5..68f34fe8eb17 100644 --- a/nixpkgs/pkgs/shells/oh/default.nix +++ b/nixpkgs/pkgs/shells/oh/default.nix @@ -1,23 +1,25 @@ -{ buildGoPackage, fetchgit, lib }: +{ buildGoModule, fetchFromGitHub, lib }: -buildGoPackage rec { +buildGoModule rec { pname = "oh"; - version = "20160522-${lib.strings.substring 0 7 rev}"; - rev = "0daaf4081475fb9d6b3801c85019bdd57b2ee9b4"; + version = "0.8.0"; - goPackagePath = "github.com/michaelmacinnis/oh"; - - src = fetchgit { - inherit rev; - url = "https://github.com/michaelmacinnis/oh"; - sha256 = "0ajidzs0aisbw74nri9ks6sx6644nmwkisc9mvxm3f89zmnlsgwr"; + src = fetchFromGitHub { + owner = "michaelmacinnis"; + repo = pname; + rev = "v${version}"; + sha256 = "0sdpk77i5mfamkdqldybl9znzz92hqgi4xvby5j28m0a5gw46kj0"; }; - goDeps = ./deps.nix; + vendorSha256 = "12vlvh37hvi8c1i9arppm5wj4v9c98s7myxra10q6qpdqssgc8a0"; - meta = with lib;{ + meta = with lib; { homepage = "https://github.com/michaelmacinnis/oh"; - description = "A Unix shell"; - license = lib.licenses.mit; + description = "A new Unix shell"; + license = licenses.mit; + }; + + passthru = { + shellPath = "/bin/oh"; }; } diff --git a/nixpkgs/pkgs/shells/oh/deps.nix b/nixpkgs/pkgs/shells/oh/deps.nix deleted file mode 100644 index b4b98f10c3aa..000000000000 --- a/nixpkgs/pkgs/shells/oh/deps.nix +++ /dev/null @@ -1,29 +0,0 @@ -[ - { - goPackagePath = "golang.org/x/sys"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/sys"; - rev = "d9157a9621b69ad1d8d77a1933590c416593f24f"; - sha256 = "1asdbp7rj1j1m1aar1a022wpcwbml6zih6cpbxaw7b2m8v8is931"; - }; - } - { - goPackagePath = "github.com/michaelmacinnis/adapted"; - fetch = { - type = "git"; - url = "https://github.com/michaelmacinnis/adapted"; - rev = "0dd5fa34d6f9d74c7c0deed1fc224f9a87e02978"; - sha256 = "16n3a87m33pqx4qih713q3gw2j6ksj1q3ngjax6bpn5b11rqvikv"; - }; - } - { - goPackagePath = "github.com/peterh/liner"; - fetch = { - type = "git"; - url = "https://github.com/peterh/liner"; - rev = "ad1edfd30321d8f006ccf05f1e0524adeb943060"; - sha256 = "0c24d9j1gnq7r982h1l2isp3d37379qw155hr8ihx9i2mhpfz317"; - }; - } -] diff --git a/nixpkgs/pkgs/shells/oil/default.nix b/nixpkgs/pkgs/shells/oil/default.nix index 0c508d0e29df..9df88affb9f1 100644 --- a/nixpkgs/pkgs/shells/oil/default.nix +++ b/nixpkgs/pkgs/shells/oil/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "oil"; - version = "0.8.7"; + version = "0.8.8"; src = fetchurl { url = "https://www.oilshell.org/download/oil-${version}.tar.xz"; - sha256 = "sha256-KcXu1u/MvvbCLb5a7D09NvfJPaeo0c8Z/Czuk7XR23M="; + sha256 = "sha256-J9aNuw72qufoVY6VnbdpCtpcI6GAI7ON10XGEJuqieI="; }; postPatch = '' @@ -33,6 +33,7 @@ stdenv.mkDerivation rec { ]; maintainers = with lib.maintainers; [ lheckemann alva ]; + changelog = "https://www.oilshell.org/release/${version}/changelog.html"; }; passthru = { diff --git a/nixpkgs/pkgs/shells/powershell/default.nix b/nixpkgs/pkgs/shells/powershell/default.nix index 3f9d7130811a..dfc4f94e12b6 100644 --- a/nixpkgs/pkgs/shells/powershell/default.nix +++ b/nixpkgs/pkgs/shells/powershell/default.nix @@ -4,8 +4,8 @@ let platformString = if stdenv.isDarwin then "osx" else if stdenv.isLinux then "linux" else throw "unsupported platform"; - platformSha = if stdenv.isDarwin then "0zv02h3njphrs8kgmicy7w40mmhmigdfl38f2dpwrs6z67f8vrm2" - else if stdenv.isLinux then "0dka2q8ijg3ryzwmxapf8aq55d0sgaj6jj0rzj2738in9g4w2hbh" + platformSha = if stdenv.isDarwin then "0w44ws8b6zfixf7xz93hmplqsx18279n9x8j77y4rbzs13fldvsn" + else if stdenv.isLinux then "0xm7l49zhkz2fly3d751kjd5cy3ws9zji9i0061lkd06dvkch7jy" else throw "unsupported platform"; platformLdLibraryPath = if stdenv.isDarwin then "DYLD_FALLBACK_LIBRARY_PATH" else if stdenv.isLinux then "LD_LIBRARY_PATH" @@ -15,7 +15,7 @@ let platformString = if stdenv.isDarwin then "osx" in stdenv.mkDerivation rec { pname = "powershell"; - version = "7.1.0"; + version = "7.1.3"; src = fetchzip { url = "https://github.com/PowerShell/PowerShell/releases/download/v${version}/powershell-${version}-${platformString}-x64.tar.gz"; diff --git a/nixpkgs/pkgs/shells/xonsh/default.nix b/nixpkgs/pkgs/shells/xonsh/default.nix index 53bd137ddfae..a2cc4206620e 100644 --- a/nixpkgs/pkgs/shells/xonsh/default.nix +++ b/nixpkgs/pkgs/shells/xonsh/default.nix @@ -8,14 +8,14 @@ python3Packages.buildPythonApplication rec { pname = "xonsh"; - version = "0.9.24"; + version = "0.9.27"; # fetch from github because the pypi package ships incomplete tests src = fetchFromGitHub { owner = "xonsh"; repo = "xonsh"; rev = version; - sha256 = "1nk7kbiv7jzmr6narsnr0nyzkhlc7xw3b2bksyq2j6nda67b9b3y"; + sha256 = "09w6bl3qsygfs2ph2r423ndnbd74bzf67vp8587h2dkkfxlzjbad"; }; LC_ALL = "en_US.UTF-8"; @@ -34,7 +34,7 @@ python3Packages.buildPythonApplication rec { doCheck = !stdenv.isDarwin; checkPhase = '' - HOME=$TMPDIR pytest -k 'not test_repath_backslash and not test_os and not test_man_completion and not test_builtins and not test_main and not test_ptk_highlight and not test_pyghooks' + HOME=$TMPDIR pytest -k 'not test_repath_backslash and not test_os and not test_man_completion and not test_builtins and not test_main and not test_ptk_highlight and not test_pyghooks and not test_command_pipeline_capture and not test_git_dirty_working_directory_includes_untracked and not test_dirty_working_directory and not test_vc_get_branch' HOME=$TMPDIR pytest -k 'test_builtins or test_main' --reruns 5 HOME=$TMPDIR pytest -k 'test_ptk_highlight' ''; @@ -46,7 +46,7 @@ python3Packages.buildPythonApplication rec { meta = with lib; { description = "A Python-ish, BASHwards-compatible shell"; homepage = "https://xon.sh/"; - changelog = "https://github.com/xonsh/xonsh/releases/tag/${version}"; + changelog = "https://github.com/xonsh/xonsh/raw/${version}/CHANGELOG.rst"; license = licenses.bsd3; maintainers = with maintainers; [ spwhitt vrthra ]; platforms = platforms.all; diff --git a/nixpkgs/pkgs/shells/zsh/lambda-mod-zsh-theme/default.nix b/nixpkgs/pkgs/shells/zsh/lambda-mod-zsh-theme/default.nix index d9a846c9e06f..e8d00d73d1aa 100644 --- a/nixpkgs/pkgs/shells/zsh/lambda-mod-zsh-theme/default.nix +++ b/nixpkgs/pkgs/shells/zsh/lambda-mod-zsh-theme/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation { description = "A ZSH theme optimized for people who use Git & Unicode-compatible fonts and terminals"; homepage = "https://github.com/halfo/lambda-mod-zsh-theme/"; license = licenses.mit; - platforms = platforms.linux; + platforms = platforms.all; maintainers = with maintainers; [ ma27 ]; }; } diff --git a/nixpkgs/pkgs/shells/zsh/oh-my-zsh/default.nix b/nixpkgs/pkgs/shells/zsh/oh-my-zsh/default.nix index e957457c8c3b..7f39b7d82269 100644 --- a/nixpkgs/pkgs/shells/zsh/oh-my-zsh/default.nix +++ b/nixpkgs/pkgs/shells/zsh/oh-my-zsh/default.nix @@ -5,18 +5,20 @@ , git, nix, nixfmt, jq, coreutils, gnused, curl, cacert }: stdenv.mkDerivation rec { - version = "2021-02-09"; + version = "2021-04-07"; pname = "oh-my-zsh"; - rev = "f21e646ce6c09198f7f625c597f08af49551fdb0"; + rev = "3f50482674c2b3153590a4aba92fbfa1c01bc583"; src = fetchFromGitHub { inherit rev; owner = "ohmyzsh"; repo = "ohmyzsh"; - sha256 = "14m932zbzdbwyfqkn882jarpw4dbmxkfna5pakd4n5b123drjz46"; + sha256 = "1ypx15p4c3mrs99xwkii3hwzlpk34mdldlymwiwad1c1ihw1r7r9"; }; installPhase = '' + runHook preInstall + outdir=$out/share/oh-my-zsh template=templates/zshrc.zsh-template @@ -64,6 +66,8 @@ stdenv.mkDerivation rec { . ~/.zsh_aliases fi EOF + + runHook postInstall ''; passthru = { @@ -115,6 +119,6 @@ stdenv.mkDerivation rec { homepage = "https://ohmyz.sh/"; license = licenses.mit; platforms = platforms.all; - maintainers = with maintainers; [ scolobb nequissimus ]; + maintainers = with maintainers; [ nequissimus ]; }; } diff --git a/nixpkgs/pkgs/shells/zsh/zsh-autosuggestions/default.nix b/nixpkgs/pkgs/shells/zsh/zsh-autosuggestions/default.nix index da5560998f8b..b55ca3735146 100644 --- a/nixpkgs/pkgs/shells/zsh/zsh-autosuggestions/default.nix +++ b/nixpkgs/pkgs/shells/zsh/zsh-autosuggestions/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchFromGitHub, zsh }: -# To make use of this derivation, use the `programs.zsh.enableAutoSuggestions` option +# To make use of this derivation, use the `programs.zsh.autosuggestions.enable` option stdenv.mkDerivation rec { pname = "zsh-autosuggestions"; diff --git a/nixpkgs/pkgs/shells/zsh/zsh-clipboard/clipboard.plugin.zsh b/nixpkgs/pkgs/shells/zsh/zsh-clipboard/clipboard.plugin.zsh new file mode 100644 index 000000000000..f1f190ec70c3 --- /dev/null +++ b/nixpkgs/pkgs/shells/zsh/zsh-clipboard/clipboard.plugin.zsh @@ -0,0 +1,40 @@ +_cb-yank() { + AA=$(clippaste 2>/dev/null) && CUTBUFFER="$AA" + zle yank +} +_cb-kill-line() { + zle kill-line + printf "%s" "$CUTBUFFER" | clipcopy 2>/dev/null +} +_cb-kill-whole-line() { + zle kill-whole-line + printf "%s" "$CUTBUFFER" | clipcopy 2>/dev/null +} +_cb-kill-word() { + zle kill-word + printf "%s" "$CUTBUFFER" | clipcopy 2>/dev/null +} +_cb-backward-kill-word() { + zle backward-kill-word + printf "%s" "$CUTBUFFER" | clipcopy 2>/dev/null +} +_cb-copy-region-as-kill() { + ## https://unix.stackexchange.com/questions/19947/ + zle copy-region-as-kill + zle set-mark-command -n -1 + printf "%s" "$CUTBUFFER" | clipcopy 2>/dev/null +} + +zle -N _cb-yank +zle -N _cb-kill-line +zle -N _cb-kill-whole-line +zle -N _cb-kill-word +zle -N _cb-backward-kill-word +zle -N _cb-copy-region-as-kill + +bindkey '^y' _cb-yank +bindkey '^k' _cb-kill-line +bindkey '^u' _cb-kill-whole-line +bindkey '\ed' _cb-kill-word +bindkey '\e^?' _cb-backward-kill-word +bindkey '\ew' _cb-copy-region-as-kill diff --git a/nixpkgs/pkgs/shells/zsh/zsh-clipboard/default.nix b/nixpkgs/pkgs/shells/zsh/zsh-clipboard/default.nix new file mode 100644 index 000000000000..114e0bfd7dc5 --- /dev/null +++ b/nixpkgs/pkgs/shells/zsh/zsh-clipboard/default.nix @@ -0,0 +1,27 @@ +{ stdenv, lib }: + +stdenv.mkDerivation rec { + pname = "zsh-clipboard"; + version = "1.0"; + + src = ./.; + + dontBuild = true; + + installPhase = '' + install -D -m0444 -t $out/share/zsh/plugins/clipboard ./clipboard.plugin.zsh + ''; + + meta = with lib; { + description = "Ohmyzsh plugin that integrates kill-ring with system clipboard"; + longDescription = '' + Ohmyzsh plugin that integrates kill-ring with system clipboard. + + Key bindings for C-y, C-k, C-u, M-d, M-backspace and M-w are rebound. + Behaviour of these keys should not be changed. + ''; + license = licenses.mit; + maintainers = with maintainers; [ bb2020 ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/shells/zsh/zsh-fzf-tab/default.nix b/nixpkgs/pkgs/shells/zsh/zsh-fzf-tab/default.nix index b48eda0a728a..ee0f702780f3 100644 --- a/nixpkgs/pkgs/shells/zsh/zsh-fzf-tab/default.nix +++ b/nixpkgs/pkgs/shells/zsh/zsh-fzf-tab/default.nix @@ -4,13 +4,13 @@ let INSTALL_PATH="${placeholder "out"}/share/fzf-tab"; in stdenv.mkDerivation rec { pname = "zsh-fzf-tab"; - version = "unstable-2021-01-24"; + version = "unstable-2021-04-01"; src = fetchFromGitHub { owner = "Aloxaf"; repo = "fzf-tab"; - rev = "78b4cefb27dc2bef5e4c9ac3bf2bd28413620fcd"; - sha256 = "1f5m7vf7wxzczis2nzvhgqaqnphhp3a0wv8b612m7g4fnvk3lnkn"; + rev = "0c36bdcf6a80ec009280897f07f56969f94d377e"; + sha256 = "0ymp9ky0jlkx9b63jajvpac5g3ll8snkf8q081g0yw42b9hwpiid"; }; buildInputs = [ ncurses ]; |