uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
29
pkgs/shells/any-nix-shell/default.nix
Normal file
29
pkgs/shells/any-nix-shell/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, stdenv, fetchFromGitHub, makeWrapper, bash }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "any-nix-shell";
|
||||
version = "1.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "haslersn";
|
||||
repo = "any-nix-shell";
|
||||
rev = "v${version}";
|
||||
sha256 = "0q27rhjhh7k0qgcdcfm8ly5za6wm4rckh633d0sjz87faffkp90k";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ bash ];
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp -r bin $out
|
||||
wrapProgram $out/bin/any-nix-shell --prefix PATH ":" $out/bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "fish and zsh support for nix-shell";
|
||||
license = licenses.mit;
|
||||
homepage = "https://github.com/haslersn/any-nix-shell";
|
||||
maintainers = with maintainers; [ haslersn ];
|
||||
};
|
||||
}
|
||||
138
pkgs/shells/bash/5.1.nix
Normal file
138
pkgs/shells/bash/5.1.nix
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
{ lib, stdenv
|
||||
, buildPackages
|
||||
, fetchurl
|
||||
, binutils ? null
|
||||
, bison
|
||||
, util-linux
|
||||
|
||||
# patch for cygwin requires readline support
|
||||
, interactive ? stdenv.isCygwin
|
||||
, readline81 ? null
|
||||
, withDocs ? false
|
||||
, texinfo ? null
|
||||
, forFHSEnv ? false
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
assert interactive -> readline81 != null;
|
||||
assert withDocs -> texinfo != null;
|
||||
assert stdenv.hostPlatform.isDarwin -> binutils != null;
|
||||
let
|
||||
upstreamPatches = import ./bash-5.1-patches.nix (nr: sha256: fetchurl {
|
||||
url = "mirror://gnu/bash/bash-5.1-patches/bash51-${nr}";
|
||||
inherit sha256;
|
||||
});
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "bash-${optionalString interactive "interactive-"}${version}-p${toString (builtins.length upstreamPatches)}";
|
||||
version = "5.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/bash/bash-${version}.tar.gz";
|
||||
sha256 = "1alv68wplnfdm6mh39hm57060xgssb9vqca4yr1cyva0c342n0fc";
|
||||
};
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
outputs = [ "out" "dev" "man" "doc" "info" ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = ''
|
||||
-DSYS_BASHRC="/etc/bashrc"
|
||||
-DSYS_BASH_LOGOUT="/etc/bash_logout"
|
||||
'' + optionalString (!forFHSEnv) ''
|
||||
-DDEFAULT_PATH_VALUE="/no-such-path"
|
||||
-DSTANDARD_UTILS_PATH="/no-such-path"
|
||||
'' + ''
|
||||
-DNON_INTERACTIVE_LOGIN_SHELLS
|
||||
-DSSH_SOURCE_BASHRC
|
||||
'';
|
||||
|
||||
patchFlags = [ "-p0" ];
|
||||
|
||||
patches = upstreamPatches
|
||||
++ [ ./pgrp-pipe-5.1.patch ];
|
||||
|
||||
configureFlags = [
|
||||
(if interactive then "--with-installed-readline" else "--disable-readline")
|
||||
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
"bash_cv_job_control_missing=nomissing"
|
||||
"bash_cv_sys_named_pipes=nomissing"
|
||||
"bash_cv_getcwd_malloc=yes"
|
||||
] ++ optionals stdenv.hostPlatform.isCygwin [
|
||||
"--without-libintl-prefix"
|
||||
"--without-libiconv-prefix"
|
||||
"--with-installed-readline"
|
||||
"bash_cv_dev_stdin=present"
|
||||
"bash_cv_dev_fd=standard"
|
||||
"bash_cv_termcap_lib=libncurses"
|
||||
] ++ optionals (stdenv.hostPlatform.libc == "musl") [
|
||||
"--without-bash-malloc"
|
||||
"--disable-nls"
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
# Note: Bison is needed because the patches above modify parse.y.
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
nativeBuildInputs = [ bison ]
|
||||
++ optional withDocs texinfo
|
||||
++ optional stdenv.hostPlatform.isDarwin binutils;
|
||||
|
||||
buildInputs = optional interactive readline81;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
makeFlags = optional stdenv.hostPlatform.isCygwin [
|
||||
"LOCAL_LDFLAGS=-Wl,--export-all,--out-implib,libbash.dll.a"
|
||||
"SHOBJ_LIBS=-lbash"
|
||||
];
|
||||
|
||||
checkInputs = [ util-linux ];
|
||||
doCheck = false; # dependency cycle, needs to be interactive
|
||||
|
||||
postInstall = ''
|
||||
ln -s bash "$out/bin/sh"
|
||||
rm -f $out/lib/bash/Makefile.inc
|
||||
'';
|
||||
|
||||
postFixup =
|
||||
if interactive
|
||||
then ''
|
||||
substituteInPlace "$out/bin/bashbug" \
|
||||
--replace '#!/bin/sh' "#!$out/bin/bash"
|
||||
''
|
||||
# most space is taken by locale data
|
||||
else ''
|
||||
rm -rf "$out/share" "$out/bin/bashbug"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.gnu.org/software/bash/";
|
||||
description =
|
||||
"GNU Bourne-Again Shell, the de facto standard shell on Linux" +
|
||||
(if interactive then " (for interactive use)" else "");
|
||||
|
||||
longDescription = ''
|
||||
Bash is the shell, or command language interpreter, that will
|
||||
appear in the GNU operating system. Bash is an sh-compatible
|
||||
shell that incorporates useful features from the Korn shell
|
||||
(ksh) and C shell (csh). It is intended to conform to the IEEE
|
||||
POSIX P1003.2/ISO 9945.2 Shell and Tools standard. It offers
|
||||
functional improvements over sh for both programming and
|
||||
interactive use. In addition, most sh scripts can be run by
|
||||
Bash without modification.
|
||||
'';
|
||||
|
||||
license = licenses.gpl3Plus;
|
||||
|
||||
platforms = platforms.all;
|
||||
|
||||
maintainers = with maintainers; [ dtzWill ];
|
||||
|
||||
mainProgram = "bash";
|
||||
};
|
||||
|
||||
passthru = {
|
||||
shellPath = "/bin/bash";
|
||||
};
|
||||
}
|
||||
20
pkgs/shells/bash/bash-5.1-patches.nix
Normal file
20
pkgs/shells/bash/bash-5.1-patches.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# Automatically generated by `update-patch-set.sh'; do not edit.
|
||||
|
||||
patch: [
|
||||
(patch "001" "1ymm8ppss6gyh9ifznjwiabrb4k91npd09c10y7mk66xp8yppc7b")
|
||||
(patch "002" "1gjx9zqcm407am3n2sh44b8dxm48kgm15rzfiijqxr01m0hn3shm")
|
||||
(patch "003" "1cdnpbfc64yhvkjj4d12s9ywp11g195vzfl1cab24sq55wkcrwi2")
|
||||
(patch "004" "11iwhy6v562bv0kk7lwj7f5jj65ma9bblivy0v02h3ggcibbdbls")
|
||||
(patch "005" "19bdyigdr81824nxvqr6a7k0cax60wq7376j6b91afbnwvlvbjyc")
|
||||
(patch "006" "051x8wlwrqk0yr0zg378vh824iklfl5g9pkmcdf62qp8gn9pvqbm")
|
||||
(patch "007" "0fir80pp1gmlpadmqcgkrv4y119pc7xllchjzg05fd7px73viz5c")
|
||||
(patch "008" "1lfjgshk8i9vch92p5wgc9r90j3phw79aa7gbai89w183b2z6b7j")
|
||||
(patch "009" "1vn36dzd9g4y1h3jiss6418crla0rbcd0d6wwsyv9d5l7aaxlp74")
|
||||
(patch "010" "0amfmvbzsand7bdypylkjdpcp88fa3cplfshn7vyzv2ff2rdgj52")
|
||||
(patch "011" "0yq24abb4fzfxqnwl20b330sxl9lr9ds0nc4yi30f81l94b1y6aq")
|
||||
(patch "012" "165bff97ffih49vfs4mkr5w3z5gn1w6zfyrf773iajkw6v48kw8h")
|
||||
(patch "013" "1bfmgv3lagbk3aq9a831d29xv7jz4sjq7jhn9hq89limyinvdb67")
|
||||
(patch "014" "1l43dw4kpddn7l41i8wmj406z9abxky1wb3rk8krcys33g4f0kka")
|
||||
(patch "015" "1w40vzadzx019v0zhs4q6yqycrk04x1k8xs6qb73vk7ny4p6jdqv")
|
||||
(patch "016" "0krqqljz4bkp9wrdnwfx51bxkb8rkwf8ivc93as1znx5fr7i96c8")
|
||||
]
|
||||
74
pkgs/shells/bash/bash-completion/default.nix
Normal file
74
pkgs/shells/bash/bash-completion/default.nix
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
{ lib, stdenv, fetchurl
|
||||
, fetchpatch
|
||||
, autoreconfHook
|
||||
, perl
|
||||
, ps
|
||||
, python3Packages
|
||||
, bashInteractive
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bash-completion";
|
||||
version = "2.11";
|
||||
|
||||
# Using fetchurl because fetchGithub or fetchzip will have trouble on
|
||||
# e.g. APFS filesystems (macOS) because of non UTF-8 characters in some of the
|
||||
# test fixtures that are part of the repository.
|
||||
# See discussion in https://github.com/NixOS/nixpkgs/issues/107768
|
||||
src = fetchurl {
|
||||
url = "https://github.com/scop/${pname}/releases/download/${version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "1b0iz7da1sgifx1a5wdyx1kxbzys53v0kyk8nhxfipllmm5qka3k";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
|
||||
# tests are super flaky unfortunately, and regularily break.
|
||||
# let's disable them for now.
|
||||
doCheck = false;
|
||||
checkInputs = [
|
||||
# perl is assumed by perldoc completion
|
||||
perl
|
||||
# ps assumed to exist by gdb, killall, pgrep, pidof,
|
||||
# pkill, pwdx, renice, and reptyr completions
|
||||
ps
|
||||
python3Packages.pexpect
|
||||
python3Packages.pytest
|
||||
bashInteractive
|
||||
];
|
||||
|
||||
# - ignore test_gcc on ARM because it assumes -march=native
|
||||
# - ignore test_chsh because it assumes /etc/shells exists
|
||||
# - ignore test_ether_wake, test_ifdown, test_ifstat, test_ifup,
|
||||
# test_iperf, test_iperf3, test_nethogs and ip_addresses
|
||||
# because they try to touch network
|
||||
# - ignore test_ls because impure logic
|
||||
# - ignore test_screen because it assumes vt terminals exist
|
||||
checkPhase = ''
|
||||
pytest . \
|
||||
${lib.optionalString (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isAarch32) "--ignore=test/t/test_gcc.py"} \
|
||||
--ignore=test/t/test_chsh.py \
|
||||
--ignore=test/t/test_ether_wake.py \
|
||||
--ignore=test/t/test_ifdown.py \
|
||||
--ignore=test/t/test_ifstat.py \
|
||||
--ignore=test/t/test_ifup.py \
|
||||
--ignore=test/t/test_iperf.py \
|
||||
--ignore=test/t/test_iperf3.py \
|
||||
--ignore=test/t/test_nethogs.py \
|
||||
--ignore=test/t/unit/test_unit_ip_addresses.py \
|
||||
--ignore=test/t/test_ls.py \
|
||||
--ignore=test/t/test_screen.py
|
||||
'';
|
||||
|
||||
prePatch = lib.optionalString stdenv.isDarwin ''
|
||||
sed -i -e 's/readlink -f/readlink/g' bash_completion completions/*
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/scop/bash-completion";
|
||||
description = "Programmable completion for the bash shell";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.unix;
|
||||
maintainers = [ maintainers.xfix ];
|
||||
};
|
||||
}
|
||||
43
pkgs/shells/bash/nix-bash-completions/default.nix
Normal file
43
pkgs/shells/bash/nix-bash-completions/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.6.8";
|
||||
pname = "nix-bash-completions";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hedning";
|
||||
repo = "nix-bash-completions";
|
||||
rev = "v${version}";
|
||||
sha256 = "1n5zs6xcnv4bv1hdaypmz7fv4j7dsr4a0ifah99iyj4p5j85i1bc";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
# To enable lazy loading via. bash-completion we need a symlink to the script
|
||||
# from every command name.
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
commands=$(
|
||||
function complete() { shift 2; echo "$@"; }
|
||||
shopt -s extglob
|
||||
source _nix
|
||||
)
|
||||
install -Dm444 -t $out/share/bash-completion/completions _nix
|
||||
cd $out/share/bash-completion/completions
|
||||
for c in $commands; do
|
||||
ln -s _nix $c
|
||||
done
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/hedning/nix-bash-completions";
|
||||
description = "Bash completions for Nix, NixOS, and NixOps";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ hedning ];
|
||||
# Set a lower priority such that the newly provided completion from Nix 2.4 are preferred.
|
||||
priority = 10;
|
||||
};
|
||||
}
|
||||
16
pkgs/shells/bash/pgrp-pipe-5.1.patch
Normal file
16
pkgs/shells/bash/pgrp-pipe-5.1.patch
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
diff -u ./configure ../bash-5.0-fixed/configure
|
||||
--- ./configure 2019-01-02 15:43:31.000000000 +0100
|
||||
+++ ../bash-5.0-fixed/configure 2020-01-08 14:18:21.017296179 +0100
|
||||
@@ -16312,11 +16312,7 @@
|
||||
solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
|
||||
lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
|
||||
linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
|
||||
- case "`uname -r`" in
|
||||
- 1.*|2.[0123]*) : ;;
|
||||
- *) $as_echo "#define PGRP_PIPE 1" >>confdefs.h
|
||||
- ;;
|
||||
- esac ;;
|
||||
+ $as_echo "#define PGRP_PIPE 1" >>confdefs.h ;;
|
||||
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" ;;
|
||||
81
pkgs/shells/bash/undistract-me/default.nix
Normal file
81
pkgs/shells/bash/undistract-me/default.nix
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
{ 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=";
|
||||
})
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
# 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; [ kira-bruneau ];
|
||||
};
|
||||
}
|
||||
52
pkgs/shells/bash/update-patch-set.sh
Executable file
52
pkgs/shells/bash/update-patch-set.sh
Executable file
|
|
@ -0,0 +1,52 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell --pure -i bash -p wget -p gnupg -p cacert -p nix
|
||||
|
||||
# Update patch set for GNU Bash or Readline.
|
||||
|
||||
if [ $# -ne 2 ]
|
||||
then
|
||||
echo "Usage: $(basename "$0") PROJECT VERSION"
|
||||
echo ""
|
||||
echo "Update the patch set for PROJECT (one of \`bash' or \`readline') for"
|
||||
echo "the given version (e.g., \`4.0'). Produce \`PROJECT-patches.nix'."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PROJECT="$1"
|
||||
VERSION="$2"
|
||||
DIR=$(dirname "$0")
|
||||
VERSION_CONDENSED="$(echo "$VERSION" | sed -es/\\.//g)"
|
||||
PATCH_LIST="$DIR/$PROJECT-$VERSION-patches.nix"
|
||||
|
||||
set -e
|
||||
|
||||
rm -vf "$PATCH_LIST"
|
||||
|
||||
wget "https://tiswww.case.edu/php/chet/gpgkey.asc"
|
||||
echo "4ef5051ce7200241e65d29c11eb57df8 gpgkey.asc" > gpgkey.asc.md5
|
||||
md5sum -c gpgkey.asc.md5
|
||||
gpg --import ./gpgkey.asc
|
||||
rm gpgkey.asc{,.md5}
|
||||
|
||||
( echo "# Automatically generated by \`$(basename "$0")'; do not edit." ; \
|
||||
echo "" ; \
|
||||
echo "patch: [" ) \
|
||||
>> "$PATCH_LIST"
|
||||
|
||||
for i in {001..100}
|
||||
do
|
||||
wget -P "$DIR" "ftp.gnu.org/gnu/$PROJECT/$PROJECT-$VERSION-patches/$PROJECT$VERSION_CONDENSED-$i" || break
|
||||
wget -P "$DIR" "ftp.gnu.org/gnu/$PROJECT/$PROJECT-$VERSION-patches/$PROJECT$VERSION_CONDENSED-$i.sig"
|
||||
gpg --verify "$DIR/$PROJECT$VERSION_CONDENSED-$i.sig"
|
||||
hash=$(nix-hash --flat --type sha256 --base32 "$DIR/$PROJECT$VERSION_CONDENSED-$i")
|
||||
echo "(patch \"$i\" \"$hash\")" \
|
||||
>> "$PATCH_LIST"
|
||||
|
||||
rm -f "$DIR/$PROJECT$VERSION_CONDENSED-$i"{,.sig}
|
||||
done
|
||||
|
||||
echo "]" >> "$PATCH_LIST"
|
||||
|
||||
# bash interprets numbers starting with 0 as octals
|
||||
echo "Got $((10#$i - 1)) patches."
|
||||
echo "Patch list has been written to \`$PATCH_LIST'."
|
||||
35
pkgs/shells/bash/yarn-completion/default.nix
Normal file
35
pkgs/shells/bash/yarn-completion/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "yarn-bash-completion";
|
||||
version = "0.17.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dsifford";
|
||||
repo = "yarn-completion";
|
||||
rev = "v${version}";
|
||||
sha256 = "0xflbrbwskjqv3knvc8jqygpvfxh5ak66q7w22d1ng8gwrfqzcng";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
installShellCompletion --cmd yarn ./yarn-completion.bash
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/dsifford/yarn-completion/";
|
||||
description = "Bash completion for Yarn";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ DamienCassou ];
|
||||
};
|
||||
}
|
||||
67
pkgs/shells/dash/default.nix
Normal file
67
pkgs/shells/dash/default.nix
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, buildPackages
|
||||
, autoreconfHook
|
||||
, fetchurl
|
||||
, fetchpatch
|
||||
, libedit
|
||||
, runCommand
|
||||
, dash
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dash";
|
||||
version = "0.5.11.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://gondor.apana.org.au/~herbert/dash/files/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-23eBEIkfeTeYXym/I0EP4cXWaVAnYPWE5U4OeynhI70=";
|
||||
};
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
# Dash executes code when noexec ("-n") is specified
|
||||
# https://www.openwall.com/lists/oss-security/2020/11/11/3
|
||||
url = "https://git.kernel.org/pub/scm/utils/dash/dash.git/patch/?id=29d6f2148f10213de4e904d515e792d2cf8c968e";
|
||||
sha256 = "0aadb7aaaan6jxmi6icv4p5gqx7k510yszaqsa29b5giyxz5l9i1";
|
||||
})
|
||||
|
||||
# aarch64-darwin fix from upstream; remove on next release
|
||||
(fetchpatch {
|
||||
url = "https://git.kernel.org/pub/scm/utils/dash/dash.git/patch/?id=6f6d1f2da03468c0e131fdcbdcfa9771ffca2614";
|
||||
sha256 = "16iz2ylkyhpxqq411ns8pjk8rizh6afhavvsf052wvzsnmmlvfbw";
|
||||
})
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
# configure.ac patched; remove on next release
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
buildInputs = [ libedit ];
|
||||
|
||||
configureFlags = [ "--with-libedit" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://gondor.apana.org.au/~herbert/dash/";
|
||||
description = "A POSIX-compliant implementation of /bin/sh that aims to be as small as possible";
|
||||
platforms = platforms.unix;
|
||||
license = with licenses; [ bsd3 gpl2 ];
|
||||
};
|
||||
|
||||
passthru = {
|
||||
shellPath = "/bin/dash";
|
||||
tests = {
|
||||
"execute-simple-command" = runCommand "${pname}-execute-simple-command" { } ''
|
||||
mkdir $out
|
||||
${dash}/bin/dash -c 'echo "Hello World!" > $out/success'
|
||||
[ -s $out/success ]
|
||||
grep -q "Hello World" $out/success
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
48
pkgs/shells/dgsh/default.nix
Normal file
48
pkgs/shells/dgsh/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoconf, automake, pkg-config,
|
||||
libtool, check, bison, git, gperf,
|
||||
perl, texinfo, help2man, gettext, ncurses
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "dgsh-unstable";
|
||||
version = "2017-02-05";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dspinellis";
|
||||
repo = "dgsh";
|
||||
rev = "bc4fc2e8009c069ee4df5140c32a2fc15d0acdec";
|
||||
sha256 = "0k3hmnarz56wphw45mabn5zcc427l5p77jldh1qqy89pxqy1wnql";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [ ./glibc-2.26.patch ];
|
||||
|
||||
nativeBuildInputs = [ autoconf automake pkg-config libtool check
|
||||
bison git gettext gperf perl texinfo help2man ncurses
|
||||
];
|
||||
|
||||
configurePhase = ''
|
||||
cp -r ./unix-tools/coreutils/gnulib gnulib
|
||||
perl -pi -e \
|
||||
's#./bootstrap #./bootstrap --no-bootstrap-sync --skip-po --no-git --gnulib-srcdir='$PWD/gnulib' #g' \
|
||||
unix-tools/Makefile
|
||||
find . -name \*.diff | xargs rm -f
|
||||
rm -rf unix-tools/*/gnulib
|
||||
patchShebangs unix-tools/diffutils/man/help2man
|
||||
export RSYNC=true # set to rsync binary, eventhough it is not used.
|
||||
make PREFIX=$out config
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "The Directed Graph Shell";
|
||||
homepage = "http://www.dmst.aueb.gr/dds/sw/dgsh";
|
||||
license = with licenses; asl20;
|
||||
maintainers = with maintainers; [ vrthra ];
|
||||
platforms = with platforms; all;
|
||||
# lib/freadseek.c:68:3: error: #error "Please port gnulib freadseek.c to your platform! Look at the definition of getc, getc_unlocked on your >
|
||||
# 68 | #error "Please port gnulib freadseek.c to your platform! Look at the definition of getc, getc_unlocked on your system, then report >
|
||||
broken = true; # marked 2022-05-06
|
||||
};
|
||||
}
|
||||
12
pkgs/shells/dgsh/glibc-2.26.patch
Normal file
12
pkgs/shells/dgsh/glibc-2.26.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff --git a/core-tools/src/dgsh-httpval.c b/core-tools/src/dgsh-httpval.c
|
||||
index 8b5dce3..7b43c3d 100644
|
||||
--- a/core-tools/src/dgsh-httpval.c
|
||||
+++ b/core-tools/src/dgsh-httpval.c
|
||||
@@ -40,6 +40,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
+#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
55
pkgs/shells/elvish/default.nix
Normal file
55
pkgs/shells/elvish/default.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub, runCommand }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "elvish";
|
||||
version = "0.18.0";
|
||||
|
||||
subPackages = [ "cmd/elvish" ];
|
||||
|
||||
ldflags = [ "-s" "-w" "-X src.elv.sh/pkg/buildinfo.Version==${version}" "-X src.elv.sh/pkg/buildinfo.Reproducible=true" ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "elves";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-AyTkJiNebpq17vdPluwJBztivezd+c1KAdWFTYYDIFE=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-iuklI7XEQUgZ2ObYRROxyiccZ1JkajK5OJA7hIcpRZQ=";
|
||||
|
||||
strictDeps = true;
|
||||
doCheck = false;
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
runHook preInstallCheck
|
||||
|
||||
$out${passthru.shellPath} -c "
|
||||
fn expect {|key expected|
|
||||
var actual = \$buildinfo[\$key]
|
||||
if (not-eq \$actual \$expected) {
|
||||
fail '\$buildinfo['\$key']: expected '(to-string \$expected)', got '(to-string \$actual)
|
||||
}
|
||||
}
|
||||
|
||||
expect version ${version}
|
||||
expect reproducible \$true
|
||||
"
|
||||
|
||||
runHook postInstallCheck
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A friendly and expressive command shell";
|
||||
longDescription = ''
|
||||
Elvish is a friendly interactive shell and an expressive programming
|
||||
language. It runs on Linux, BSDs, macOS and Windows. Despite its pre-1.0
|
||||
status, it is already suitable for most daily interactive use.
|
||||
'';
|
||||
homepage = "https://elv.sh/";
|
||||
license = licenses.bsd2;
|
||||
maintainers = with maintainers; [ vrthra AndersonTorres ];
|
||||
};
|
||||
|
||||
passthru.shellPath = "/bin/elvish";
|
||||
}
|
||||
44
pkgs/shells/es/default.nix
Normal file
44
pkgs/shells/es/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ lib, stdenv, fetchurl, readline, bison }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
pname = "es";
|
||||
version = "0.9.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/wryun/es-shell/releases/download/v${version}/es-${version}.tar.gz";
|
||||
sha256 = "sha256-ySZIK0IITpA+uHHuHrDO/Ana5vGt64QI3Z6TMDXE9d0=";
|
||||
};
|
||||
|
||||
# The distribution tarball does not have a single top-level directory.
|
||||
preUnpack = ''
|
||||
mkdir $name
|
||||
cd $name
|
||||
sourceRoot=.
|
||||
'';
|
||||
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [ bison ];
|
||||
buildInputs = [ readline ];
|
||||
|
||||
configureFlags = [ "--with-readline" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "An extensible shell with higher order functions";
|
||||
longDescription =
|
||||
''
|
||||
Es is an extensible shell. The language was derived
|
||||
from the Plan 9 shell, rc, and was influenced by
|
||||
functional programming languages, such as Scheme,
|
||||
and the Tcl embeddable programming language.
|
||||
'';
|
||||
homepage = "http://wryun.github.io/es-shell/";
|
||||
license = licenses.publicDomain;
|
||||
maintainers = with maintainers; [ sjmackenzie ttuegel ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
|
||||
passthru = {
|
||||
shellPath = "/bin/es";
|
||||
};
|
||||
}
|
||||
21
pkgs/shells/fish/babelfish.nix
Normal file
21
pkgs/shells/fish/babelfish.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
buildGoModule rec {
|
||||
pname = "babelfish";
|
||||
version = "1.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bouk";
|
||||
repo = "babelfish";
|
||||
rev = "v${version}";
|
||||
sha256 = "0b1knj9llwzwnl4w3d6akvlc57dp0fszjkq98w8wybcvkbpd3ip1";
|
||||
};
|
||||
|
||||
vendorSha256 = "0kspqwbgiqfkfj9a9pdwzc0jdi9p35abqqqjhcpvqwdxw378w5lz";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Translate bash scripts to fish";
|
||||
homepage = "https://github.com/bouk/babelfish";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ bouk kevingriffin ];
|
||||
};
|
||||
}
|
||||
342
pkgs/shells/fish/default.nix
Normal file
342
pkgs/shells/fish/default.nix
Normal file
|
|
@ -0,0 +1,342 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, fetchpatch
|
||||
, coreutils
|
||||
, which
|
||||
, gnused
|
||||
, gnugrep
|
||||
, groff
|
||||
, gawk
|
||||
, man-db
|
||||
, getent
|
||||
, libiconv
|
||||
, pcre2
|
||||
, gettext
|
||||
, ncurses
|
||||
, python3
|
||||
, cmake
|
||||
, fishPlugins
|
||||
, procps
|
||||
|
||||
# used to generate autocompletions from manpages and for configuration editing in the browser
|
||||
, usePython ? true
|
||||
|
||||
, runCommand
|
||||
, writeText
|
||||
, nixosTests
|
||||
, useOperatingSystemEtc ? true
|
||||
# An optional string containing Fish code that initializes the environment.
|
||||
# This is run at the very beginning of initialization. If it sets $NIX_PROFILES
|
||||
# then Fish will use that to configure its function, completion, and conf.d paths.
|
||||
# For example:
|
||||
# fishEnvPreInit = "source /etc/fish/my-env-preinit.fish";
|
||||
# It can also be a function that takes one argument, which is a function that
|
||||
# takes a path to a bash file and converts it to fish. For example:
|
||||
# fishEnvPreInit = source: source "${nix}/etc/profile.d/nix-daemon.sh";
|
||||
, fishEnvPreInit ? null
|
||||
}:
|
||||
let
|
||||
etcConfigAppendix = writeText "config.fish.appendix" ''
|
||||
############### ↓ Nix hook for sourcing /etc/fish/config.fish ↓ ###############
|
||||
# #
|
||||
# Origin:
|
||||
# This fish package was called with the attribute
|
||||
# "useOperatingSystemEtc = true;".
|
||||
#
|
||||
# Purpose:
|
||||
# Fish ordinarily sources /etc/fish/config.fish as
|
||||
# $__fish_sysconfdir/config.fish,
|
||||
# and $__fish_sysconfdir is defined at compile-time, baked into the C++
|
||||
# component of fish. By default, it is set to "/etc/fish". When building
|
||||
# through Nix, $__fish_sysconfdir gets set to $out/etc/fish. Here we may
|
||||
# have included a custom $out/etc/config.fish in the fish package,
|
||||
# as specified, but according to the value of useOperatingSystemEtc, we
|
||||
# may want to further source the real "/etc/fish/config.fish" file.
|
||||
#
|
||||
# When this option is enabled, this segment should appear the very end of
|
||||
# "$out/etc/config.fish". This is to emulate the behavior of fish itself
|
||||
# with respect to /etc/fish/config.fish and ~/.config/fish/config.fish:
|
||||
# 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 && test /etc/fish/config.fish != (status filename)
|
||||
source /etc/fish/config.fish
|
||||
end
|
||||
|
||||
# #
|
||||
############### ↑ Nix hook for sourcing /etc/fish/config.fish ↑ ###############
|
||||
'';
|
||||
|
||||
fishPreInitHooks = writeText "__fish_build_paths_suffix.fish" ''
|
||||
# source nixos environment
|
||||
# note that this is required:
|
||||
# 1. For all shells, not just login shells (mosh needs this as do some other command-line utilities)
|
||||
# 2. Before the shell is initialized, so that config snippets can find the commands they use on the PATH
|
||||
builtin status --is-login
|
||||
or test -z "$__fish_nixos_env_preinit_sourced" -a -z "$ETC_PROFILE_SOURCED" -a -z "$ETC_ZSHENV_SOURCED"
|
||||
${if fishEnvPreInit != null then ''
|
||||
and begin
|
||||
${lib.removeSuffix "\n" (if lib.isFunction fishEnvPreInit then fishEnvPreInit sourceWithFenv else fishEnvPreInit)}
|
||||
end'' else ''
|
||||
and test -f /etc/fish/nixos-env-preinit.fish
|
||||
and source /etc/fish/nixos-env-preinit.fish''}
|
||||
and set -gx __fish_nixos_env_preinit_sourced 1
|
||||
|
||||
test -n "$NIX_PROFILES"
|
||||
and begin
|
||||
# We ensure that __extra_* variables are read in $__fish_datadir/config.fish
|
||||
# with a preference for user-configured data by making sure the package-specific
|
||||
# data comes last. Files are loaded/sourced in encounter order, duplicate
|
||||
# basenames get skipped, so we assure this by prepending Nix profile paths
|
||||
# (ordered in reverse of the $NIX_PROFILE variable)
|
||||
#
|
||||
# Note that at this point in evaluation, there is nothing whatsoever on the
|
||||
# fish_function_path. That means we don't have most fish builtins, e.g., `eval`.
|
||||
|
||||
|
||||
# additional profiles are expected in order of precedence, which means the reverse of the
|
||||
# NIX_PROFILES variable (same as config.environment.profiles)
|
||||
set -l __nix_profile_paths (string split ' ' $NIX_PROFILES)[-1..1]
|
||||
|
||||
set -p __extra_completionsdir \
|
||||
$__nix_profile_paths"/etc/fish/completions" \
|
||||
$__nix_profile_paths"/share/fish/vendor_completions.d"
|
||||
set -p __extra_functionsdir \
|
||||
$__nix_profile_paths"/etc/fish/functions" \
|
||||
$__nix_profile_paths"/share/fish/vendor_functions.d"
|
||||
set -p __extra_confdir \
|
||||
$__nix_profile_paths"/etc/fish/conf.d" \
|
||||
$__nix_profile_paths"/share/fish/vendor_conf.d"
|
||||
end
|
||||
'';
|
||||
|
||||
# This is wrapped in begin/end in case the user wants to apply redirections.
|
||||
# This does mean the basic usage of sourcing a single file will produce
|
||||
# `begin; begin; …; end; end` but that's ok.
|
||||
sourceWithFenv = path: ''
|
||||
begin # fenv
|
||||
# This happens before $__fish_datadir/config.fish sets fish_function_path, so it is currently
|
||||
# unset. We set it and then completely erase it, leaving its configuration to $__fish_datadir/config.fish
|
||||
set fish_function_path ${fishPlugins.foreign-env}/share/fish/vendor_functions.d $__fish_datadir/functions
|
||||
fenv source ${lib.escapeShellArg path}
|
||||
set -l fenv_status $status
|
||||
# clear fish_function_path so that it will be correctly set when we return to $__fish_datadir/config.fish
|
||||
set -e fish_function_path
|
||||
test $fenv_status -eq 0
|
||||
end # fenv
|
||||
'';
|
||||
|
||||
fish = stdenv.mkDerivation rec {
|
||||
pname = "fish";
|
||||
version = "3.4.1";
|
||||
|
||||
src = fetchurl {
|
||||
# There are differences between the release tarball and the tarball GitHub
|
||||
# packages from the tag. Specifically, it comes with a file containing its
|
||||
# version, which is used in `build_tools/git_version_gen.sh` to determine
|
||||
# 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.xz";
|
||||
sha256 = "sha256-tvI7OEOwTbawqQ/qH28NDkDMAntKcyCYIAhj8oZKlOo=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# merged https://github.com/fish-shell/fish-shell/pull/8978
|
||||
# "create_manpage_completions.py: Do not overstrip commands with dots"
|
||||
(fetchpatch {
|
||||
name = "fix-cmdname-completeion-generator.patch";
|
||||
url = "https://github.com/fish-shell/fish-shell/commit/32d646a5483844e9b1fae4b73f252a34ec0d4c76.patch";
|
||||
sha256 = "sha256-51hqgPHQ7oQbl1i3SfqvGsbkYMe2Jh+sEwCRu2kiv1U=";
|
||||
})
|
||||
];
|
||||
|
||||
# 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
|
||||
'' + lib.optionalString stdenv.isLinux ''
|
||||
# pexpect tests are flaky on aarch64-linux (also x86_64-linux)
|
||||
# See https://github.com/fish-shell/fish-shell/issues/8789
|
||||
rm tests/pexpects/exit_handlers.py
|
||||
'';
|
||||
|
||||
outputs = [ "out" "doc" ];
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
gettext
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
ncurses
|
||||
libiconv
|
||||
pcre2
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_INSTALL_DOCDIR=${placeholder "doc"}/share/doc/fish"
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
"-DMAC_CODESIGN_ID=OFF"
|
||||
];
|
||||
|
||||
# The optional string is kind of an inelegant way to get fish to cross compile.
|
||||
# Fish needs coreutils as a runtime dependency, and it gets put into
|
||||
# CMAKE_PREFIX_PATH, which cmake uses to look up build time programs, so it
|
||||
# was clobbering the PATH. It probably needs to be fixed at a lower level.
|
||||
preConfigure = ''
|
||||
patchShebangs ./build_tools/git_version_gen.sh
|
||||
'' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
||||
export CMAKE_PREFIX_PATH=
|
||||
'';
|
||||
|
||||
# Required binaries during execution
|
||||
propagatedBuildInputs = [
|
||||
coreutils
|
||||
gnugrep
|
||||
gnused
|
||||
groff
|
||||
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 -e "s|\|cut|\|${coreutils}/bin/cut|" \
|
||||
-i "$out/share/fish/functions/fish_prompt.fish"
|
||||
sed -e "s|uname|${coreutils}/bin/uname|" \
|
||||
-i "$out/share/fish/functions/__fish_pwd.fish" \
|
||||
"$out/share/fish/functions/prompt_pwd.fish"
|
||||
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|" \
|
||||
"$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 -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}
|
||||
return 0
|
||||
end
|
||||
EOF
|
||||
|
||||
'' + optionalString stdenv.isLinux ''
|
||||
for cur in $out/share/fish/functions/*.fish; do
|
||||
sed -e "s|/usr/bin/getent|${getent}/bin/getent|" \
|
||||
-i "$cur"
|
||||
done
|
||||
|
||||
'' + optionalString (!stdenv.isDarwin) ''
|
||||
sed -i "s|Popen(\['manpath'|Popen(\['${man-db}/bin/manpath'|" \
|
||||
"$out/share/fish/tools/create_manpage_completions.py"
|
||||
sed -i "s|command manpath|command ${man-db}/bin/manpath|" \
|
||||
"$out/share/fish/functions/man.fish"
|
||||
'' + optionalString useOperatingSystemEtc ''
|
||||
tee -a $out/etc/fish/config.fish < ${etcConfigAppendix}
|
||||
'' + ''
|
||||
tee -a $out/share/fish/__fish_build_paths.fish < ${fishPreInitHooks}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Smart and user-friendly command line shell";
|
||||
homepage = "https://fishshell.com/";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ cole-h ];
|
||||
};
|
||||
|
||||
passthru = {
|
||||
shellPath = "/bin/fish";
|
||||
tests = {
|
||||
nixos = nixosTests.fish;
|
||||
|
||||
# Test the fish_config tool by checking the generated splash page.
|
||||
# Since the webserver requires a port to run, it is not started.
|
||||
fishConfig =
|
||||
let fishScript = writeText "test.fish" ''
|
||||
set -x __fish_bin_dir ${fish}/bin
|
||||
echo $__fish_bin_dir
|
||||
cp -r ${fish}/share/fish/tools/web_config/* .
|
||||
chmod -R +w *
|
||||
|
||||
# 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
|
||||
|
||||
# we delete everything after the fileurl is assigned
|
||||
sed -e '/fileurl =/q' -i webconfig.py
|
||||
echo "print(fileurl)" >> webconfig.py
|
||||
|
||||
# and check whether the message appears on the page
|
||||
cat (${python3}/bin/python ./webconfig.py \
|
||||
| tail -n1 | sed -ne 's|.*\(/build/.*\)|\1|p' \
|
||||
) | grep 'a href="http://localhost.*Start the Fish Web config'
|
||||
|
||||
# cannot test the http server because it needs a localhost port
|
||||
'';
|
||||
in
|
||||
runCommand "test-web-config" { } ''
|
||||
HOME=$(mktemp -d)
|
||||
${fish}/bin/fish ${fishScript} && touch $out
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
fish
|
||||
64
pkgs/shells/fish/oh-my-fish/default.nix
Normal file
64
pkgs/shells/fish/oh-my-fish/default.nix
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, fish
|
||||
, bash
|
||||
, runtimeShell
|
||||
, writeShellScript
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "oh-my-fish";
|
||||
version = "7+unstable=2021-03-03";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "0b1396ad7962073fa25615bf03c43b53eddc2d56";
|
||||
hash = "sha256-lwMo4+PcYR9kYJPWK+ALiMfBdxFSgB2vjtSn8QrmmEA=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
buildInputs = [
|
||||
fish
|
||||
bash
|
||||
];
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -pv $out/bin $out/share/${pname}
|
||||
cp -vr * $out/share/${pname}
|
||||
|
||||
cat << EOF > $out/bin/omf-install
|
||||
#!${runtimeShell}
|
||||
|
||||
${fish}/bin/fish \\
|
||||
$out/share/${pname}/bin/install \\
|
||||
--noninteractive \\
|
||||
--offline=$out/share/${pname}
|
||||
|
||||
EOF
|
||||
chmod +x $out/bin/omf-install
|
||||
|
||||
runHook PostInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/oh-my-fish/oh-my-fish";
|
||||
description = "The Fish Shell Framework";
|
||||
longDescription = ''
|
||||
Oh My Fish provides core infrastructure to allow you to install packages
|
||||
which extend or modify the look of your shell. It's fast, extensible and
|
||||
easy to use.
|
||||
'';
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ AndersonTorres ];
|
||||
mainProgram = "omf-install";
|
||||
platforms = fish.meta.platforms;
|
||||
};
|
||||
}
|
||||
# TODO: customize the omf-install script
|
||||
73
pkgs/shells/fish/plugins/build-fish-plugin.nix
Normal file
73
pkgs/shells/fish/plugins/build-fish-plugin.nix
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
{ stdenv, lib, writeScript, wrapFish }:
|
||||
|
||||
attrs@{
|
||||
pname,
|
||||
version,
|
||||
src,
|
||||
|
||||
name ? "fishplugin-${pname}-${version}",
|
||||
unpackPhase ? "",
|
||||
configurePhase ? ":",
|
||||
buildPhase ? ":",
|
||||
preInstall ? "",
|
||||
postInstall ? "",
|
||||
|
||||
checkInputs ? [],
|
||||
# plugin packages to add to the vendor paths of the test fish shell
|
||||
checkPlugins ? [],
|
||||
# vendor directories to add to the function path of the test fish shell
|
||||
checkFunctionDirs ? [],
|
||||
# test script to be executed in a fish shell
|
||||
checkPhase ? "",
|
||||
doCheck ? checkPhase != "",
|
||||
|
||||
...
|
||||
}:
|
||||
|
||||
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;
|
||||
|
||||
inherit preInstall postInstall;
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
(
|
||||
install_vendor_files() {
|
||||
source="$1"
|
||||
target="$out/share/fish/vendor_$2.d"
|
||||
|
||||
[ -d $source ] || return 0
|
||||
mkdir -p $target
|
||||
cp -r $source/*.fish "$target/"
|
||||
}
|
||||
|
||||
install_vendor_files completions completions
|
||||
install_vendor_files functions functions
|
||||
install_vendor_files conf conf
|
||||
install_vendor_files conf.d conf
|
||||
)
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
inherit doCheck;
|
||||
|
||||
checkInputs = [ (wrapFish {
|
||||
pluginPkgs = checkPlugins;
|
||||
functionDirs = checkFunctionDirs;
|
||||
}) ] ++ checkInputs;
|
||||
|
||||
checkPhase = ''
|
||||
export HOME=$(mktemp -d) # fish wants a writable home
|
||||
fish "${writeScript "${name}-test" checkPhase}"
|
||||
'';
|
||||
})
|
||||
20
pkgs/shells/fish/plugins/clownfish.nix
Normal file
20
pkgs/shells/fish/plugins/clownfish.nix
Normal file
|
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
30
pkgs/shells/fish/plugins/default.nix
Normal file
30
pkgs/shells/fish/plugins/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, newScope }:
|
||||
|
||||
lib.makeScope newScope (self: with self; {
|
||||
|
||||
buildFishPlugin = callPackage ./build-fish-plugin.nix { };
|
||||
|
||||
clownfish = callPackage ./clownfish.nix { };
|
||||
|
||||
done = callPackage ./done.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 { };
|
||||
|
||||
forgit = callPackage ./forgit.nix { };
|
||||
|
||||
fzf-fish = callPackage ./fzf-fish.nix { };
|
||||
|
||||
grc = callPackage ./grc.nix { };
|
||||
|
||||
hydro = callPackage ./hydro.nix { };
|
||||
|
||||
pisces = callPackage ./pisces.nix { };
|
||||
|
||||
pure = callPackage ./pure.nix { };
|
||||
|
||||
})
|
||||
25
pkgs/shells/fish/plugins/done.nix
Normal file
25
pkgs/shells/fish/plugins/done.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, buildFishPlugin, fetchFromGitHub, fishtape }:
|
||||
|
||||
buildFishPlugin rec {
|
||||
pname = "done";
|
||||
version = "1.16.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "franciscolourenco";
|
||||
repo = "done";
|
||||
rev = version;
|
||||
sha256 = "E0wveeDw1VzEH2kzn63q9hy1xkccfxQHBV2gVpu2IdQ=";
|
||||
};
|
||||
|
||||
checkPlugins = [ fishtape ];
|
||||
checkPhase = ''
|
||||
fishtape test/done.fish
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Automatically receive notifications when long processes finish";
|
||||
homepage = "https://github.com/franciscolourenco/done";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ malo ];
|
||||
};
|
||||
}
|
||||
32
pkgs/shells/fish/plugins/fishtape.nix
Normal file
32
pkgs/shells/fish/plugins/fishtape.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, buildFishPlugin, fetchFromGitHub }:
|
||||
|
||||
buildFishPlugin rec {
|
||||
pname = "fishtape";
|
||||
version = "2.1.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jorgebucaran";
|
||||
repo = "fishtape";
|
||||
rev = version;
|
||||
sha256 = "0dxcyhs2shhgy5xnwcimqja8vqsyk841x486lgq13i3y1h0kp2kd";
|
||||
};
|
||||
|
||||
checkFunctionDirs = [ "./" ]; # fishtape is introspective
|
||||
checkPhase = ''
|
||||
rm test/tty.fish # test expects a tty
|
||||
fishtape test/*.fish
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
# move the function script in the proper sub-directory
|
||||
mkdir functions
|
||||
mv fishtape.fish functions/
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "TAP-based test runner for Fish";
|
||||
homepage = "https://github.com/jorgebucaran/fishtape";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ pacien ];
|
||||
};
|
||||
}
|
||||
25
pkgs/shells/fish/plugins/fishtape_3.nix
Normal file
25
pkgs/shells/fish/plugins/fishtape_3.nix
Normal file
|
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
29
pkgs/shells/fish/plugins/foreign-env/default.nix
Normal file
29
pkgs/shells/fish/plugins/foreign-env/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, buildFishPlugin, fetchFromGitHub, gnused, bash, coreutils }:
|
||||
|
||||
buildFishPlugin {
|
||||
pname = "foreign-env";
|
||||
version = "unstable-2020-02-09";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "oh-my-fish";
|
||||
repo = "plugin-foreign-env";
|
||||
rev = "dddd9213272a0ab848d474d0cbde12ad034e65bc";
|
||||
sha256 = "00xqlyl3lffc5l0viin1nyp819wf81fncqyz87jx8ljjdhilmgbs";
|
||||
};
|
||||
|
||||
patches = [ ./suppress-harmless-warnings.patch ];
|
||||
|
||||
preInstall = ''
|
||||
sed -e "s|sed|${gnused}/bin/sed|" \
|
||||
-e "s|bash|${bash}/bin/bash|" \
|
||||
-e "s|\| tr|\| ${coreutils}/bin/tr|" \
|
||||
-i functions/*
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A foreign environment interface for Fish shell";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ jgillich ];
|
||||
platforms = with platforms; unix;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
diff --git a/functions/fenv.apply.fish b/functions/fenv.apply.fish
|
||||
index 34a25e3..3d94135 100644
|
||||
--- a/functions/fenv.apply.fish
|
||||
+++ b/functions/fenv.apply.fish
|
||||
@@ -27,11 +27,17 @@ function fenv.apply
|
||||
for variable in $variables
|
||||
set key (echo $variable | sed 's/=.*//')
|
||||
set value (echo $variable | sed 's/[^=]*=//')
|
||||
+ set ignore PATH _
|
||||
|
||||
if test "$key" = 'PATH'
|
||||
set value (echo $value | tr ':' '\n')
|
||||
end
|
||||
|
||||
- set -g -x $key $value
|
||||
+ if contains $key $ignore
|
||||
+ set -g -x $key $value 2>/dev/null
|
||||
+ else
|
||||
+ set -g -x $key $value
|
||||
+ end
|
||||
+
|
||||
end
|
||||
end
|
||||
26
pkgs/shells/fish/plugins/forgit.nix
Normal file
26
pkgs/shells/fish/plugins/forgit.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, buildFishPlugin, fetchFromGitHub, git, fzf }:
|
||||
|
||||
buildFishPlugin rec {
|
||||
pname = "forgit";
|
||||
version = "unstable-2021-12-05";
|
||||
|
||||
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";
|
||||
repo = "forgit";
|
||||
rev = "7b26cd46ac768af51b8dd4b84b6567c4e1c19642";
|
||||
sha256 = "sha256-S/alL3CiyedJ8aGhC2Vg9fmLJYcLxDe4EjQns5dZkKM=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A utility tool powered by fzf for using git interactively.";
|
||||
homepage = "https://github.com/wfxr/forgit";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ happysalada ];
|
||||
};
|
||||
}
|
||||
40
pkgs/shells/fish/plugins/fzf-fish.nix
Normal file
40
pkgs/shells/fish/plugins/fzf-fish.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ lib, stdenv, buildFishPlugin, fetchFromGitHub, fd, fzf, util-linux, clownfish, fishtape_3 }:
|
||||
|
||||
buildFishPlugin rec {
|
||||
pname = "fzf.fish";
|
||||
version = "8.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "PatrickF1";
|
||||
repo = "fzf.fish";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-eSNUqvKXTxcuvICxo8BmVWL1ESXQuU7VhOl7aONrhwM=";
|
||||
};
|
||||
|
||||
checkInputs = [ fzf fd util-linux ];
|
||||
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/configure_bindings
|
||||
rm -r tests/search_shell_variables
|
||||
|
||||
# Disable tests that are failing, because there is not 'rev' command
|
||||
rm tests/preview_file/custom_file_preview.fish
|
||||
|
||||
'' + (
|
||||
if stdenv.isDarwin then ''script /dev/null fish -c "fishtape tests/*/*.fish"''
|
||||
else ''script -c 'fish -c "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 ];
|
||||
};
|
||||
}
|
||||
20
pkgs/shells/fish/plugins/grc.nix
Normal file
20
pkgs/shells/fish/plugins/grc.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ lib, buildFishPlugin, fetchFromGitHub }:
|
||||
|
||||
buildFishPlugin {
|
||||
pname = "grc";
|
||||
version = "unstable-2022-05-24";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "oh-my-fish";
|
||||
repo = "plugin-grc";
|
||||
rev = "61de7a8a0d7bda3234f8703d6e07c671992eb079";
|
||||
sha256 = "sha256-NQa12L0zlEz2EJjMDhWUhw5cz/zcFokjuCK5ZofTn+Q=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "grc Colourizer for some commands on Fish shell";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ onny ];
|
||||
platforms = with platforms; unix;
|
||||
};
|
||||
}
|
||||
20
pkgs/shells/fish/plugins/hydro.nix
Normal file
20
pkgs/shells/fish/plugins/hydro.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ lib, buildFishPlugin, fetchFromGitHub }:
|
||||
|
||||
buildFishPlugin rec {
|
||||
pname = "hydro";
|
||||
version = "unstable-2022-02-21";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jorgebucaran";
|
||||
repo = "hydro";
|
||||
rev = "d4875065ceea226f58ead97dd9b2417937344d6e";
|
||||
sha256 = "sha256-nXeDnqqOuZyrqGTPEQtYlFvrFvy1bZVMF4CA37b0lsE=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Ultra-pure, lag-free prompt with async Git status";
|
||||
homepage = "https://github.com/jorgebucaran/hydro";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ mrhedgehog ];
|
||||
};
|
||||
}
|
||||
20
pkgs/shells/fish/plugins/pisces.nix
Normal file
20
pkgs/shells/fish/plugins/pisces.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ lib, buildFishPlugin, fetchFromGitHub }:
|
||||
|
||||
buildFishPlugin rec {
|
||||
pname = "pisces";
|
||||
version = "0.7.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "laughedelic";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-Oou2IeNNAqR00ZT3bss/DbhrJjGeMsn9dBBYhgdafBw=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Paired symbols in the command line";
|
||||
homepage = "https://github.com/laughedelic/pisces";
|
||||
license = licenses.lgpl3;
|
||||
maintainers = with maintainers; [ vanilla ];
|
||||
};
|
||||
}
|
||||
37
pkgs/shells/fish/plugins/pure.nix
Normal file
37
pkgs/shells/fish/plugins/pure.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ lib, buildFishPlugin, fetchFromGitHub, git, fishtape }:
|
||||
|
||||
buildFishPlugin rec {
|
||||
pname = "pure";
|
||||
version = "4.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pure-fish";
|
||||
repo = "pure";
|
||||
rev = "v${version}";
|
||||
sha256 = "1x1h65l8582p7h7w5986sc9vfd7b88a7hsi68dbikm090gz8nlxx";
|
||||
};
|
||||
|
||||
# The tests aren't passing either on the project's CI.
|
||||
# The release notes of the program for v3.5.0 say:
|
||||
# > Tests are going crazy at the moment, should be fixed once fishtape 3.0
|
||||
# > is released, and we do the switch.
|
||||
# This is tracked in https://github.com/pure-fish/pure/issues/272
|
||||
# and https://github.com/pure-fish/pure/pull/275.
|
||||
doCheck = false;
|
||||
|
||||
checkInputs = [ git ];
|
||||
checkPlugins = [ fishtape ];
|
||||
checkPhase = ''
|
||||
# https://github.com/rafaelrinaldi/pure/issues/264
|
||||
rm tests/_pure_string_width.test.fish
|
||||
|
||||
fishtape tests/*.test.fish
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Pretty, minimal and fast Fish prompt, ported from zsh";
|
||||
homepage = "https://github.com/rafaelrinaldi/pure";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ pacien ];
|
||||
};
|
||||
}
|
||||
25
pkgs/shells/fish/wrapper.nix
Normal file
25
pkgs/shells/fish/wrapper.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, writeShellScriptBin, fish }:
|
||||
|
||||
with lib;
|
||||
|
||||
makeOverridable ({
|
||||
completionDirs ? [],
|
||||
functionDirs ? [],
|
||||
confDirs ? [],
|
||||
pluginPkgs ? []
|
||||
}:
|
||||
|
||||
let
|
||||
vendorDir = kind: plugin: "${plugin}/share/fish/vendor_${kind}.d";
|
||||
complPath = completionDirs ++ map (vendorDir "completions") pluginPkgs;
|
||||
funcPath = functionDirs ++ map (vendorDir "functions") pluginPkgs;
|
||||
confPath = confDirs ++ map (vendorDir "conf") pluginPkgs;
|
||||
|
||||
in writeShellScriptBin "fish" ''
|
||||
${fish}/bin/fish --init-command "
|
||||
set --prepend fish_complete_path ${escapeShellArgs complPath}
|
||||
set --prepend fish_function_path ${escapeShellArgs funcPath}
|
||||
set --local fish_conf_source_path ${escapeShellArgs confPath}
|
||||
for c in \$fish_conf_source_path/*; source \$c; end
|
||||
" "$@"
|
||||
'')
|
||||
44
pkgs/shells/hilbish/default.nix
Normal file
44
pkgs/shells/hilbish/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub, readline }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "hilbish";
|
||||
version = "1.0.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Rosettea";
|
||||
repo = "Hilbish";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-JVAyE6iSfRres2YalQF3CWK5Jtn5HoW6p6RHVbwzoVQ=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-Bmst1oJMuSXGvL8Syw6v2BqrbO5McHKkTufFs6iuxzs=";
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X main.dataDir=${placeholder "out"}/share/hilbish"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p "$out/share/hilbish"
|
||||
|
||||
cp .hilbishrc.lua $out/share/hilbish/
|
||||
cp -r docs -t $out/share/hilbish
|
||||
cp -r libs -t $out/share/hilbish/
|
||||
cp -r prelude/ $out/share/hilbish/
|
||||
|
||||
# segfaults and it's already been generated upstream
|
||||
# we copy the docs over with the above cp command
|
||||
rm $out/bin/docgen
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An interactive Unix-like shell written in Go";
|
||||
changelog = "https://github.com/Rosettea/Hilbish/releases/tag/v${version}";
|
||||
homepage = "https://github.com/Rosettea/Hilbish";
|
||||
maintainers = with maintainers; [ fortuneteller2k ];
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux; # only officially supported on Linux
|
||||
};
|
||||
}
|
||||
33
pkgs/shells/ion/default.nix
Normal file
33
pkgs/shells/ion/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, stdenv, fetchFromGitHub, rustPlatform, Security, libiconv }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "ion";
|
||||
version = "unstable-2021-05-10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "redox-os";
|
||||
repo = "ion";
|
||||
rev = "1170b84587bbad260a3ecac8e249a216cb1fd5e9";
|
||||
sha256 = "sha256-lI1GwA3XerRJaC/Z8vTZc6GzRDLjv3w768C+Ui6Q+3Q=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-hURpgxc99iIMtzIlR6Kbfqcbu1uYLDHnfVLqgmMbvFA=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Modern system shell with simple (and powerful) syntax";
|
||||
homepage = "https://gitlab.redox-os.org/redox-os/ion";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ dywedir ];
|
||||
};
|
||||
|
||||
buildInputs = lib.optional stdenv.hostPlatform.isDarwin [
|
||||
Security
|
||||
libiconv
|
||||
];
|
||||
|
||||
doCheck = !stdenv.hostPlatform.isDarwin;
|
||||
|
||||
passthru = {
|
||||
shellPath = "/bin/ion";
|
||||
};
|
||||
}
|
||||
28
pkgs/shells/jush/default.nix
Normal file
28
pkgs/shells/jush/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, editline }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "jush";
|
||||
version = "0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "troglobit";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1azvghrh31gawd798a254ml4id642qvbva64zzg30pjszh1087n8";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
|
||||
buildInputs = [ editline ];
|
||||
|
||||
passthru.shellPath = "/bin/jush";
|
||||
|
||||
meta = with lib; {
|
||||
description = "just a useless shell";
|
||||
homepage = "https://github.com/troglobit/jush";
|
||||
license = licenses.isc;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ dtzWill ];
|
||||
};
|
||||
}
|
||||
45
pkgs/shells/ksh/default.nix
Normal file
45
pkgs/shells/ksh/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ lib, stdenv, meson, ninja, fetchFromGitHub, which, python3, fetchpatch
|
||||
, libiconv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ksh";
|
||||
version = "2020.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "att";
|
||||
repo = "ast";
|
||||
rev = version;
|
||||
sha256 = "0cdxz0nhpq03gb9rd76fn0x1yzs2c8q289b7vcxnzlsrz1imz65j";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/att/ast/commit/11983a71f5e29df578b7e2184400728b4e3f451d.patch";
|
||||
sha256 = "1n9558c4v2qpgpjb1vafs29n3qn3z0770wr1ayc0xjf5z5j4g3kv";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ meson ninja which python3 ];
|
||||
|
||||
buildInputs = [ libiconv ];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "KornShell Command And Programming Language";
|
||||
longDescription = ''
|
||||
The KornShell language was designed and developed by David G. Korn at
|
||||
AT&T Bell Laboratories. It is an interactive command language that
|
||||
provides access to the UNIX system and to many other systems, on the
|
||||
many different computers and workstations on which it is implemented.
|
||||
'';
|
||||
homepage = "https://github.com/att/ast";
|
||||
license = licenses.cpl10;
|
||||
maintainers = with maintainers; [ ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
|
||||
passthru = {
|
||||
shellPath = "/bin/ksh";
|
||||
};
|
||||
}
|
||||
33
pkgs/shells/liquidprompt/default.nix
Normal file
33
pkgs/shells/liquidprompt/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "liquidprompt";
|
||||
version = "2.0.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nojhan";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-ntCfXJUOQqL63HWoG+WJr9a+qB16AaL5zf58039t7GU=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
installPhase = ''
|
||||
install -D -m 0444 liquidprompt $out/bin/liquidprompt
|
||||
install -D -m 0444 liquidpromptrc-dist $out/share/doc/liquidprompt/liquidpromptrc-dist
|
||||
install -D -m 0444 liquid.theme $out/share/doc/liquidprompt/liquid.theme
|
||||
|
||||
install -D -m 0444 liquidprompt.plugin.zsh \
|
||||
$out/share/zsh/plugins/liquidprompt/liquidprompt.plugin.zsh
|
||||
install -D -m 0444 liquidprompt \
|
||||
$out/share/zsh/plugins/liquidprompt/liquidprompt
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A full-featured & carefully designed adaptive prompt for Bash & Zsh";
|
||||
homepage = "https://github.com/nojhan/liquidprompt";
|
||||
license = licenses.agpl3;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ gerschtli ];
|
||||
};
|
||||
}
|
||||
50
pkgs/shells/loksh/default.nix
Normal file
50
pkgs/shells/loksh/default.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, ncurses
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "loksh";
|
||||
version = "7.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dimkr";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
fetchSubmodules = true;
|
||||
sha256 = "sha256-q5RiY9/xEFCk+oHlxgNwDOB+TNjRWHKzU2kQH2LjCWY=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
ncurses
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
mv $out/bin/ksh $out/bin/loksh
|
||||
mv $out/share/man/man1/ksh.1 $out/share/man/man1/loksh.1
|
||||
mv $out/share/man/man1/sh.1 $out/share/man/man1/loksh-sh.1
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
shellPath = "/bin/loksh";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Linux port of OpenBSD's ksh";
|
||||
homepage = "https://github.com/dimkr/loksh";
|
||||
license = licenses.publicDomain;
|
||||
maintainers = with maintainers; [ cameronnemo ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
60
pkgs/shells/mksh/default.nix
Normal file
60
pkgs/shells/mksh/default.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, installShellFiles
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mksh";
|
||||
version = "59c";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"http://www.mirbsd.org/MirOS/dist/mir/mksh/${pname}-R${version}.tgz"
|
||||
"http://pub.allbsd.org/MirOS/dist/mir/mksh/${pname}-R${version}.tgz"
|
||||
];
|
||||
hash = "sha256-d64WZaM38cSMYda5Yds+UhGbOOWIhNHIloSvMfh7xQY=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
];
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
sh ./Build.sh -r
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -D mksh $out/bin/mksh
|
||||
install -D dot.mkshrc $out/share/mksh/mkshrc
|
||||
installManPage mksh.1
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://www.mirbsd.org/mksh.htm";
|
||||
description = "MirBSD Korn Shell";
|
||||
longDescription = ''
|
||||
The MirBSD Korn Shell is a DFSG-free and OSD-compliant (and OSI
|
||||
approved) successor to pdksh, developed as part of the MirOS
|
||||
Project as native Bourne/POSIX/Korn shell for MirOS BSD, but
|
||||
also to be readily available under other UNIX(R)-like operating
|
||||
systems.
|
||||
'';
|
||||
license = with licenses; [ miros isc unicode-dfs-2016 ];
|
||||
maintainers = with maintainers; [ AndersonTorres joachifm ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
|
||||
passthru = {
|
||||
shellPath = "/bin/mksh";
|
||||
};
|
||||
}
|
||||
# TODO [ AndersonTorres ]: lksh
|
||||
# TODO [ AndersonTorres ]: a more accurate licensing info
|
||||
31
pkgs/shells/mrsh/default.nix
Normal file
31
pkgs/shells/mrsh/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, readline }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mrsh-unstable";
|
||||
version = "2021-01-10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "emersion";
|
||||
repo = "mrsh";
|
||||
rev = "9f9884083831ea1f94bdda5151c5df3888932849";
|
||||
sha256 = "0vvdwzw3fq74lwgmy6xxkk01sd68fzhsw84c750lm1dma22xhjci";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [ meson ninja pkg-config ];
|
||||
buildInputs = [ readline ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A minimal POSIX shell";
|
||||
homepage = "https://mrsh.sh";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ matthiasbeyer ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
|
||||
passthru = {
|
||||
shellPath = "/bin/mrsh";
|
||||
};
|
||||
}
|
||||
29
pkgs/shells/nsh/default.nix
Normal file
29
pkgs/shells/nsh/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, rustPlatform, fetchFromGitHub }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "nsh";
|
||||
version = "0.4.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nuta";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1479wv8h5l2b0cwp27vpybq50nyvszhjxmn76n2bz3fchr0lrcbp";
|
||||
};
|
||||
|
||||
cargoSha256 = "1kxjr4ymns95g6jz94107nqmd71m2xh8k19gcsy08650gjrn5cz3";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A command-line shell like fish, but POSIX compatible";
|
||||
homepage = "https://github.com/nuta/nsh";
|
||||
changelog = "https://github.com/nuta/nsh/raw/v${version}/docs/changelog.md";
|
||||
license = [ licenses.cc0 /* or */ licenses.mit ];
|
||||
maintainers = [ maintainers.marsam ];
|
||||
};
|
||||
|
||||
passthru = {
|
||||
shellPath = "/bin/nsh";
|
||||
};
|
||||
}
|
||||
87
pkgs/shells/nushell/default.nix
Normal file
87
pkgs/shells/nushell/default.nix
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
, openssl
|
||||
, zlib
|
||||
, zstd
|
||||
, pkg-config
|
||||
, python3
|
||||
, xorg
|
||||
, libiconv
|
||||
, AppKit
|
||||
, Security
|
||||
, nghttp2
|
||||
, libgit2
|
||||
, cargo-edit
|
||||
, withExtraFeatures ? true
|
||||
, testers
|
||||
, nushell
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "nushell";
|
||||
version = "0.63.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-4thvUSOSvH/bv0aW7hGGQMvtXdS+yDfZzPRLZmPZQMQ=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-Vd8R9EsO52q840HqRzc37PirZZyTZr+Bnow5qHEacJ0=";
|
||||
# Since 0.34, nu has an indirect dependency on `zstd-sys` (via `polars` and
|
||||
# `parquet`, for dataframe support), which by default has an impure build
|
||||
# (git submodule for the `zstd` C library). The `pkg-config` feature flag
|
||||
# fixes this, but it's hard to invoke this in the right place, because of
|
||||
# the indirect dependencies. So add a direct dependency on `zstd-sys` here
|
||||
# at the top level, along with this feature flag, to ensure that when
|
||||
# `zstd-sys` is transitively invoked, it triggers a pure build using the
|
||||
# system `zstd` library provided above.
|
||||
depsExtraArgs = { nativeBuildInputs = [ cargo-edit ]; };
|
||||
# cargo add has been merged in to cargo so the above can be removed once 1.62.0 is available in nixpkgs
|
||||
# https://github.com/rust-lang/cargo/pull/10472
|
||||
cargoUpdateHook = ''
|
||||
cargo add zstd-sys --features pkg-config --offline
|
||||
# write the change to the lockfile
|
||||
cargo update --package zstd-sys --offline
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkg-config ]
|
||||
++ lib.optionals (withExtraFeatures && stdenv.isLinux) [ python3 ];
|
||||
|
||||
buildInputs = [ openssl zstd ]
|
||||
++ lib.optionals stdenv.isDarwin [ zlib libiconv Security ]
|
||||
++ lib.optionals (withExtraFeatures && stdenv.isLinux) [ xorg.libX11 ]
|
||||
++ lib.optionals (withExtraFeatures && stdenv.isDarwin) [ AppKit nghttp2 libgit2 ];
|
||||
|
||||
buildFeatures = lib.optional withExtraFeatures "extra";
|
||||
|
||||
# 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"
|
||||
HOME=$TMPDIR cargo test
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A modern shell written in Rust";
|
||||
homepage = "https://www.nushell.sh/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ Br1ght0ne johntitor marsam ];
|
||||
mainProgram = "nu";
|
||||
};
|
||||
|
||||
passthru = {
|
||||
shellPath = "/bin/nu";
|
||||
tests.version = testers.testVersion {
|
||||
package = nushell;
|
||||
};
|
||||
};
|
||||
}
|
||||
25
pkgs/shells/oh/default.nix
Normal file
25
pkgs/shells/oh/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ buildGoModule, fetchFromGitHub, lib }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "oh";
|
||||
version = "0.8.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "michaelmacinnis";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0sdpk77i5mfamkdqldybl9znzz92hqgi4xvby5j28m0a5gw46kj0";
|
||||
};
|
||||
|
||||
vendorSha256 = "12vlvh37hvi8c1i9arppm5wj4v9c98s7myxra10q6qpdqssgc8a0";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/michaelmacinnis/oh";
|
||||
description = "A new Unix shell";
|
||||
license = licenses.mit;
|
||||
};
|
||||
|
||||
passthru = {
|
||||
shellPath = "/bin/oh";
|
||||
};
|
||||
}
|
||||
44
pkgs/shells/oil/default.nix
Normal file
44
pkgs/shells/oil/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ stdenv, lib, fetchurl, withReadline ? true, readline }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "oil";
|
||||
version = "0.10.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.oilshell.org/download/oil-${version}.tar.xz";
|
||||
sha256 = "sha256-jI+QQ+jE3Qzd0b9VishVwBzDlFHCVKv8cZ0BsHnkd0Q=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs build
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $out/bin
|
||||
'';
|
||||
|
||||
strictDeps = true;
|
||||
buildInputs = lib.optional withReadline readline;
|
||||
configureFlags = lib.optional withReadline "--with-readline";
|
||||
|
||||
# Stripping breaks the bundles by removing the zip file from the end.
|
||||
dontStrip = true;
|
||||
|
||||
meta = {
|
||||
description = "A new unix shell";
|
||||
homepage = "https://www.oilshell.org/";
|
||||
|
||||
license = with lib.licenses; [
|
||||
psfl # Includes a portion of the python interpreter and standard library
|
||||
asl20 # Licence for Oil itself
|
||||
];
|
||||
|
||||
platforms = lib.platforms.all;
|
||||
maintainers = with lib.maintainers; [ lheckemann alva ];
|
||||
changelog = "https://www.oilshell.org/release/${version}/changelog.html";
|
||||
};
|
||||
|
||||
passthru = {
|
||||
shellPath = "/bin/osh";
|
||||
};
|
||||
}
|
||||
33
pkgs/shells/oksh/default.nix
Normal file
33
pkgs/shells/oksh/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ stdenv, lib, fetchFromGitHub, buildPackages }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "oksh";
|
||||
version = "7.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ibara";
|
||||
repo = pname;
|
||||
rev = "${pname}-${version}";
|
||||
sha256 = "sha256-076nD0aPps6n5qkR3LQJ6Kn2g3mkov+/M0qSvxNLZ6o=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
postPatch = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
||||
substituteInPlace configure --replace "./conftest" "echo"
|
||||
'';
|
||||
|
||||
configureFlags = [ "--no-strip" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Portable OpenBSD ksh, based on the Public Domain Korn Shell (pdksh)";
|
||||
homepage = "https://github.com/ibara/oksh";
|
||||
license = licenses.publicDomain;
|
||||
maintainers = with maintainers; [ siraben ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
|
||||
passthru = {
|
||||
shellPath = "/bin/oksh";
|
||||
};
|
||||
}
|
||||
30
pkgs/shells/pash/default.nix
Normal file
30
pkgs/shells/pash/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, fetchFromGitHub, buildDotnetPackage }:
|
||||
|
||||
buildDotnetPackage {
|
||||
pname = "pash";
|
||||
version = "git-2016-07-06";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Pash-Project";
|
||||
repo = "Pash";
|
||||
rev = "8d6a48f5ed70d64f9b49e6849b3ee35b887dc254";
|
||||
sha256 = "0c4wa8qi1zs01p9ck171jkw0n1rsymsrhpsb42gl7warwhpmv59f";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
preConfigure = "rm -rvf $src/Source/PashConsole/bin/*";
|
||||
|
||||
outputFiles = [ "Source/PashConsole/bin/Release/*" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "An open source implementation of Windows PowerShell";
|
||||
homepage = "https://github.com/Pash-Project/Pash";
|
||||
maintainers = [ maintainers.fornever maintainers.vrthra ];
|
||||
platforms = platforms.all;
|
||||
license = with licenses; [ bsd3 gpl3 ];
|
||||
};
|
||||
|
||||
passthru = {
|
||||
shellPath = "/bin/pash";
|
||||
};
|
||||
}
|
||||
87
pkgs/shells/powershell/default.nix
Normal file
87
pkgs/shells/powershell/default.nix
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
{ stdenv, lib, autoPatchelfHook, fetchzip, libunwind, libuuid, icu, curl
|
||||
, darwin, makeWrapper, less, openssl_1_1, pam, lttng-ust }:
|
||||
|
||||
let archString = if stdenv.isAarch64 then "arm64"
|
||||
else if stdenv.isx86_64 then "x64"
|
||||
else throw "unsupported platform";
|
||||
platformString = if stdenv.isDarwin then "osx"
|
||||
else if stdenv.isLinux then "linux"
|
||||
else throw "unsupported platform";
|
||||
platformSha = if (stdenv.isDarwin && stdenv.isx86_64) then "sha256-bcLyf/sIaFoS1xS4RLPPC9lVFa94IfQlWeXhyXUTsd0="
|
||||
else if (stdenv.isDarwin && stdenv.isAarch64) then "sha256-2UACjUtyQ611iXmwyiWrGwRVA0FT1cLLMKnY0y4SgoQ="
|
||||
else if (stdenv.isLinux && stdenv.isx86_64) then "sha256-5AZGwxpEqn3X20rCxPcvuqcQib689ui+e0jvri92EdA="
|
||||
else if (stdenv.isLinux && stdenv.isAarch64) then "sha256-90Sz32hm+EcK3nFJOGGCSqIEtW7w48G8mizXvcLb8WU="
|
||||
else throw "unsupported platform";
|
||||
platformLdLibraryPath = if stdenv.isDarwin then "DYLD_FALLBACK_LIBRARY_PATH"
|
||||
else if stdenv.isLinux then "LD_LIBRARY_PATH"
|
||||
else throw "unsupported platform";
|
||||
libraries = [ libunwind libuuid icu curl openssl_1_1 ] ++
|
||||
(if stdenv.isLinux then [ pam lttng-ust ] else [ darwin.Libsystem ]);
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "powershell";
|
||||
version = "7.2.4";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/PowerShell/PowerShell/releases/download/v${version}/powershell-${version}-${platformString}-${archString}.tar.gz";
|
||||
sha256 = platformSha;
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
buildInputs = [ less ] ++ libraries;
|
||||
nativeBuildInputs = [ makeWrapper ]
|
||||
++ lib.optional stdenv.isLinux autoPatchelfHook;
|
||||
|
||||
installPhase =
|
||||
let
|
||||
ext = stdenv.hostPlatform.extensions.sharedLibrary;
|
||||
in ''
|
||||
pslibs=$out/share/powershell
|
||||
mkdir -p $pslibs
|
||||
|
||||
cp -r * $pslibs
|
||||
|
||||
rm -f $pslibs/libcrypto${ext}.1.0.0
|
||||
rm -f $pslibs/libssl${ext}.1.0.0
|
||||
|
||||
# At least the 7.1.4-osx package does not have the executable bit set.
|
||||
chmod a+x $pslibs/pwsh
|
||||
|
||||
ls $pslibs
|
||||
'' + lib.optionalString (!stdenv.isDarwin && !stdenv.isAarch64) ''
|
||||
patchelf --replace-needed libcrypto${ext}.1.0.0 libcrypto${ext}.1.1 $pslibs/libmi.so
|
||||
patchelf --replace-needed libssl${ext}.1.0.0 libssl${ext}.1.1 $pslibs/libmi.so
|
||||
'' + lib.optionalString (!stdenv.isDarwin) ''
|
||||
patchelf --replace-needed liblttng-ust${ext}.0 liblttng-ust${ext}.1 $pslibs/libcoreclrtraceptprovider.so
|
||||
'' + ''
|
||||
|
||||
mkdir -p $out/bin
|
||||
|
||||
makeWrapper $pslibs/pwsh $out/bin/pwsh \
|
||||
--prefix ${platformLdLibraryPath} : "${lib.makeLibraryPath libraries}" \
|
||||
--set TERM xterm --set POWERSHELL_TELEMETRY_OPTOUT 1 --set DOTNET_CLI_TELEMETRY_OPTOUT 1
|
||||
'';
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
# May need a writable home, seen on Darwin.
|
||||
HOME=$TMP $out/bin/pwsh --help > /dev/null
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Powerful cross-platform (Windows, Linux, and macOS) shell and scripting language based on .NET";
|
||||
homepage = "https://github.com/PowerShell/PowerShell";
|
||||
maintainers = with maintainers; [ yrashk srgom p3psi ];
|
||||
mainProgram = "pwsh";
|
||||
platforms = [ "x86_64-darwin" "x86_64-linux" "aarch64-linux" "aarch64-darwin" ];
|
||||
license = with licenses; [ mit ];
|
||||
};
|
||||
|
||||
passthru = {
|
||||
shellPath = "/bin/pwsh";
|
||||
};
|
||||
|
||||
}
|
||||
36
pkgs/shells/powershell/getHashes.sh
Executable file
36
pkgs/shells/powershell/getHashes.sh
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p bash wget coreutils gnutar nix
|
||||
version=$1
|
||||
|
||||
if [[ -z $version ]]
|
||||
then
|
||||
echo "Pass the version to get hashes for as an argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
allOutput=""
|
||||
|
||||
dlDest=$(mktemp)
|
||||
exDest=$(mktemp -d)
|
||||
|
||||
trap 'rm $dlDest; rm -r $exDest' EXIT
|
||||
|
||||
for plat in osx linux; do
|
||||
for arch in x64 arm64; do
|
||||
|
||||
URL="https://github.com/PowerShell/PowerShell/releases/download/v$version/powershell-$version-$plat-$arch.tar.gz"
|
||||
wget $URL -O $dlDest >&2
|
||||
|
||||
tar -xzf $dlDest -C $exDest >&2
|
||||
|
||||
hash=$(nix hash path $exDest)
|
||||
|
||||
allOutput+="
|
||||
variant: $plat $arch
|
||||
hash: $hash
|
||||
"
|
||||
|
||||
done
|
||||
done
|
||||
|
||||
echo "$allOutput"
|
||||
45
pkgs/shells/rc/default.nix
Normal file
45
pkgs/shells/rc/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, byacc
|
||||
, ncurses, readline
|
||||
, historySupport ? false, readlineSupport ? true }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rc";
|
||||
version = "unstable-2021-08-03";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rakitzis";
|
||||
repo = "rc";
|
||||
rev = "8ca9ab1305c3e30cd064290081d6e5a1fa841d26";
|
||||
sha256 = "0744ars6y9zzsjr9xazms91qy6bi7msg2gg87526waziahfh4s4z";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [ autoreconfHook byacc ];
|
||||
|
||||
# acinclude.m4 wants headers for tgetent().
|
||||
buildInputs = [ ncurses ]
|
||||
++ lib.optionals readlineSupport [ readline ];
|
||||
|
||||
configureFlags = [
|
||||
"--enable-def-interp=${stdenv.shell}" #183
|
||||
] ++ lib.optionals historySupport [ "--with-history" ]
|
||||
++ lib.optionals readlineSupport [ "--with-edit=readline" ];
|
||||
|
||||
#reproducible-build
|
||||
postPatch = ''
|
||||
substituteInPlace configure.ac \
|
||||
--replace "$(git describe || echo '(git description unavailable)')" "${builtins.substring 0 7 src.rev}"
|
||||
'';
|
||||
|
||||
passthru.shellPath = "/bin/rc";
|
||||
|
||||
meta = with lib; {
|
||||
description = "The Plan 9 shell";
|
||||
longDescription = "Byron Rakitzis' UNIX reimplementation of Tom Duff's Plan 9 shell";
|
||||
homepage = "https://web.archive.org/web/20180820053030/tobold.org/article/rc";
|
||||
license = with licenses; zlib;
|
||||
maintainers = with maintainers; [ ramkromberg ];
|
||||
mainProgram = "rc";
|
||||
platforms = with platforms; all;
|
||||
};
|
||||
}
|
||||
50
pkgs/shells/rush/default.nix
Normal file
50
pkgs/shells/rush/default.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ fetchurl, lib, stdenv, bash, perl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rush";
|
||||
version = "2.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-ld5TdpF7siprQCbhE4oxYhH40x3QZ5NCQlD3zRaNmM0=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
buildInputs = [ bash ];
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace $out/bin/rush-po \
|
||||
--replace "exec perl" "exec ${lib.getExe perl}"
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
broken = stdenv.isDarwin;
|
||||
description = "Restricted User Shell";
|
||||
|
||||
longDescription =
|
||||
'' GNU Rush is a Restricted User Shell, designed for sites
|
||||
providing limited remote access to their resources, such as
|
||||
svn or git repositories, scp, or the like. Using a
|
||||
sophisticated configuration file, Rush gives you complete
|
||||
control over the command lines that users execute, as well as
|
||||
over the usage of system resources, such as virtual memory,
|
||||
CPU time, etc.
|
||||
|
||||
In particular, it allows remote programs to be run in a chrooted
|
||||
environment, which is important with such programs as
|
||||
sftp-server or scp, that lack this ability.
|
||||
'';
|
||||
|
||||
homepage = "https://www.gnu.org/software/rush/";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
|
||||
maintainers = [ lib.maintainers.bjg ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
|
||||
passthru = {
|
||||
shellPath = "/bin/rush";
|
||||
};
|
||||
}
|
||||
40
pkgs/shells/scponly/default.nix
Normal file
40
pkgs/shells/scponly/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ stdenv, lib, fetchFromGitHub, openssh, debugLevel ? 0 }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "scponly";
|
||||
version = "4.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "scponly";
|
||||
repo = "scponly";
|
||||
rev = "d8ca58257b9905186aa5706f35813d5f80ea07c1";
|
||||
sha256 = "U0K7lOp18ytNjh3KVFmc6vL+/tG4ETnwLEPQEhM4lXE=";
|
||||
};
|
||||
|
||||
patches = [ ./scponly-fix-make.patch ];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
# chroot doesn't seem to work, so not enabling
|
||||
# rsync could also be optionally enabled
|
||||
configureFlags = [
|
||||
"--enable-winscp-compat"
|
||||
"scponly_PROG_SFTP_SERVER=${lib.getBin openssh}/libexec/sftp-server"
|
||||
"scponly_PROG_SCP=${lib.getBin openssh}/bin/scp"
|
||||
];
|
||||
|
||||
postInstall = lib.optionalString (debugLevel > 0) ''
|
||||
mkdir -p $out/etc/scponly && echo ${
|
||||
toString debugLevel
|
||||
} > $out/etc/scponly/debuglevel
|
||||
'';
|
||||
|
||||
passthru.shellPath = "/bin/scponly";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A shell that only permits scp and sftp-server";
|
||||
homepage = "https://github.com/scponly/scponly";
|
||||
license = with licenses; [ bsd2 ];
|
||||
maintainers = with maintainers; [ wmertens ];
|
||||
};
|
||||
}
|
||||
21
pkgs/shells/scponly/scponly-fix-make.patch
Normal file
21
pkgs/shells/scponly/scponly-fix-make.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -41,14 +41,14 @@
|
||||
${INSTALL} -d ${DESTDIR}${bindir}
|
||||
${INSTALL} -d ${DESTDIR}${mandir}/man8
|
||||
${INSTALL} -d ${DESTDIR}${CONFDIR}
|
||||
- ${INSTALL} -o 0 -g 0 scponly ${DESTDIR}${bindir}/scponly
|
||||
- ${INSTALL} -o 0 -g 0 -m 0644 scponly.8 ${DESTDIR}${mandir}/man8/scponly.8
|
||||
- ${INSTALL} -o 0 -g 0 -m 0644 debuglevel ${DESTDIR}${DEBUGFILE}
|
||||
+ ${INSTALL} scponly ${DESTDIR}${bindir}/scponly
|
||||
+ ${INSTALL} -m 0644 scponly.8 ${DESTDIR}${mandir}/man8/scponly.8
|
||||
+ ${INSTALL} -m 0644 debuglevel ${DESTDIR}${DEBUGFILE}
|
||||
if test "x${CHROOTED_NAME}" != "x"; then \
|
||||
${INSTALL} -d ${DESTDIR}${sbindir}; \
|
||||
rm -f ${DESTDIR}${sbindir}/${CHROOTED_NAME}; \
|
||||
cp scponly ${CHROOTED_NAME}; \
|
||||
- ${INSTALL} -o 0 -g 0 -m 4755 ${CHROOTED_NAME} ${DESTDIR}${sbindir}/${CHROOTED_NAME}; \
|
||||
+ ${INSTALL} ${CHROOTED_NAME} ${DESTDIR}${sbindir}/${CHROOTED_NAME}; \
|
||||
fi
|
||||
|
||||
debuglevel:
|
||||
51
pkgs/shells/tcsh/default.nix
Normal file
51
pkgs/shells/tcsh/default.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, fetchpatch
|
||||
, ncurses
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tcsh";
|
||||
version = "6.24.00";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://tcsh/${pname}-${version}.tar.gz";
|
||||
hash = "sha256-YL4sUEvY8fpuQksZVkldfnztUqKslNtf0n9La/yPdPA=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
buildInputs = [
|
||||
ncurses
|
||||
];
|
||||
|
||||
patches = lib.optional stdenv.hostPlatform.isMusl
|
||||
# Use system malloc
|
||||
(fetchpatch {
|
||||
name = "sysmalloc.patch";
|
||||
url = "https://git.alpinelinux.org/aports/plain/community/tcsh/001-sysmalloc.patch?id=184585c046cdd56512f1a76e426dd799b368f8cf";
|
||||
sha256 = "1qc6ydxhdfizsbkaxhpn3wib8sfphrw10xnnsxx2prvzg9g2zp67";
|
||||
});
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.tcsh.org/";
|
||||
description = "An enhanced version of the Berkeley UNIX C shell (csh)";
|
||||
longDescription = ''
|
||||
tcsh is an enhanced but completely compatible version of the Berkeley UNIX
|
||||
C shell, csh. It is a command language interpreter usable both as an
|
||||
interactive login shell and a shell script command processor.
|
||||
|
||||
It includes:
|
||||
- command-line editor
|
||||
- programmable word completion
|
||||
- spelling correction
|
||||
- history mechanism
|
||||
- job control
|
||||
'';
|
||||
license = licenses.bsd2;
|
||||
maintainers = with maintainers; [ AndersonTorres ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
|
||||
passthru.shellPath = "/bin/tcsh";
|
||||
}
|
||||
87
pkgs/shells/xonsh/default.nix
Normal file
87
pkgs/shells/xonsh/default.nix
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, python3Packages
|
||||
, glibcLocales
|
||||
, coreutils
|
||||
, git
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "xonsh";
|
||||
version = "0.11.0";
|
||||
|
||||
# fetch from github because the pypi package ships incomplete tests
|
||||
src = fetchFromGitHub {
|
||||
owner = "xonsh";
|
||||
repo = "xonsh";
|
||||
rev = version;
|
||||
sha256 = "sha256-jfxQMEVABTOhx679V0iGVX9RisuY42lSdztYXMLwdcw=";
|
||||
};
|
||||
|
||||
LC_ALL = "en_US.UTF-8";
|
||||
|
||||
postPatch = ''
|
||||
sed -ie "s|/bin/ls|${coreutils}/bin/ls|" tests/test_execer.py
|
||||
sed -ie "s|SHELL=xonsh|SHELL=$out/bin/xonsh|" tests/test_integrations.py
|
||||
|
||||
sed -ie 's|/usr/bin/env|${coreutils}/bin/env|' tests/test_integrations.py
|
||||
sed -ie 's|/usr/bin/env|${coreutils}/bin/env|' scripts/xon.sh
|
||||
find scripts -name 'xonsh*' -exec sed -i -e "s|env -S|env|" {} \;
|
||||
find -name "*.xsh" | xargs sed -ie 's|/usr/bin/env|${coreutils}/bin/env|'
|
||||
patchShebangs .
|
||||
|
||||
substituteInPlace scripts/xon.sh \
|
||||
--replace 'python' "${python3Packages.python}/bin/python"
|
||||
|
||||
'';
|
||||
|
||||
makeWrapperArgs = [
|
||||
"--prefix PYTHONPATH : ${placeholder "out"}/lib/${python3Packages.python.libPrefix}/site-packages"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/xon.sh \
|
||||
$makeWrapperArgs
|
||||
'';
|
||||
|
||||
disabledTests = [
|
||||
# fails on sandbox
|
||||
"test_colorize_file"
|
||||
"test_loading_correctly"
|
||||
"test_no_command_path_completion"
|
||||
# fails on non-interactive shells
|
||||
"test_capture_always"
|
||||
"test_casting"
|
||||
"test_command_pipeline_capture"
|
||||
"test_dirty_working_directory"
|
||||
"test_man_completion"
|
||||
"test_vc_get_branch"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# fails on non-interactive shells
|
||||
"tests/prompt/test_gitstatus.py"
|
||||
"tests/completers/test_bash_completer.py"
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
HOME=$TMPDIR
|
||||
'';
|
||||
|
||||
checkInputs = [ glibcLocales git ] ++
|
||||
(with python3Packages; [ pyte pytestCheckHook pytest-mock pytest-subprocess ]);
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [ ply prompt-toolkit pygments ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Python-ish, BASHwards-compatible shell";
|
||||
homepage = "https://xon.sh/";
|
||||
changelog = "https://github.com/xonsh/xonsh/raw/${version}/CHANGELOG.rst";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ spwhitt vrthra ];
|
||||
};
|
||||
|
||||
passthru = {
|
||||
shellPath = "/bin/xonsh";
|
||||
};
|
||||
}
|
||||
24
pkgs/shells/yash/default.nix
Normal file
24
pkgs/shells/yash/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ stdenv, lib, fetchurl, gettext, ncurses }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "yash";
|
||||
version = "2.52";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://osdn.net/dl/yash/yash-${version}.tar.xz";
|
||||
hash = "sha256-VRN77/2DhIgFuM75DAxq9UB0SvzBA+Gw973z7xmRtck=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
buildInputs = [ gettext ncurses ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://yash.osdn.jp/index.html.en";
|
||||
description = "Yet another POSIX-compliant shell";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ qbit ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
|
||||
passthru.shellPath = "/bin/yash";
|
||||
}
|
||||
32
pkgs/shells/zsh/agkozak-zsh-prompt/default.nix
Normal file
32
pkgs/shells/zsh/agkozak-zsh-prompt/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ stdenvNoCC, lib, fetchFromGitHub }:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "agkozak-zsh-prompt";
|
||||
version = "3.11.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "agkozak";
|
||||
repo = "agkozak-zsh-prompt";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-TOfAWxw1uIV0hKV9o4EJjOlp+jmGWCONDex86ipegOY=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
plugindir="$out/share/zsh/site-functions"
|
||||
|
||||
mkdir -p "$plugindir"
|
||||
cp -r -- lib/*.zsh agkozak-zsh-prompt.plugin.zsh prompt_agkozak-zsh-prompt_setup "$plugindir"/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A fast, asynchronous Zsh prompt";
|
||||
homepage = "https://github.com/agkozak/agkozak-zsh-prompt";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ ambroisie ];
|
||||
};
|
||||
}
|
||||
26
pkgs/shells/zsh/antibody/default.nix
Normal file
26
pkgs/shells/zsh/antibody/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "antibody";
|
||||
version = "6.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "getantibody";
|
||||
repo = "antibody";
|
||||
rev = "v${version}";
|
||||
sha256 = "0icag53svzdm7yvzp855fp0f7q0g0jkfmjaa1sj6mmb01c1xgzi1";
|
||||
};
|
||||
|
||||
vendorSha256 = "0z8fma3v2dph8nv3q4lmv43s6p5sc338xb7kcmnpwcc0iw7b4vyj";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "The fastest shell plugin manager";
|
||||
homepage = "https://github.com/getantibody/antibody";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ Br1ght0ne ];
|
||||
};
|
||||
}
|
||||
26
pkgs/shells/zsh/antigen/default.nix
Normal file
26
pkgs/shells/zsh/antigen/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2.2.3";
|
||||
pname = "antigen";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/zsh-users/antigen/releases/download/v${version}/antigen.zsh";
|
||||
sha256 = "1bmp3qf14509swpxin4j9f98n05pdilzapjm0jdzbv0dy3hn20ix";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
outdir=$out/share/antigen
|
||||
mkdir -p $outdir
|
||||
cp $src $outdir/antigen.zsh
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "The plugin manager for zsh";
|
||||
homepage = "https://antigen.sharats.me/";
|
||||
license = lib.licenses.mit;
|
||||
};
|
||||
}
|
||||
109
pkgs/shells/zsh/default.nix
Normal file
109
pkgs/shells/zsh/default.nix
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, fetchpatch
|
||||
, autoreconfHook
|
||||
, yodl
|
||||
, perl
|
||||
, groff
|
||||
, util-linux
|
||||
, texinfo
|
||||
, ncurses
|
||||
, pcre
|
||||
, buildPackages }:
|
||||
|
||||
let
|
||||
version = "5.9";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "zsh";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/zsh/zsh-${version}.tar.xz";
|
||||
sha256 = "sha256-m40ezt1bXoH78ZGOh2dSp92UjgXBoNuhCrhjhC1FrNU=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# fix location of timezone data for TZ= completion
|
||||
./tz_completion.patch
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [ autoreconfHook perl groff texinfo pcre]
|
||||
++ lib.optionals stdenv.isLinux [ util-linux yodl ];
|
||||
|
||||
buildInputs = [ ncurses pcre ];
|
||||
|
||||
configureFlags = [
|
||||
"--enable-maildir-support"
|
||||
"--enable-multibyte"
|
||||
"--with-tcsetpgrp"
|
||||
"--enable-pcre"
|
||||
"--enable-zprofile=${placeholder "out"}/etc/zprofile"
|
||||
"--disable-site-fndir"
|
||||
];
|
||||
|
||||
# the zsh/zpty module is not available on hydra
|
||||
# so skip groups Y Z
|
||||
checkFlags = map (T: "TESTNUM=${T}") (lib.stringToCharacters "ABCDEVW");
|
||||
|
||||
# XXX: think/discuss about this, also with respect to nixos vs nix-on-X
|
||||
postInstall = lib.optionalString stdenv.isLinux ''
|
||||
make install.info install.html
|
||||
'' + ''
|
||||
mkdir -p $out/etc/
|
||||
cat > $out/etc/zprofile <<EOF
|
||||
if test -e /etc/NIXOS; then
|
||||
if test -r /etc/zprofile; then
|
||||
. /etc/zprofile
|
||||
else
|
||||
emulate bash
|
||||
alias shopt=false
|
||||
. /etc/profile
|
||||
unalias shopt
|
||||
emulate zsh
|
||||
fi
|
||||
if test -r /etc/zprofile.local; then
|
||||
. /etc/zprofile.local
|
||||
fi
|
||||
else
|
||||
# on non-nixos we just source the global /etc/zprofile as if we did
|
||||
# not use the configure flag
|
||||
if test -r /etc/zprofile; then
|
||||
. /etc/zprofile
|
||||
fi
|
||||
fi
|
||||
EOF
|
||||
${if stdenv.hostPlatform == stdenv.buildPlatform then ''
|
||||
$out/bin/zsh -c "zcompile $out/etc/zprofile"
|
||||
'' else ''
|
||||
${lib.getBin buildPackages.zsh}/bin/zsh -c "zcompile $out/etc/zprofile"
|
||||
''}
|
||||
mv $out/etc/zprofile $out/etc/zprofile_zwc_is_used
|
||||
|
||||
rm $out/bin/zsh-${version}
|
||||
'';
|
||||
# XXX: patch zsh to take zwc if newer _or equal_
|
||||
|
||||
meta = {
|
||||
description = "The Z shell";
|
||||
longDescription = ''
|
||||
Zsh is a UNIX command interpreter (shell) usable as an interactive login
|
||||
shell and as a shell script command processor. Of the standard shells,
|
||||
zsh most closely resembles ksh but includes many enhancements. Zsh has
|
||||
command line editing, builtin spelling correction, programmable command
|
||||
completion, shell functions (with autoloading), a history mechanism, and
|
||||
a host of other features.
|
||||
'';
|
||||
license = "MIT-like";
|
||||
homepage = "https://www.zsh.org/";
|
||||
maintainers = with lib.maintainers; [ pSub artturin ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
|
||||
passthru = {
|
||||
shellPath = "/bin/zsh";
|
||||
};
|
||||
}
|
||||
38
pkgs/shells/zsh/fzf-zsh/default.nix
Normal file
38
pkgs/shells/zsh/fzf-zsh/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ lib, stdenv, fetchFromGitHub, fzf }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fzf-zsh-unstable";
|
||||
version = "2019-09-09";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Wyntau";
|
||||
repo = "fzf-zsh";
|
||||
rev = "829d7e40cc437dce8a6e234e259bbd4065e87124";
|
||||
sha256 = "1irjmxhcg1fm4g8p3psjqk7sz5qhj5kw73pyhv91njvpdhn9l26z";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
postPatch = ''
|
||||
substituteInPlace fzf-zsh.plugin.zsh \
|
||||
--replace \
|
||||
'fzf_path="$( cd "$fzf_zsh_path/../fzf/" && pwd )"' \
|
||||
"fzf_path=${fzf}" \
|
||||
--replace \
|
||||
'$fzf_path/shell' \
|
||||
'${fzf}/share/fzf'
|
||||
'';
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
install -Dm0644 fzf-zsh.plugin.zsh $out/share/zsh/plugins/fzf-zsh/fzf-zsh.plugin.zsh
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/wyntau/fzf-zsh";
|
||||
description = "wrap fzf to use in oh-my-zsh";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ma27 ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
37
pkgs/shells/zsh/gradle-completion/default.nix
Normal file
37
pkgs/shells/zsh/gradle-completion/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gradle-completion";
|
||||
version = "1.4.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gradle";
|
||||
repo = "gradle-completion";
|
||||
rev = "v${version}";
|
||||
sha256 = "15b0692i3h8h7b95465b2aw9qf5qjmjag5n62347l8yl7zbhv3l2";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
# we just move two files into $out,
|
||||
# this shouldn't bother Hydra.
|
||||
preferLocalBuild = true;
|
||||
|
||||
dontBuild = true;
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out
|
||||
install -Dm0644 ./_gradle $out/share/zsh/site-functions/_gradle
|
||||
install -Dm0644 ./gradle-completion.bash $out/share/bash-completion/completions/gradle
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Gradle tab completion for bash and zsh";
|
||||
homepage = "https://github.com/gradle/gradle-completion";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
43
pkgs/shells/zsh/grml-zsh-config/default.nix
Normal file
43
pkgs/shells/zsh/grml-zsh-config/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ stdenv, fetchFromGitHub, lib
|
||||
, zsh, coreutils, inetutils, procps, txt2tags }:
|
||||
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "grml-zsh-config";
|
||||
version = "0.19.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "grml";
|
||||
repo = "grml-etc-core";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-9BknWrYgLv9xx9TlVAJxRzVUmbz5v6f7swPDsE4P6WY=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [ txt2tags ];
|
||||
buildInputs = [ zsh coreutils procps ]
|
||||
++ optional stdenv.isLinux inetutils;
|
||||
|
||||
buildPhase = ''
|
||||
cd doc
|
||||
make
|
||||
cd ..
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -D -m644 etc/zsh/keephack $out/etc/zsh/keephack
|
||||
install -D -m644 etc/zsh/zshrc $out/etc/zsh/zshrc
|
||||
|
||||
install -D -m644 doc/grmlzshrc.5 $out/share/man/man5/grmlzshrc.5
|
||||
ln -s grmlzshrc.5.gz $out/share/man/man5/grml-zsh-config.5.gz
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "grml's zsh setup";
|
||||
homepage = "https://grml.org/zsh/";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ msteen rvolosatovs ];
|
||||
};
|
||||
}
|
||||
26
pkgs/shells/zsh/lambda-mod-zsh-theme/default.nix
Normal file
26
pkgs/shells/zsh/lambda-mod-zsh-theme/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "lambda-mod-zsh-theme-unstable";
|
||||
version = "2020-10-03";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "halfo";
|
||||
repo = "lambda-mod-zsh-theme";
|
||||
rev = "78347ea9709935f265e558b6345919d12323fbff";
|
||||
sha256 = "0fvxnvgbcvwii7ghvpj5l43frllq71wwjvfg7cqfmic727z001dh";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
installPhase = ''
|
||||
install -Dm0644 lambda-mod.zsh-theme $out/share/zsh/themes/lambda-mod.zsh-theme
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
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.all;
|
||||
maintainers = with maintainers; [ ma27 ];
|
||||
};
|
||||
}
|
||||
29
pkgs/shells/zsh/nix-zsh-completions/default.nix
Normal file
29
pkgs/shells/zsh/nix-zsh-completions/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "nix-zsh-completions";
|
||||
version = "0.4.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "spwhitt";
|
||||
repo = "nix-zsh-completions";
|
||||
rev = version;
|
||||
sha256 = "1n9whlys95k4wc57cnz3n07p7zpkv796qkmn68a50ygkx6h3afqf";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/zsh/{site-functions,plugins/nix}
|
||||
cp _* $out/share/zsh/site-functions
|
||||
cp *.zsh $out/share/zsh/plugins/nix
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/spwhitt/nix-zsh-completions";
|
||||
description = "ZSH completions for Nix, NixOS, and NixOps";
|
||||
priority = 6; # prevent collisions with nix 2.4's built-in completions
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ spwhitt olejorgenb hedning ma27 ];
|
||||
};
|
||||
}
|
||||
127
pkgs/shells/zsh/oh-my-zsh/default.nix
Normal file
127
pkgs/shells/zsh/oh-my-zsh/default.nix
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
# This script was inspired by the ArchLinux User Repository package:
|
||||
#
|
||||
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=oh-my-zsh-git
|
||||
{ lib, stdenv, fetchFromGitHub, nixosTests, writeScript, common-updater-scripts
|
||||
, git, nix, nixfmt, jq, coreutils, gnused, curl, cacert, bash }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2022-06-06";
|
||||
pname = "oh-my-zsh";
|
||||
rev = "d41ca84af1271e8bfbe26f581cebe3b86521d0db";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
inherit rev;
|
||||
owner = "ohmyzsh";
|
||||
repo = "ohmyzsh";
|
||||
sha256 = "87jAe5cEPj6e1raovj8sD4LZB1sfrSZkCleW8of2HP8=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
buildInputs = [ bash ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
outdir=$out/share/oh-my-zsh
|
||||
template=templates/zshrc.zsh-template
|
||||
|
||||
mkdir -p $outdir
|
||||
cp -r * $outdir
|
||||
cd $outdir
|
||||
|
||||
rm LICENSE.txt
|
||||
rm -rf .git*
|
||||
|
||||
chmod -R +w templates
|
||||
|
||||
# Change the path to oh-my-zsh dir and disable auto-updating.
|
||||
sed -i -e "s#ZSH=\$HOME/.oh-my-zsh#ZSH=$outdir#" \
|
||||
-e 's/\# \(DISABLE_AUTO_UPDATE="true"\)/\1/' \
|
||||
$template
|
||||
|
||||
chmod +w oh-my-zsh.sh
|
||||
|
||||
# Both functions expect oh-my-zsh to be in ~/.oh-my-zsh and try to
|
||||
# modify the directory.
|
||||
cat >> oh-my-zsh.sh <<- EOF
|
||||
|
||||
# Undefine functions that don't work on Nix.
|
||||
unfunction uninstall_oh_my_zsh
|
||||
unfunction upgrade_oh_my_zsh
|
||||
EOF
|
||||
|
||||
# Look for .zsh_variables, .zsh_aliases, and .zsh_funcs, and source
|
||||
# them, if found.
|
||||
cat >> $template <<- EOF
|
||||
|
||||
# Load the variables.
|
||||
if [ -f ~/.zsh_variables ]; then
|
||||
. ~/.zsh_variables
|
||||
fi
|
||||
|
||||
# Load the functions.
|
||||
if [ -f ~/.zsh_funcs ]; then
|
||||
. ~/.zsh_funcs
|
||||
fi
|
||||
|
||||
# Load the aliases.
|
||||
if [ -f ~/.zsh_aliases ]; then
|
||||
. ~/.zsh_aliases
|
||||
fi
|
||||
EOF
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
tests = { inherit (nixosTests) oh-my-zsh; };
|
||||
|
||||
updateScript = writeScript "update.sh" ''
|
||||
#!${stdenv.shell}
|
||||
set -o errexit
|
||||
PATH=${
|
||||
lib.makeBinPath [
|
||||
common-updater-scripts
|
||||
curl
|
||||
cacert
|
||||
git
|
||||
nixfmt
|
||||
nix
|
||||
jq
|
||||
coreutils
|
||||
gnused
|
||||
]
|
||||
}
|
||||
|
||||
oldVersion="$(nix-instantiate --eval -E "with import ./. {}; lib.getVersion oh-my-zsh" | tr -d '"')"
|
||||
latestSha="$(curl -L -s https://api.github.com/repos/ohmyzsh/ohmyzsh/commits\?sha\=master\&since\=$oldVersion | jq -r '.[0].sha')"
|
||||
|
||||
if [ ! "null" = "$latestSha" ]; then
|
||||
nixpkgs="$(git rev-parse --show-toplevel)"
|
||||
default_nix="$nixpkgs/pkgs/shells/zsh/oh-my-zsh/default.nix"
|
||||
latestDate="$(curl -L -s https://api.github.com/repos/ohmyzsh/ohmyzsh/commits/$latestSha | jq '.commit.committer.date' | sed 's|"\(.*\)T.*|\1|g')"
|
||||
update-source-version oh-my-zsh "$latestSha" --version-key=rev
|
||||
update-source-version oh-my-zsh "$latestDate" --ignore-same-hash
|
||||
nixfmt "$default_nix"
|
||||
else
|
||||
echo "${pname} is already up-to-date"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A framework for managing your zsh configuration";
|
||||
longDescription = ''
|
||||
Oh My Zsh is a framework for managing your zsh configuration.
|
||||
|
||||
To copy the Oh My Zsh configuration file to your home directory, run
|
||||
the following command:
|
||||
|
||||
$ cp -v $(nix-env -q --out-path oh-my-zsh | cut -d' ' -f3)/share/oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
|
||||
'';
|
||||
homepage = "https://ohmyz.sh/";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ nequissimus ];
|
||||
};
|
||||
}
|
||||
31
pkgs/shells/zsh/pure-prompt/default.nix
Normal file
31
pkgs/shells/zsh/pure-prompt/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pure-prompt";
|
||||
version = "1.20.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sindresorhus";
|
||||
repo = "pure";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-iuLi0o++e0PqK81AKWfIbCV0CTIxq2Oki6U2oEYsr68=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
installPhase = ''
|
||||
OUTDIR="$out/share/zsh/site-functions"
|
||||
mkdir -p "$OUTDIR"
|
||||
cp pure.zsh "$OUTDIR/prompt_pure_setup"
|
||||
cp async.zsh "$OUTDIR/async"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Pretty, minimal and fast ZSH prompt";
|
||||
homepage = "https://github.com/sindresorhus/pure";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ pacien pablovsky ];
|
||||
};
|
||||
}
|
||||
39
pkgs/shells/zsh/spaceship-prompt/default.nix
Normal file
39
pkgs/shells/zsh/spaceship-prompt/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ lib, stdenvNoCC, fetchFromGitHub }:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "spaceship-prompt";
|
||||
version = "3.16.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "denysdovhan";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-4G1+K6ENLwChtivR7Ura0vl6Ph9Wae3SOXCW1pNbgHI=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
install -Dm644 LICENSE.md "$out/share/licenses/spaceship-prompt/LICENSE"
|
||||
install -Dm644 README.md "$out/share/doc/spaceship-prompt/README.md"
|
||||
find docs -type f -exec install -Dm644 {} "$out/share/doc/spaceship-prompt/{}" \;
|
||||
find lib -type f -exec install -Dm644 {} "$out/lib/spaceship-prompt/{}" \;
|
||||
find scripts -type f -exec install -Dm644 {} "$out/lib/spaceship-prompt/{}" \;
|
||||
find sections -type f -exec install -Dm644 {} "$out/lib/spaceship-prompt/{}" \;
|
||||
install -Dm644 spaceship.zsh "$out/lib/spaceship-prompt/spaceship.zsh"
|
||||
install -d "$out/share/zsh/themes/"
|
||||
ln -s "$out/lib/spaceship-prompt/spaceship.zsh" "$out/share/zsh/themes/spaceship.zsh-theme"
|
||||
install -d "$out/share/zsh/site-functions/"
|
||||
ln -s "$out/lib/spaceship-prompt/spaceship.zsh" "$out/share/zsh/site-functions/prompt_spaceship_setup"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Zsh prompt for Astronauts";
|
||||
homepage = "https://github.com/denysdovhan/spaceship-prompt/";
|
||||
changelog = "https://github.com/spaceship-prompt/spaceship-prompt/releases/tag/v${version}";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ nyanloutre fortuneteller2k ];
|
||||
};
|
||||
}
|
||||
14
pkgs/shells/zsh/tz_completion.patch
Normal file
14
pkgs/shells/zsh/tz_completion.patch
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
On NixOS, timezone data is located at /etc/zoneinfo
|
||||
diff --git a/Completion/Unix/Type/_time_zone b/Completion/Unix/Type/_time_zone
|
||||
index cd924bbc7..5d683291b 100644
|
||||
--- a/Completion/Unix/Type/_time_zone
|
||||
+++ b/Completion/Unix/Type/_time_zone
|
||||
@@ -3,7 +3,7 @@
|
||||
local expl
|
||||
|
||||
if (( ! $+_zoneinfo_dirs )); then
|
||||
- _zoneinfo_dirs=( /usr/{share,lib,share/lib}/{zoneinfo*,locale/TZ}(/) )
|
||||
+ _zoneinfo_dirs=( /etc/zoneinfo /usr/{share,lib,share/lib}/{zoneinfo*,locale/TZ}(/) )
|
||||
fi
|
||||
|
||||
_wanted time-zones expl 'time zone' _files -W _zoneinfo_dirs "$@" -
|
||||
43
pkgs/shells/zsh/zinit/default.nix
Normal file
43
pkgs/shells/zsh/zinit/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ stdenvNoCC, lib, fetchFromGitHub, installShellFiles }:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "zinit";
|
||||
version = "3.7";
|
||||
src = fetchFromGitHub {
|
||||
owner = "zdharma-continuum";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-B+cTGz+U8MR22l6xXdRAAjDr+ulCk+CJ9GllFMK0axE=";
|
||||
};
|
||||
# adapted from https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=zsh-zplugin-git
|
||||
dontBuild = true;
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
installPhase = ''
|
||||
outdir="$out/share/$pname"
|
||||
|
||||
cd "$src"
|
||||
|
||||
# Zplugin's source files
|
||||
install -dm0755 "$outdir"
|
||||
# Installing also backward compatibility layer
|
||||
install -m0644 z{plugin,init}{,-side,-install,-autoload}.zsh "$outdir"
|
||||
install -m0755 git-process-output.zsh "$outdir"
|
||||
|
||||
# Zplugin autocompletion
|
||||
installShellCompletion --zsh _zinit
|
||||
|
||||
#TODO:Zplugin-module files
|
||||
# find zmodules/ -type d -exec install -dm 755 "{}" "$outdir/{}" \;
|
||||
# find zmodules/ -type f -exec install -m 744 "{}" "$outdir/{}" \;
|
||||
|
||||
'';
|
||||
#TODO:doc output
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/zdharma-continuum/zinit";
|
||||
description = "Flexible zsh plugin manager";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ pasqui23 sei40kr ];
|
||||
};
|
||||
}
|
||||
32
pkgs/shells/zsh/zplug/default.nix
Normal file
32
pkgs/shells/zsh/zplug/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ stdenv, lib, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "zplug";
|
||||
version = "2.4.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zplug";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0hci1pbs3k5icwfyfw5pzcgigbh9vavprxxvakg1xm19n8zb61b3";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
dontPatch = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r $src/* $out/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A next-generation plugin manager for zsh";
|
||||
homepage = "https://github.com/zplug/zplug";
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.s1341 ];
|
||||
mainProgram = "zplug-env";
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
28
pkgs/shells/zsh/zsh-autocomplete/default.nix
Normal file
28
pkgs/shells/zsh/zsh-autocomplete/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenvNoCC, fetchFromGitHub }:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "zsh-autocomplete";
|
||||
version = "22.01.21";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "marlonrichert";
|
||||
repo = "zsh-autocomplete";
|
||||
rev = version;
|
||||
sha256 = "sha256-+UziTYsjgpiumSulrLojuqHtDrgvuG91+XNiaMD7wIs=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
installPhase = ''
|
||||
install -D zsh-autocomplete.plugin.zsh $out/share/zsh-autocomplete/zsh-autocomplete.plugin.zsh
|
||||
cp -R scripts $out/share/zsh-autocomplete/scripts
|
||||
cp -R functions $out/share/zsh-autocomplete/functions
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Real-time type-ahead completion for Zsh. Asynchronous find-as-you-type autocompletion";
|
||||
homepage = "https://github.com/marlonrichert/zsh-autocomplete/";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
maintainers = [ maintainers.leona ];
|
||||
};
|
||||
}
|
||||
27
pkgs/shells/zsh/zsh-autopair/default.nix
Normal file
27
pkgs/shells/zsh/zsh-autopair/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ stdenv, lib, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "zsh-autopair";
|
||||
version = "1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hlissner";
|
||||
repo = "zsh-autopair";
|
||||
rev = "v${version}";
|
||||
sha256 = "1h0vm2dgrmb8i2pvsgis3lshc5b0ad846836m62y8h3rdb3zmpy1";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
installPhase = ''
|
||||
install -D autopair.zsh $out/share/zsh/${pname}/autopair.zsh
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/hlissner/zsh-autopair";
|
||||
description = "A plugin that auto-closes, deletes and skips over matching delimiters in zsh intelligently";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ _0qq ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
31
pkgs/shells/zsh/zsh-autosuggestions/default.nix
Normal file
31
pkgs/shells/zsh/zsh-autosuggestions/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, fetchFromGitHub, zsh }:
|
||||
|
||||
# To make use of this derivation, use the `programs.zsh.autosuggestions.enable` option
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "zsh-autosuggestions";
|
||||
version = "0.7.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-autosuggestions";
|
||||
rev = "v${version}";
|
||||
sha256 = "1g3pij5qn2j7v7jjac2a63lxd97mcsgw6xq6k5p7835q9fjiid98";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
buildInputs = [ zsh ];
|
||||
|
||||
installPhase = ''
|
||||
install -D zsh-autosuggestions.zsh \
|
||||
$out/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fish shell autosuggestions for Zsh";
|
||||
homepage = "https://github.com/zsh-users/zsh-autosuggestions";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
maintainers = [ maintainers.loskutov ];
|
||||
};
|
||||
}
|
||||
32
pkgs/shells/zsh/zsh-bd/default.nix
Normal file
32
pkgs/shells/zsh/zsh-bd/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, stdenv, fetchFromGitHub}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "zsh-bd";
|
||||
version = "2018-07-04";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Tarrasch";
|
||||
repo = pname;
|
||||
rev = "d4a55e661b4c9ef6ae4568c6abeff48bdf1b1af7";
|
||||
sha256 = "020f8nq86g96cps64hwrskppbh2dapfw2m9np1qbs5pgh16z4fcb";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/zsh-bd
|
||||
cp {.,$out/share/zsh-bd}/bd.zsh
|
||||
cd $out/share/zsh-bd
|
||||
ln -s bd{,.plugin}.zsh
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Jump back to a specific directory, without doing `cd ../../..` ";
|
||||
homepage = "https://github.com/Tarrasch/zsh-bd";
|
||||
license = lib.licenses.free;
|
||||
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = [ lib.maintainers.olejorgenb ];
|
||||
};
|
||||
}
|
||||
26
pkgs/shells/zsh/zsh-better-npm-completion/default.nix
Normal file
26
pkgs/shells/zsh/zsh-better-npm-completion/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "zsh-better-npm-completion";
|
||||
version = "unstable-2019-11-19";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lukechilds";
|
||||
repo = "zsh-better-npm-completion";
|
||||
rev = "0a7cf042415324ec38a186fdcbc9af163f0d7e69";
|
||||
sha256 = "16z7k5n1rcl9i61lrm7i5dsqsmhvdp1y4y5ii6hv2xpp470addgy";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
installPhase = ''
|
||||
install -Dm 0644 zsh-better-npm-completion.plugin.zsh $out/share/zsh-better-npm-completion
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Better completion for npm";
|
||||
homepage = "https://github.com/lukechilds/zsh-better-npm-completion";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
maintainers = [ maintainers.gerschtli ];
|
||||
};
|
||||
}
|
||||
40
pkgs/shells/zsh/zsh-clipboard/clipboard.plugin.zsh
Normal file
40
pkgs/shells/zsh/zsh-clipboard/clipboard.plugin.zsh
Normal file
|
|
@ -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
|
||||
28
pkgs/shells/zsh/zsh-clipboard/default.nix
Normal file
28
pkgs/shells/zsh/zsh-clipboard/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ stdenv, lib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "zsh-clipboard";
|
||||
version = "1.0";
|
||||
|
||||
src = ./.;
|
||||
|
||||
strictDeps = true;
|
||||
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;
|
||||
};
|
||||
}
|
||||
35
pkgs/shells/zsh/zsh-command-time/default.nix
Normal file
35
pkgs/shells/zsh/zsh-command-time/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
# To make use of this plugin, need to add
|
||||
# programs.zsh.interactiveShellInit = ''
|
||||
# source ${pkgs.zsh-command-time}/share/zsh/plugins/command-time/command-time.plugin.zsh
|
||||
# ZSH_COMMAND_TIME_COLOR="yellow"
|
||||
# ZSH_COMMAND_TIME_MIN_SECONDS=3
|
||||
# ZSH_COMMAND_TIME_ECHO=1
|
||||
# '';
|
||||
|
||||
stdenv.mkDerivation {
|
||||
version = "2018-04-30";
|
||||
pname = "zsh-command-time";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "popstas";
|
||||
repo = "zsh-command-time";
|
||||
rev = "afb4a4c9ae7ce64ca9d4f334a79a25e46daad0aa";
|
||||
sha256 = "1bvyjgz6bhgg1nwr56r50p6fblgah6yiql55pgm5abnn2h876fjq";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
install -Dm0444 $src/command-time.plugin.zsh --target-directory=$out/share/zsh/plugins/command-time
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Plugin that output time: xx after long commands";
|
||||
homepage = "https://github.com/popstas/zsh-command-time";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
27
pkgs/shells/zsh/zsh-completions/default.nix
Normal file
27
pkgs/shells/zsh/zsh-completions/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, stdenv, fetchFromGitHub}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "zsh-completions";
|
||||
version = "0.33.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0vs14n29wvkai84fvz3dz2kqznwsq2i5fzbwpv8nsfk1126ql13i";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
installPhase= ''
|
||||
install -D --target-directory=$out/share/zsh/site-functions src/*
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Additional completion definitions for zsh";
|
||||
homepage = "https://github.com/zsh-users/zsh-completions";
|
||||
license = lib.licenses.free;
|
||||
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = [ lib.maintainers.olejorgenb ];
|
||||
};
|
||||
}
|
||||
35
pkgs/shells/zsh/zsh-deer/default.nix
Normal file
35
pkgs/shells/zsh/zsh-deer/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ lib, stdenv, fetchFromGitHub, perl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "deer";
|
||||
version = "1.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Vifon";
|
||||
repo = "deer";
|
||||
rev = "v${version}";
|
||||
sha256 = "1xnbnbi0zk2xsyn8dqsmyxqlfnl36pb1wwibnlp0dxixw6sfymyl";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace deer \
|
||||
--replace " perl " " ${perl}/bin/perl "
|
||||
'';
|
||||
|
||||
patches = [ ./realpath.patch ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/zsh/site-functions/
|
||||
cp deer $out/share/zsh/site-functions/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Ranger-like file navigation for zsh";
|
||||
homepage = "https://github.com/Vifon/deer";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = [ maintainers.vyp ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
28
pkgs/shells/zsh/zsh-deer/realpath.patch
Normal file
28
pkgs/shells/zsh/zsh-deer/realpath.patch
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
From ceadb2f11119143af4f590ea6b05a531483219b5 Mon Sep 17 00:00:00 2001
|
||||
From: xd1le <elisp.vim@gmail.com>
|
||||
Date: Wed, 30 Aug 2017 17:27:20 +1000
|
||||
Subject: [PATCH] use realpath instead of python to calculate relative path
|
||||
|
||||
---
|
||||
deer | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
diff --git a/deer b/deer
|
||||
index 3d89dea..804a871 100644
|
||||
--- a/deer
|
||||
+++ b/deer
|
||||
@@ -259,10 +259,7 @@ deer-get-relative()
|
||||
{
|
||||
local TMP
|
||||
TMP=${1:-${DEER_DIRNAME%/}/$DEER_BASENAME[$DEER_DIRNAME]}
|
||||
- TMP="`python -c '
|
||||
-import sys, os
|
||||
-print(os.path.relpath(sys.argv[1], sys.argv[2]))
|
||||
-' $TMP ${DEER_STARTDIR:-$PWD}`"
|
||||
+ TMP="`realpath --relative-to=${DEER_STARTDIR:-$PWD} $TMP`"
|
||||
print -R $TMP:q
|
||||
}
|
||||
|
||||
--
|
||||
2.14.1
|
||||
|
||||
31
pkgs/shells/zsh/zsh-fast-syntax-highlighting/default.nix
Normal file
31
pkgs/shells/zsh/zsh-fast-syntax-highlighting/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ stdenvNoCC, lib, fetchFromGitHub }:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "zsh-fast-syntax-highlighting";
|
||||
version = "1.55";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zdharma-continuum";
|
||||
repo = "fast-syntax-highlighting";
|
||||
rev = "v${version}";
|
||||
sha256 = "0h7f27gz586xxw7cc0wyiv3bx0x3qih2wwh05ad85bh2h834ar8d";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
plugindir="$out/share/zsh/site-functions"
|
||||
|
||||
mkdir -p "$plugindir"
|
||||
cp -r -- {,_,-,.}fast-* *chroma themes "$plugindir"/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Syntax-highlighting for Zshell";
|
||||
homepage = "https://github.com/zdharma-continuum/fast-syntax-highlighting";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
46
pkgs/shells/zsh/zsh-fzf-tab/default.nix
Normal file
46
pkgs/shells/zsh/zsh-fzf-tab/default.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ stdenv, lib, fetchFromGitHub, ncurses }:
|
||||
|
||||
let
|
||||
INSTALL_PATH="${placeholder "out"}/share/fzf-tab";
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "zsh-fzf-tab";
|
||||
version = "unstable-2022-04-15";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Aloxaf";
|
||||
repo = "fzf-tab";
|
||||
rev = "7e0eee64df6c7c81a57792674646b5feaf89f263";
|
||||
sha256 = "sha256-ixUnuNtxxmiigeVjzuV5uG6rIBPY/1vdBZF2/Qv0Trs=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
buildInputs = [ ncurses ];
|
||||
|
||||
postConfigure = ''
|
||||
pushd modules
|
||||
./configure --disable-gdbm --without-tcsetpgrp
|
||||
popd
|
||||
'';
|
||||
|
||||
postBuild = ''
|
||||
pushd modules
|
||||
make -j$NIX_BUILD_CORES
|
||||
popd
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p ${INSTALL_PATH}
|
||||
cp -r lib ${INSTALL_PATH}/lib
|
||||
install -D fzf-tab.zsh ${INSTALL_PATH}/fzf-tab.zsh
|
||||
install -D fzf-tab.plugin.zsh ${INSTALL_PATH}/fzf-tab.plugin.zsh
|
||||
install -D modules/Src/aloxaf/fzftab.so ${INSTALL_PATH}/modules/Src/aloxaf/fzftab.so
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/Aloxaf/fzf-tab";
|
||||
description = "Replace zsh's default completion selection menu with fzf!";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ vonfry ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
70
pkgs/shells/zsh/zsh-git-prompt/default.nix
Normal file
70
pkgs/shells/zsh/zsh-git-prompt/default.nix
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
# zsh-git-prompt -- Informative git prompt for zsh
|
||||
#
|
||||
# Usage: to enable this plugin for all users, you could
|
||||
# add it to configuration.nix like this:
|
||||
#
|
||||
# programs.zsh.interactiveShellInit = ''
|
||||
# source ${pkgs.zsh-git-prompt}/share/zsh-git-prompt/zshrc.sh
|
||||
# '';
|
||||
#
|
||||
# Or you can install it globally but only enable it in individual
|
||||
# users' ~/.zshrc files:
|
||||
#
|
||||
# source /run/current-system/sw/share/zsh-git-prompt/zshrc.sh
|
||||
#
|
||||
# Or if installed locally:
|
||||
#
|
||||
# source ~/.nix-profile/share/zsh-git-prompt/zshrc.sh
|
||||
#
|
||||
# Either way, you then have to set a prompt that incorporates
|
||||
# git_super_status, for example:
|
||||
#
|
||||
# PROMPT='%B%m%~%b$(git_super_status) %# '
|
||||
#
|
||||
# More details are in share/doc/zsh-git-prompt/README.md, once
|
||||
# installed.
|
||||
#
|
||||
{ fetchFromGitHub
|
||||
, python2
|
||||
, git
|
||||
, lib
|
||||
, haskellPackages
|
||||
}:
|
||||
|
||||
haskellPackages.callPackage
|
||||
({ mkDerivation, base, HUnit, parsec, process, QuickCheck }:
|
||||
mkDerivation rec {
|
||||
pname = "zsh-git-prompt";
|
||||
version = "0.4z"; # While we await a real 0.5 release.
|
||||
src = fetchFromGitHub {
|
||||
owner = "starcraftman";
|
||||
repo = "zsh-git-prompt";
|
||||
rev = "11b83ba3b85d14c66cf2ab79faefab6d838da28e";
|
||||
sha256 = "04aylsjfb03ckw219plkzpyiq4j9g66bjxa5pa56h1p7df6pjssb";
|
||||
};
|
||||
prePatch = ''
|
||||
substituteInPlace zshrc.sh \
|
||||
--replace ':-"python"' ':-"haskell"' \
|
||||
--replace 'python ' '${python2.interpreter} ' \
|
||||
--replace 'git ' '${git}/bin/git '
|
||||
'';
|
||||
preCompileBuildDriver = "cd src";
|
||||
postInstall = ''
|
||||
cd ..
|
||||
gpshare=$out/share/${pname}
|
||||
gpdoc=$out/share/doc/${pname}
|
||||
mkdir -p $gpshare/src $gpdoc
|
||||
cp README.md $gpdoc
|
||||
cp zshrc.sh gitstatus.py $gpshare
|
||||
mv $out/bin $gpshare/src/.bin
|
||||
'';
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [ base parsec process QuickCheck ];
|
||||
executableHaskellDepends = libraryHaskellDepends;
|
||||
testHaskellDepends = [HUnit] ++ libraryHaskellDepends;
|
||||
homepage = "https://github.com/olivierverdier/zsh-git-prompt#readme";
|
||||
description = "Informative git prompt for zsh";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [lib.maintainers.league];
|
||||
}) {}
|
||||
31
pkgs/shells/zsh/zsh-history-search-multi-word/default.nix
Normal file
31
pkgs/shells/zsh/zsh-history-search-multi-word/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ stdenvNoCC, lib, fetchFromGitHub }:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "zsh-history-search-multi-word";
|
||||
version = "unstable-2021-11-13";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zdharma-continuum";
|
||||
repo = "history-search-multi-word";
|
||||
rev = "5b44d8cea12351d91fbdc3697916556f59f14b8c";
|
||||
sha256 = "11r2mmy6bg3b6pf6qc0ml3idh333cj8yz754hrvd1sc4ipfkkqh7";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
plugindir="$out/share/zsh/${pname}"
|
||||
|
||||
mkdir -p "$plugindir"
|
||||
cp -r -- history-* hsmw-* "$plugindir"/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Multi-word, syntax highlighted history searching for Zsh";
|
||||
homepage = "https://github.com/zdharma-continuum/history-search-multi-word";
|
||||
license = with licenses; [ gpl3 mit ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
27
pkgs/shells/zsh/zsh-history-substring-search/default.nix
Normal file
27
pkgs/shells/zsh/zsh-history-substring-search/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ stdenv, lib, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "zsh-history-substring-search";
|
||||
version = "1.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-history-substring-search";
|
||||
rev = "v${version}";
|
||||
sha256 = "0y8va5kc2ram38hbk2cibkk64ffrabfv1sh4xm7pjspsba9n5p1y";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
installPhase = ''
|
||||
install -D zsh-history-substring-search.zsh \
|
||||
"$out/share/zsh-history-substring-search/zsh-history-substring-search.zsh"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fish shell history-substring-search for Zsh";
|
||||
homepage = "https://github.com/zsh-users/zsh-history-substring-search";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ qyliss ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
38
pkgs/shells/zsh/zsh-history/default.nix
Normal file
38
pkgs/shells/zsh/zsh-history/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ lib, fetchFromGitHub, buildGoModule, installShellFiles, nixosTests }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "zsh-history";
|
||||
version = "2019-12-10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "b4b4r07";
|
||||
repo = "history";
|
||||
rev = "8da016bd91b0c2eb53c9980f00eee6abdbb097e2";
|
||||
sha256 = "13n643ik1zjvpk8h9458yd9ffahhbdnigmbrbmpn7b7g23wqqsi3";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
vendorSha256 = "1863ad97y82fx0an1ysalkxnqjz3zfz228wag9a92wdssl1vwzws";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
postInstall = ''
|
||||
install -d $out/share
|
||||
cp -r "$NIX_BUILD_TOP/source/misc/"* "$out/share"
|
||||
installShellCompletion --zsh --name _history $out/share/zsh/completions/_history
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A CLI to provide enhanced history for your ZSH shell";
|
||||
homepage = "https://github.com/b4b4r07/history";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ];
|
||||
mainProgram = "history";
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
|
||||
passthru.tests = {
|
||||
zsh-history-shell-integration = nixosTests.zsh-history;
|
||||
};
|
||||
}
|
||||
31
pkgs/shells/zsh/zsh-nix-shell/default.nix
Normal file
31
pkgs/shells/zsh/zsh-nix-shell/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, fetchFromGitHub, bash }:
|
||||
|
||||
# To make use of this derivation, use
|
||||
# `programs.zsh.interactiveShellInit = "source ${pkgs.zsh-nix-shell}/share/zsh-nix-shell/nix-shell.plugin.zsh";`
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "zsh-nix-shell";
|
||||
version = "0.4.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "chisui";
|
||||
repo = "zsh-nix-shell";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-719lVo6p55G1tt3+6nMhZ904nyvlq0Q5exb0il36/Aw=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
buildInputs = [ bash ];
|
||||
installPhase = ''
|
||||
install -D nix-shell.plugin.zsh --target-directory=$out/share/zsh-nix-shell
|
||||
install -D scripts/* --target-directory=$out/share/zsh-nix-shell/scripts
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "zsh plugin that lets you use zsh in nix-shell shell";
|
||||
homepage = src.meta.homepage;
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ aw ];
|
||||
};
|
||||
}
|
||||
56
pkgs/shells/zsh/zsh-powerlevel10k/default.nix
Normal file
56
pkgs/shells/zsh/zsh-powerlevel10k/default.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{ lib, stdenv, fetchFromGitHub, substituteAll, pkgs, bash }:
|
||||
|
||||
# To make use of this derivation, use
|
||||
# `programs.zsh.promptInit = "source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme";`
|
||||
|
||||
let
|
||||
# match gitstatus version with given `gitstatus_version`:
|
||||
# https://github.com/romkatv/powerlevel10k/blob/master/gitstatus/build.info
|
||||
gitstatus = pkgs.gitstatus.overrideAttrs (oldAtttrs: rec {
|
||||
version = "1.5.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "romkatv";
|
||||
repo = "gitstatus";
|
||||
rev = "v${version}";
|
||||
sha256 = "17giwdjrsmr71xskxxf506n8kaab8zx77fv267fx37ifi57nffk5";
|
||||
};
|
||||
});
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "powerlevel10k";
|
||||
version = "1.16.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "romkatv";
|
||||
repo = "powerlevel10k";
|
||||
rev = "v${version}";
|
||||
sha256 = "0fkfh8j7rd8mkpgz6nsx4v7665d375266shl1aasdad8blgqmf0c";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
buildInputs = [ bash ];
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./gitstatusd.patch;
|
||||
gitstatusdPath = "${gitstatus}/bin/gitstatusd";
|
||||
})
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
install -D powerlevel10k.zsh-theme --target-directory=$out/share/zsh-powerlevel10k
|
||||
install -D config/* --target-directory=$out/share/zsh-powerlevel10k/config
|
||||
install -D internal/* --target-directory=$out/share/zsh-powerlevel10k/internal
|
||||
cp -R gitstatus $out/share/zsh-powerlevel10k/gitstatus
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A fast reimplementation of Powerlevel9k ZSH theme";
|
||||
homepage = "https://github.com/romkatv/powerlevel10k";
|
||||
license = lib.licenses.mit;
|
||||
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = [ lib.maintainers.hexa ];
|
||||
};
|
||||
}
|
||||
13
pkgs/shells/zsh/zsh-powerlevel10k/gitstatusd.patch
Normal file
13
pkgs/shells/zsh/zsh-powerlevel10k/gitstatusd.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/gitstatus/gitstatus.plugin.zsh b/gitstatus/gitstatus.plugin.zsh
|
||||
index b469072..eb1e3be 100644
|
||||
--- a/gitstatus/gitstatus.plugin.zsh
|
||||
+++ b/gitstatus/gitstatus.plugin.zsh
|
||||
@@ -44,6 +44,8 @@
|
||||
|
||||
[[ -o 'interactive' ]] || 'return'
|
||||
|
||||
+GITSTATUS_DAEMON=@gitstatusdPath@
|
||||
+
|
||||
# Temporarily change options.
|
||||
'builtin' 'local' '-a' '_gitstatus_opts'
|
||||
[[ ! -o 'aliases' ]] || _gitstatus_opts+=('aliases')
|
||||
30
pkgs/shells/zsh/zsh-powerlevel9k/default.nix
Normal file
30
pkgs/shells/zsh/zsh-powerlevel9k/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
# To make use of this derivation, use
|
||||
# `programs.zsh.promptInit = "source ${pkgs.zsh-powerlevel9k}/share/zsh-powerlevel9k/powerlevel9k.zsh-theme";`
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "powerlevel9k";
|
||||
version = "2017-11-10";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bhilburn";
|
||||
repo = "powerlevel9k";
|
||||
rev = "87acc51acab3ed4fd33cda2386abed6f98c80720";
|
||||
sha256 = "0v1dqg9hvycdkcvklg2njff97xwr8rah0nyldv4xm39r77f4yfvq";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
installPhase= ''
|
||||
install -D powerlevel9k.zsh-theme --target-directory=$out/share/zsh-powerlevel9k
|
||||
install -D functions/* --target-directory=$out/share/zsh-powerlevel9k/functions
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A beautiful theme for zsh";
|
||||
homepage = "https://github.com/bhilburn/powerlevel9k";
|
||||
license = lib.licenses.mit;
|
||||
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = [ lib.maintainers.pierrechevalier83 ];
|
||||
};
|
||||
}
|
||||
42
pkgs/shells/zsh/zsh-prezto/default.nix
Normal file
42
pkgs/shells/zsh/zsh-prezto/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib, stdenv, fetchFromGitHub, unstableGitUpdater, bash }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "zsh-prezto";
|
||||
version = "unstable-2022-04-05";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sorin-ionescu";
|
||||
repo = "prezto";
|
||||
rev = "2c663313168490d28f607738e962aa45ada0e26b";
|
||||
sha256 = "05n2801xqdxc5nx0709mak1pr73l7aq5azd9adm0ym7si3vl59sj";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
buildInputs = [ bash ];
|
||||
|
||||
postPatch = ''
|
||||
# make zshrc aware of where zsh-prezto is installed
|
||||
sed -i -e "s|\''${ZDOTDIR:\-\$HOME}/.zprezto/|$out/share/zsh-prezto/|g" runcoms/zshrc
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/zsh-prezto
|
||||
cp -R ./ $out/share/zsh-prezto
|
||||
'';
|
||||
|
||||
passthru.updateScript = unstableGitUpdater {};
|
||||
|
||||
meta = with lib; {
|
||||
description = "The configuration framework for Zsh";
|
||||
longDescription = ''
|
||||
Prezto is the configuration framework for Zsh; it enriches
|
||||
the command line interface environment with sane defaults,
|
||||
aliases, functions, auto completion, and prompt themes.
|
||||
'';
|
||||
homepage = "https://github.com/sorin-ionescu/prezto";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ holymonson ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
28
pkgs/shells/zsh/zsh-syntax-highlighting/default.nix
Normal file
28
pkgs/shells/zsh/zsh-syntax-highlighting/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, fetchFromGitHub, zsh }:
|
||||
|
||||
# To make use of this derivation, use the `programs.zsh.enableSyntaxHighlighting` option
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.7.1";
|
||||
pname = "zsh-syntax-highlighting";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-syntax-highlighting";
|
||||
rev = version;
|
||||
sha256 = "03r6hpb5fy4yaakqm3lbf4xcvd408r44jgpv4lnzl9asp4sb9qc0";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
buildInputs = [ zsh ];
|
||||
|
||||
installFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fish shell like syntax highlighting for Zsh";
|
||||
homepage = "https://github.com/zsh-users/zsh-syntax-highlighting";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.unix;
|
||||
maintainers = [ maintainers.loskutov ];
|
||||
};
|
||||
}
|
||||
26
pkgs/shells/zsh/zsh-system-clipboard/default.nix
Normal file
26
pkgs/shells/zsh/zsh-system-clipboard/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ stdenv, lib, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "zsh-system-clipboard";
|
||||
version = "0.7.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kutsan";
|
||||
repo = "zsh-system-clipboard";
|
||||
rev = "v${version}";
|
||||
sha256 = "09lqav1mz5zajklr3xa0iaivhpykv3azkjb7yj9wyp0hq3vymp8i";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
installPhase = ''
|
||||
install -D zsh-system-clipboard.zsh $out/share/zsh/${pname}/zsh-system-clipboard.zsh
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/kutsan/zsh-system-clipboard";
|
||||
description = "A plugin that adds key bindings support for ZLE (Zsh Line Editor) clipboard operations for vi emulation keymaps";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ _0qq ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
28
pkgs/shells/zsh/zsh-vi-mode/default.nix
Normal file
28
pkgs/shells/zsh/zsh-vi-mode/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "zsh-vi-mode";
|
||||
version = "0.8.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jeffreytse";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "EOYqHh0rcgoi26eopm6FTl81ehak5kXMmzNcnJDH8/E=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/${pname}
|
||||
cp *.zsh $out/share/${pname}/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/jeffreytse/zsh-vi-mode";
|
||||
license = licenses.mit;
|
||||
description = "A better and friendly vi(vim) mode plugin for ZSH.";
|
||||
maintainers = with maintainers; [ kyleondy ];
|
||||
};
|
||||
}
|
||||
27
pkgs/shells/zsh/zsh-you-should-use/default.nix
Normal file
27
pkgs/shells/zsh/zsh-you-should-use/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "zsh-you-should-use";
|
||||
version = "1.7.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "MichaelAquilina";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1dz48rd66priqhxx7byndqhbmlwxi1nfw8ik25k0z5k7k754brgy";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
install -D you-should-use.plugin.zsh $out/share/zsh/plugins/you-should-use/you-should-use.plugin.zsh
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/MichaelAquilina/zsh-you-should-use";
|
||||
license = licenses.gpl3;
|
||||
description = "ZSH plugin that reminds you to use existing aliases for commands you just typed";
|
||||
maintainers = with maintainers; [ ma27 ];
|
||||
};
|
||||
}
|
||||
29
pkgs/shells/zsh/zsh-z/default.nix
Normal file
29
pkgs/shells/zsh/zsh-z/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ 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=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
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 ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue