push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

197
pkgs/shells/bash/5.nix Normal file
View File

@@ -0,0 +1,197 @@
{
lib,
stdenv,
buildPackages,
fetchurl,
updateAutotoolsGnuConfigScriptsHook,
bison,
util-linux,
interactive ? true,
readline,
withDocs ? null,
forFHSEnv ? false,
pkgsStatic,
}:
let
upstreamPatches = import ./bash-5.3-patches.nix (
nr: sha256:
fetchurl {
url = "mirror://gnu/bash/bash-5.3-patches/bash53-${nr}";
inherit sha256;
}
);
in
lib.warnIf (withDocs != null)
''
bash: `.override { withDocs = true; }` is deprecated, the docs are always included.
''
stdenv.mkDerivation
rec {
pname = "bash${lib.optionalString interactive "-interactive"}";
version = "5.3${patch_suffix}";
patch_suffix = "p${toString (builtins.length upstreamPatches)}";
src = fetchurl {
url = "mirror://gnu/bash/bash-${lib.removeSuffix patch_suffix version}.tar.gz";
hash = "sha256-DVzYaWX4aaJs9k9Lcb57lvkKO6iz104n6OnZ1VUPMbo=";
};
hardeningDisable = [
"format"
]
# bionic libc is super weird and has issues with fortify outside of its own libc, check this comment:
# https://github.com/NixOS/nixpkgs/pull/192630#discussion_r978985593
# or you can check libc/include/sys/cdefs.h in bionic source code
++ lib.optional (stdenv.hostPlatform.libc == "bionic") "fortify";
outputs = [
"out"
"dev"
"man"
"doc"
"info"
];
separateDebugInfo = true;
env.NIX_CFLAGS_COMPILE = ''
-DSYS_BASHRC="/etc/bashrc"
-DSYS_BASH_LOGOUT="/etc/bash_logout"
''
+ lib.optionalString (!forFHSEnv) ''
-DDEFAULT_PATH_VALUE="/no-such-path"
-DSTANDARD_UTILS_PATH="/no-such-path"
-DDEFAULT_LOADABLE_BUILTINS_PATH="${placeholder "out"}/lib/bash:."
''
+ ''
-DNON_INTERACTIVE_LOGIN_SHELLS
-DSSH_SOURCE_BASHRC
'';
patchFlags = [ "-p0" ];
patches = upstreamPatches ++ [
# Enable PGRP_PIPE independently of the kernel of the build machine.
# This doesn't seem to be upstreamed despite such a mention of in https://github.com/NixOS/nixpkgs/pull/77196,
# which originally introduced the patch
# Some related discussion can be found in
# https://lists.gnu.org/archive/html/bug-bash/2015-05/msg00071.html
./pgrp-pipe-5.patch
];
configureFlags = [
# At least on Linux bash memory allocator has pathological performance
# in scenarios involving use of larger memory:
# https://lists.gnu.org/archive/html/bug-bash/2023-08/msg00052.html
# Various distributions default to system allocator. Let's nixpkgs
# do the same.
"--without-bash-malloc"
(if interactive then "--with-installed-readline" else "--disable-readline")
]
++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"bash_cv_job_control_missing=nomissing"
"bash_cv_sys_named_pipes=nomissing"
"bash_cv_getcwd_malloc=yes"
# This check cannot be performed when cross compiling. The "yes"
# default is fine for static linking on Linux (weak symbols?) but
# not with BSDs, when it does clash with the regular `getenv`.
"bash_cv_getenv_redef=${
if !(with stdenv.hostPlatform; isStatic && (isOpenBSD || isFreeBSD)) then "yes" else "no"
}"
]
++ lib.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"
]
++ lib.optionals (stdenv.hostPlatform.libc == "musl") [
"--disable-nls"
]
++ lib.optionals stdenv.hostPlatform.isFreeBSD [
# /dev/fd is optional on FreeBSD. we need it to work when built on a system
# with it and transferred to a system without it! This includes linux cross.
"bash_cv_dev_fd=absent"
];
strictDeps = true;
# Note: Bison is needed because the patches above modify parse.y.
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [
updateAutotoolsGnuConfigScriptsHook
bison
]
++ lib.optional stdenv.hostPlatform.isDarwin stdenv.cc.bintools;
buildInputs = lib.optional interactive readline;
enableParallelBuilding = true;
makeFlags = lib.optionals stdenv.hostPlatform.isCygwin [
"LOCAL_LDFLAGS=-Wl,--export-all,--out-implib,libbash.dll.a"
"SHOBJ_LIBS=-lbash"
];
nativeCheckInputs = [ 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"
'';
passthru = {
shellPath = "/bin/bash";
tests.static = pkgsStatic.bash;
};
meta = with lib; {
homepage = "https://www.gnu.org/software/bash/";
description =
"GNU Bourne-Again Shell, the de facto standard shell on Linux"
+ lib.optionalString interactive " (for interactive use)";
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;
# https://github.com/NixOS/nixpkgs/issues/333338
badPlatforms = [ lib.systems.inspect.patterns.isMinGW ];
maintainers = [ ];
mainProgram = "bash";
identifiers.cpeParts =
let
versionSplit = lib.split "p" version;
in
{
vendor = "gnu";
product = "bash";
version = lib.elemAt versionSplit 0;
update = lib.elemAt versionSplit 2;
};
};
}

View File

@@ -0,0 +1,7 @@
# Automatically generated by `update-patch-set.sh'; do not edit.
patch: [
(patch "001" "0zr8wgg1gb67vxn7ws971n1znrdinczymc688ndnpy2a6qs88q0z")
(patch "002" "009051z55plsy4jmmjdb3ys7li2jraynz99qg7n6a1qk025591g3")
(patch "003" "1vb0gnrkmz49rcfpxjcxy0v0k5278wrlkljk9gc20nizvk3xjigj")
]

View File

@@ -0,0 +1,15 @@
--- ./configure 2022-12-20 17:13:17.804045620 +0100
+++ ./configure-fixed 2022-12-20 17:16:00.444114824 +0100
@@ -21723,11 +21723,7 @@
solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
- case "`uname -r`" in
- 1.*|2.[0123]*) : ;;
- *) printf "%s\n" "#define PGRP_PIPE 1" >>confdefs.h
- ;;
- esac ;;
+ printf "%s\n" "#define PGRP_PIPE 1" >>confdefs.h ;;
netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;;
freebsd*|midnightbsd*) LOCAL_CFLAGS='-DHEREDOC_PIPESIZE=4096' ;;
*qnx[67]*) LOCAL_LIBS="-lncurses" ;;

View File

@@ -0,0 +1,54 @@
#!/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"
# https://savannah.gnu.org/projects/bash/: Group Admins: Chet Ramey
# https://savannah.gnu.org/users/chet: Download GPG Key
wget "https://savannah.gnu.org/people/viewgpg.php?user_id=2590" -O gpgkey.asc
echo "db4041b4d3896b9f21250e6c29861958bd5d4781f521f06beda849a9ed79fae8 gpgkey.asc" > gpgkey.asc.sha256
sha256sum -c gpgkey.asc.sha256
gpg --import ./gpgkey.asc
rm gpgkey.asc{,.sha256}
( 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'."

View File

@@ -0,0 +1,29 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "babelfish";
version = "1.2.1";
src = fetchFromGitHub {
owner = "bouk";
repo = "babelfish";
rev = "v${version}";
sha256 = "sha256-/rWX77n9wqWxkHG7gVOinCJ6ahuEfbAcGijC1oAxrno=";
};
vendorHash = "sha256-HY9ejLfT6gj3vUMSzbNZ4QlpB+liigTtNDBNWCy8X38=";
meta = with lib; {
description = "Translate bash scripts to fish";
mainProgram = "babelfish";
homepage = "https://github.com/bouk/babelfish";
license = licenses.mit;
maintainers = with maintainers; [
bouk
kevingriffin
];
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin rec {
pname = "async-prompt";
version = "1.2.0";
src = fetchFromGitHub {
owner = "acomagu";
repo = "fish-async-prompt";
rev = "v${version}";
hash = "sha256-B7Ze0a5Zp+5JVsQUOv97mKHh5wiv3ejsDhJMrK7YOx4=";
};
meta = with lib; {
description = "Make your prompt asynchronous to improve the reactivity";
homepage = "https://github.com/acomagu/fish-async-prompt";
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin rec {
pname = "autopair";
version = "1.0.4";
src = fetchFromGitHub {
owner = "jorgebucaran";
repo = "autopair.fish";
rev = version;
sha256 = "sha256-s1o188TlwpUQEN3X5MxUlD/2CFCpEkWu83U9O+wg3VU=";
};
meta = with lib; {
description = "Auto-complete matching pairs in the Fish command line";
homepage = "https://github.com/jorgebucaran/autopair.fish";
license = licenses.mit;
maintainers = with maintainers; [
figsoda
kidonng
pyrox0
];
};
}

View File

@@ -0,0 +1,23 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin {
pname = "aws";
version = "0-unstable-2023-08-03";
src = fetchFromGitHub {
owner = "oh-my-fish";
repo = "plugin-aws";
rev = "e53a1de3f826916cb83f6ebd34a7356af8f754d1";
hash = "sha256-l17v/aJ4PkjYM8kJDA0zUo87UTsfFqq+Prei/Qq0DRA=";
};
meta = {
description = "Completions and integrations with the AWS CLI";
homepage = "https://github.com/oh-my-fish/plugin-aws";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ theobori ];
};
}

View File

@@ -0,0 +1,23 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin {
pname = "bang-bang";
version = "0-unstable-2023-07-23";
src = fetchFromGitHub {
owner = "oh-my-fish";
repo = "plugin-bang-bang";
rev = "ec991b80ba7d4dda7a962167b036efc5c2d79419";
hash = "sha256-oPPCtFN2DPuM//c48SXb4TrFRjJtccg0YPXcAo0Lxq0=";
};
meta = {
description = "Bash style history substitution for Oh My Fish";
homepage = "https://github.com/oh-my-fish/plugin-bang-bang";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ theobori ];
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
python3,
}:
buildFishPlugin rec {
pname = "bass";
version = "1.0-unstable-2021-02-18";
src = fetchFromGitHub {
owner = "edc";
repo = pname;
rev = "2fd3d2157d5271ca3575b13daec975ca4c10577a";
sha256 = "0mb01y1d0g8ilsr5m8a71j6xmqlyhf8w4xjf00wkk8k41cz3ypky";
};
#buildFishplugin will only move the .fish files, but bass also relies on python
postInstall = ''
cp functions/__bass.py $out/share/fish/vendor_functions.d/
'';
nativeCheckInputs = [ python3 ];
checkPhase = ''
make test
'';
meta = with lib; {
description = "Fish function making it easy to use utilities written for Bash in Fish shell";
homepage = "https://github.com/edc/bass";
license = licenses.mit;
maintainers = with maintainers; [ beezow ];
};
}

View File

@@ -0,0 +1,23 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin {
pname = "bobthefish";
version = "0-unstable-2024-09-24";
src = fetchFromGitHub {
owner = "oh-my-fish";
repo = "theme-bobthefish";
rev = "e3b4d4eafc23516e35f162686f08a42edf844e40";
sha256 = "sha256-cXOYvdn74H4rkMWSC7G6bT4wa9d3/3vRnKed2ixRnuA=";
};
meta = with lib; {
description = "Powerline-style, Git-aware fish theme optimized for awesome";
homepage = "https://github.com/oh-my-fish/theme-bobthefish";
license = licenses.mit;
maintainers = with maintainers; [ Scrumplex ];
};
}

View File

@@ -0,0 +1,23 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin {
pname = "bobthefisher";
version = "0-unstable-2023-10-25";
src = fetchFromGitHub {
owner = "Scrumplex";
repo = "bobthefisher";
rev = "f4179a14b087c7fbfc2e892da429adad40a39e44";
sha256 = "sha256-l1DHSZa40BX2/4GCjm5E53UOeFEnMioWbZtCW14WX6k=";
};
meta = with lib; {
description = "Powerline-style, Git-aware fish theme optimized for awesome (fork of bobthefish)";
homepage = "https://github.com/Scrumplex/bobthefisher";
license = licenses.mit;
maintainers = with maintainers; [ Scrumplex ];
};
}

View File

@@ -0,0 +1,86 @@
{
stdenv,
lib,
writeScript,
wrapFish,
}:
attrs@{
pname,
version,
src,
name ? "fishplugin-${pname}-${version}",
unpackPhase ? "",
configurePhase ? ":",
buildPhase ? ":",
preInstall ? "",
postInstall ? "",
nativeCheckInputs ? [ ],
# 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 = 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"
# Check if any .fish file exists in $source
[ -n "$(shopt -s nullglob; echo $source/*.fish)" ] || return 0
mkdir -p $target
cp $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;
nativeCheckInputs = [
(wrapFish {
pluginPkgs = checkPlugins;
functionDirs = checkFunctionDirs;
})
]
++ nativeCheckInputs;
checkPhase = ''
export HOME=$(mktemp -d) # fish wants a writable home
fish "${writeScript "${name}-test" checkPhase}"
'';
}
)

View File

@@ -0,0 +1,24 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin {
pname = "clownfish";
version = "0-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; [ euxane ];
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin {
pname = "colored-man-pages";
version = "0-unstable-2022-04-30";
src = fetchFromGitHub {
owner = "patrickf1";
repo = "colored_man_pages.fish";
rev = "f885c2507128b70d6c41b043070a8f399988bc7a";
sha256 = "0ifqdbaw09hd1ai0ykhxl8735fcsm0x2fwfzsk7my2z52ds60bwa";
};
meta = with lib; {
description = "Fish shell plugin to colorize man pages";
homepage = "https://github.com/PatrickF1/colored_man_pages.fish";
license = licenses.mit;
maintainers = [ maintainers.jocelynthode ];
};
}

View File

@@ -0,0 +1,99 @@
{
lib,
newScope,
config,
}:
lib.makeScope newScope (
self:
with self;
{
async-prompt = callPackage ./async-prompt.nix { };
autopair = callPackage ./autopair.nix { };
aws = callPackage ./aws.nix { };
bang-bang = callPackage ./bang-bang.nix { };
bobthefish = callPackage ./bobthefish.nix { };
bobthefisher = callPackage ./bobthefisher.nix { };
buildFishPlugin = callPackage ./build-fish-plugin.nix { };
colored-man-pages = callPackage ./colored-man-pages.nix { };
clownfish = callPackage ./clownfish.nix { };
bass = callPackage ./bass.nix { };
done = callPackage ./done.nix { };
exercism-cli-fish-wrapper = callPackage ./exercism-cli-fish-wrapper.nix { };
fifc = callPackage ./fifc.nix { };
fishbang = callPackage ./fishbang.nix { };
fish-bd = callPackage ./fish-bd.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 { };
fish-you-should-use = callPackage ./fish-you-should-use.nix { };
foreign-env = callPackage ./foreign-env { };
forgit = callPackage ./forgit.nix { };
fzf = callPackage ./fzf.nix { };
fzf-fish = callPackage ./fzf-fish.nix { };
github-copilot-cli-fish = callPackage ./github-copilot-cli-fish.nix { };
git-abbr = callPackage ./git-abbr.nix { };
grc = callPackage ./grc.nix { };
gruvbox = callPackage ./gruvbox.nix { };
humantime-fish = callPackage ./humantime-fish.nix { };
hydro = callPackage ./hydro.nix { };
macos = callPackage ./macos.nix { };
nvm = callPackage ./nvm.nix { };
pisces = callPackage ./pisces.nix { };
plugin-git = callPackage ./plugin-git.nix { };
plugin-sudope = callPackage ./plugin-sudope.nix { };
puffer = callPackage ./puffer.nix { };
pure = callPackage ./pure.nix { };
sdkman-for-fish = callPackage ./sdkman-for-fish.nix { };
spark = callPackage ./spark.nix { };
sponge = callPackage ./sponge.nix { };
tide = callPackage ./tide.nix { };
transient-fish = callPackage ./transient-fish.nix { };
wakatime-fish = callPackage ./wakatime-fish.nix { };
z = callPackage ./z.nix { };
}
// lib.optionalAttrs config.allowAliases {
autopair-fish = self.autopair; # Added 2023-03-10
}
)

View File

@@ -0,0 +1,30 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
fishtape,
}:
buildFishPlugin rec {
pname = "done";
version = "1.20.0";
src = fetchFromGitHub {
owner = "franciscolourenco";
repo = "done";
rev = version;
hash = "sha256-WA6DBrPBuXRIloO05UBunTJ9N01d6tO1K1uqojjO0mo=";
};
checkPlugins = [ fishtape ];
checkPhase = ''
fishtape test/done.fish
'';
meta = with lib; {
description = "Automatically receive notifications when long processes finish";
homepage = "https://github.com/franciscolourenco/done";
license = licenses.mit;
maintainers = [ maintainers.malo ];
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
unstableGitUpdater,
}:
buildFishPlugin {
pname = "exercism-cli-fish-wrapper";
version = "0-unstable-2025-09-28";
src = fetchFromGitHub {
owner = "glennj";
repo = "exercism-cli-fish-wrapper";
rev = "f6627c00324b2599239e3835af39adce04e1091c";
hash = "sha256-bS1NN6oWi5j9uPwhuMApDRZlVYwOwlIC9NcdBZ9noL8=";
};
passthru.updateScript = unstableGitUpdater { };
meta = {
description = "Fish wrapper for the Exercism CLI";
homepage = "https://github.com/glennj/exercism-cli-fish-wrapper";
license = lib.licenses.unfree; # No upstream license
maintainers = with lib.maintainers; [ anomalocaris ];
};
}

View File

@@ -0,0 +1,23 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin rec {
pname = "fifc";
version = "0.1.1";
src = fetchFromGitHub {
owner = "gazorby";
repo = "fifc";
rev = "v${version}";
hash = "sha256-p5E4Mx6j8hcM1bDbeftikyhfHxQ+qPDanuM1wNqGm6E=";
};
meta = with lib; {
description = "Fzf powers on top of fish completion engine and allows customizable completion rules";
homepage = "https://github.com/gazorby/fifc";
license = licenses.mit;
maintainers = with maintainers; [ hmajid2301 ];
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
gitUpdater,
}:
buildFishPlugin rec {
pname = "fish-bd";
version = "1.3.3";
src = fetchFromGitHub {
owner = "0rax";
repo = "fish-bd";
rev = "v${version}";
hash = "sha256-GeWjoakXa0t2TsMC/wpLEmsSVGhHFhBVK3v9eyQdzv0=";
};
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
meta = {
description = "Fish plugin to quickly go back to a parent directory up in your current working directory tree";
homepage = "https://github.com/0rax/fish-bd";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ anomalocaris ];
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
unstableGitUpdater,
}:
buildFishPlugin {
pname = "fish-you-should-use";
version = "0-unstable-2022-02-13";
src = fetchFromGitHub {
owner = "paysonwallach";
repo = "fish-you-should-use";
rev = "a332823512c0b51e71516ebb8341db0528c87926";
hash = "sha256-MmGDFTgxEFgHdX95OjH3jKsVG1hdwo6bRht+Lvvqe5Y=";
};
passthru.updateScript = unstableGitUpdater { };
meta = {
description = "Fish plugin that reminds you to use your aliases";
homepage = "https://github.com/paysonwallach/fish-you-should-use";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ anomalocaris ];
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin {
pname = "fishbang";
version = "0-unstable-2025-01-10";
src = fetchFromGitHub {
owner = "BrewingWeasel";
repo = "fishbang";
rev = "f8d2721ac5508dbda54a666ebf12f1492c478277";
hash = "sha256-VHtjt3Xobvs0DTXJ1mFU8i84EEsNQv3yqbhjs7c1mNE=";
};
meta = {
description = "Bash bang commands for fish";
homepage = "https://github.com/BrewingWeasel/fishbang";
license = lib.licenses.bsd3;
maintainers = [ lib.maintainers.marcel ];
};
}

View File

@@ -0,0 +1,36 @@
{
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; [ euxane ];
};
}

View File

@@ -0,0 +1,29 @@
{
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; [ euxane ];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
gnused,
bash,
coreutils,
}:
buildFishPlugin {
pname = "foreign-env";
version = "0-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 = "Foreign environment interface for Fish shell";
license = licenses.mit;
maintainers = with maintainers; [ jgillich ];
platforms = with platforms; unix;
};
}

View File

@@ -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

View File

@@ -0,0 +1,28 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin rec {
pname = "forgit";
version = "25.10.0";
src = fetchFromGitHub {
owner = "wfxr";
repo = "forgit";
rev = version;
hash = "sha256-MG60GzRG0NFQsGXBXBedSweucxo88S/NACXTme7ixRM=";
};
postInstall = ''
cp -r bin $out/share/fish/vendor_conf.d/
'';
meta = with lib; {
description = "Utility tool powered by fzf for using git interactively";
homepage = "https://github.com/wfxr/forgit";
license = licenses.mit;
maintainers = with maintainers; [ happysalada ];
};
}

View File

@@ -0,0 +1,71 @@
{
lib,
stdenv,
pkgs,
buildFishPlugin,
fetchFromGitHub,
fd,
unixtools,
procps,
clownfish,
fishtape_3,
}:
let
# we want `pkgs.fzf`, not `fishPlugins.fzf`
inherit (pkgs) fzf;
in
buildFishPlugin rec {
pname = "fzf.fish";
version = "10.3";
src = fetchFromGitHub {
owner = "PatrickF1";
repo = "fzf.fish";
rev = "v${version}";
hash = "sha256-T8KYLA/r/gOKvAivKRoeqIwE2pINlxFQtZJHpOy9GMM=";
};
nativeCheckInputs = [
fzf
fd
unixtools.script
procps
];
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*
rm -r tests/preview_changed_file/modified_path_with_spaces.fish
rm -r tests/preview_changed_file/renamed_path_modifications.fish
# Disable tests that are failing, probably because of our wrappers
rm -r tests/configure_bindings
rm -r tests/search_variables
# Disable tests that are failing, because there is not 'rev' command
rm tests/preview_file/custom_file_preview.fish
''
+ (
if stdenv.hostPlatform.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";
changelog = "https://github.com/PatrickF1/fzf.fish/releases/tag/${src.rev}";
license = licenses.mit;
maintainers = with maintainers; [
euxane
natsukium
];
broken = stdenv.hostPlatform.isDarwin;
};
}

View File

@@ -0,0 +1,23 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin rec {
pname = "fzf";
version = "0.16.6-unstable-2021-05-12";
src = fetchFromGitHub {
owner = "jethrokuan";
repo = pname;
rev = "479fa67d7439b23095e01b64987ae79a91a4e283";
sha256 = "sha256-28QW/WTLckR4lEfHv6dSotwkAKpNJFCShxmKFGQQ1Ew=";
};
meta = with lib; {
description = "Ef-fish-ient fish keybindings for fzf";
homepage = "https://github.com/jethrokuan/fzf";
license = licenses.mit;
maintainers = with maintainers; [ Scrumplex ];
};
}

View File

@@ -0,0 +1,23 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin {
pname = "fish-git-abbr";
version = "0.2.1-unstable-2023-06-19";
src = fetchFromGitHub {
owner = "lewisacidic";
repo = "fish-git-abbr";
rev = "dc590a5b9d9d2095f95f7d90608b48e55bea0b0e";
hash = "sha256-6z3Wr2t8CP85xVEp6UCYaM2KC9PX4MDyx19f/wjHkb0=";
};
meta = with lib; {
description = "Abbreviations for git for the fish shell 🐟";
homepage = "https://github.com/lewisacidic/fish-git-abbr";
license = licenses.mit;
maintainers = with maintainers; [ hmajid2301 ];
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin rec {
pname = "github-copilot-cli.fish";
version = "0.1.33.1";
src = fetchFromGitHub {
owner = "z11i";
repo = pname;
rev = version;
hash = "sha256-CFXbeO0euC/UtvQV0KCz4WQfdJgsuXKPM6M9oaw7hvg=";
};
meta = with lib; {
description = "GitHub Copilot CLI aliases for Fish Shell";
homepage = "https://github.com/z11i/github-copilot-cli.fish";
license = licenses.asl20;
maintainers = [ maintainers.malo ];
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin {
pname = "grc";
version = "0-unstable-2022-05-24";
src = fetchFromGitHub {
owner = "oh-my-fish";
repo = "plugin-grc";
rev = "61de7a8a0d7bda3234f8703d6e07c671992eb079";
sha256 = "sha256-NQa12L0zlEz2EJjMDhWUhw5cz/zcFokjuCK5ZofTn+Q=";
};
postInstall = ''
cp conf.d/executables $out/share/fish/vendor_conf.d/
'';
meta = with lib; {
description = "Grc Colourizer for some commands on Fish shell";
license = licenses.mit;
maintainers = with maintainers; [ onny ];
platforms = with platforms; unix;
};
}

View File

@@ -0,0 +1,21 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin {
pname = "gruvbox";
version = "0-unstable-2021-10-12";
src = fetchFromGitHub {
owner = "jomik";
repo = "fish-gruvbox";
rev = "80a6f3a7b31beb6f087b0c56cbf3470204759d1c";
hash = "sha256-vL2/Nm9Z9cdaptx8sJqbX5AnRtfd68x4ZKWdQk5Cngo=";
};
meta = {
description = "Gruvbox theme for fish shell";
homepage = "https://github.com/Jomik/fish-gruvbox";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ msladecek ];
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
fishtape,
}:
buildFishPlugin {
pname = "humantime-fish";
version = "1.0.0-unstable-2022-04-08";
src = fetchFromGitHub {
owner = "jorgebucaran";
repo = "humantime.fish";
rev = "53b2adb4c6aff0da569c931a3cc006efcd0e7219";
sha256 = "sha256-792rPsf2WDIYcP8gn6TbHh9RZvskfOAL/oKfpilaLh0=";
};
checkPlugins = [ fishtape ];
checkPhase = ''
fishtape tests/humantime.fish
'';
meta = with lib; {
description = "Turn milliseconds into a human-readable string in Fish";
homepage = "https://github.com/jorgebucaran/humantime.fish";
license = licenses.mit;
maintainers = with maintainers; [ Scrumplex ];
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin {
pname = "hydro";
version = "0-unstable-2024-11-02";
src = fetchFromGitHub {
owner = "jorgebucaran";
repo = "hydro";
rev = "9c93b89573bd722f766f2190a862ae55e728f6ba";
hash = "sha256-QYq4sU41/iKvDUczWLYRGqDQpVASF/+6brJJ8IxypjE=";
};
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; [ pyrox0 ];
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
nix-update-script,
}:
buildFishPlugin rec {
pname = "macos";
version = "7.2.0";
src = fetchFromGitHub {
owner = "halostatue";
repo = "fish-macos";
tag = "v${version}";
hash = "sha256-yTwN2ztdU+vk+AXEfsJUN7J4KqrbLSWHgA0q5rUT5CE=";
};
passthru.updateScript = nix-update-script { };
meta = {
description = "MacOS functions for Fish";
homepage = "https://github.com/halostatue/fish-macos";
changelog = "https://github.com/halostatue/fish-macos/blob/v${version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.samasaur ];
};
}

View File

@@ -0,0 +1,24 @@
{
buildFishPlugin,
fetchFromGitHub,
lib,
}:
buildFishPlugin rec {
pname = "nvm";
version = "2.2.17";
src = fetchFromGitHub {
owner = "jorgebucaran";
repo = "nvm.fish";
tag = version;
hash = "sha256-BNnoP9gLQuZQt/0SOOsZaYOexNN2K7PKWT/paS0BJJY=";
};
meta = {
description = "Node.js version manager you'll adore, crafted just for Fish";
homepage = "https://github.com/jorgebucaran/nvm.fish";
changelog = "https://github.com/jorgebucaran/nvm.fish/releases/tag/${version}/CHANGELOG.md";
downloadPage = "https://github.com/jorgebucaran/nvm.fish/releases";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pta2002 ];
};
}

View File

@@ -0,0 +1,24 @@
{
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 ];
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin rec {
pname = "plugin-git";
version = "0.3";
src = fetchFromGitHub {
owner = "jhillyerd";
repo = "plugin-git";
rev = "refs/tags/v${version}";
hash = "sha256-p7vvwisu3mvVOE1DcALbzuGJqWBcE1h71UjaopGdxE0=";
};
meta = {
description = "Git plugin for fish (similar to oh-my-zsh git)";
homepage = "https://github.com/jhillyerd/plugin-git";
changelog = "https://github.com/jhillyerd/plugin-git/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
GaetanLepage
unsolvedcypher
];
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
unstableGitUpdater,
}:
buildFishPlugin {
pname = "plugin-sudope";
version = "0-unstable-2025-09-16";
src = fetchFromGitHub {
owner = "oh-my-fish";
repo = "plugin-sudope";
rev = "4ad91e49329811939c3a09221a95e620c3964b17";
hash = "sha256-OsgThGY/tGF/XBQFyXTY9qYf50B01wEH93lqWEAxZPY=";
};
passthru.updateScript = unstableGitUpdater { };
meta = {
description = "Fish plugin to quickly put 'sudo' in your command";
homepage = "https://github.com/oh-my-fish/plugin-sudope";
license = lib.licenses.isc;
maintainers = with lib.maintainers; [ anomalocaris ];
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin rec {
pname = "puffer";
version = "1.0.0";
src = fetchFromGitHub {
owner = "nickeb96";
repo = "puffer-fish";
rev = "v${version}";
hash = "sha256-2niYj0NLfmVIQguuGTA7RrPIcorJEPkxhH6Dhcy+6Bk=";
};
meta = {
description = "Text Expansions for Fish";
homepage = "https://github.com/nickeb96/puffer-fish";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ quantenzitrone ];
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
git,
fishtape_3,
}:
buildFishPlugin rec {
pname = "pure";
version = "4.11.3";
src = fetchFromGitHub {
owner = "pure-fish";
repo = "pure";
rev = "v${version}";
hash = "sha256-mMUFR/n4aLsmZNbVAYmx57AMXT6U2P+wTuuN3opCeqs=";
};
nativeCheckInputs = [ git ];
checkPlugins = [ fishtape_3 ];
checkPhase = ''
rm tests/pure_tools_installer.test.fish
rm tests/_pure_uninstall.test.fish
fishtape tests/*.test.fish
'';
meta = {
description = "Pretty, minimal and fast Fish prompt, ported from zsh";
homepage = "https://github.com/pure-fish/pure";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ euxane ];
};
}

View File

@@ -0,0 +1,24 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin rec {
pname = "sdkman-for-fish";
version = "2.1.0";
src = fetchFromGitHub {
owner = "reitzig";
repo = "sdkman-for-fish";
rev = "v${version}";
hash = "sha256-7cgyR3hQ30Jv+9lJS5qaBvSaI/0YVT8xPXlUhDBTdFc=";
};
meta = with lib; {
description = "Adds support for SDKMAN! to fish";
homepage = "https://github.com/reitzig/sdkman-for-fish";
license = licenses.mit;
maintainers = with maintainers; [ giorgiga ];
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
let
self = buildFishPlugin {
pname = "spark";
version = "1.2.0";
src = fetchFromGitHub {
owner = "jorgebucaran";
repo = "spark.fish";
rev = "refs/tags/${self.version}";
hash = "sha256-AIFj7lz+QnqXGMBCfLucVwoBR3dcT0sLNPrQxA5qTuU=";
};
meta = {
description = "Sparklines for Fish";
homepage = "https://github.com/jorgebucaran/spark.fish";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ theobori ];
};
};
in
self

View File

@@ -0,0 +1,24 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin rec {
pname = "sponge";
version = "1.1.0";
src = fetchFromGitHub {
owner = "meaningful-ooo";
repo = pname;
rev = version;
sha256 = "sha256-MdcZUDRtNJdiyo2l9o5ma7nAX84xEJbGFhAVhK+Zm1w=";
};
meta = with lib; {
description = "Keeps your fish shell history clean from typos, incorrectly used commands and everything you don't want to store due to privacy reasons";
homepage = "https://github.com/meaningful-ooo/sponge";
license = licenses.mit;
maintainers = with maintainers; [ quantenzitrone ];
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
# Due to a quirk in tide breaking wrapFish, we need to add additional commands in the config.fish
# Refer to the following comment to get you setup: https://github.com/NixOS/nixpkgs/pull/201646#issuecomment-1320893716
buildFishPlugin rec {
pname = "tide";
version = "6.2.0";
src = fetchFromGitHub {
owner = "IlanCosman";
repo = "tide";
rev = "v${version}";
hash = "sha256-1ApDjBUZ1o5UyfQijv9a3uQJ/ZuQFfpNmHiDWzoHyuw=";
};
#buildFishplugin will only move the .fish files, but tide has a tide configure function
postInstall = ''
cp -R functions/tide $out/share/fish/vendor_functions.d/
'';
meta = with lib; {
description = "Ultimate Fish prompt";
homepage = "https://github.com/IlanCosman/tide";
license = licenses.mit;
maintainers = [ maintainers.jocelynthode ];
};
}

View File

@@ -0,0 +1,23 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin {
pname = "transient-fish";
version = "0-unstable-2024-03-10";
src = fetchFromGitHub {
owner = "zzhaolei";
repo = "transient.fish";
rev = "be0093f1799462a93953e69896496dee4d063fd6";
hash = "sha256-rEkCimnkxcydKRI2y4DxEM7FD7F2/cGTZJN2Edq/Acc=";
};
meta = with lib; {
description = "Fish plugin to enable a transient prompt";
homepage = "https://github.com/zzhaolei/transient.fish";
license = licenses.mit;
maintainers = with maintainers; [ iynaix ];
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
wakatime-cli,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin rec {
pname = "wakatime-fish";
version = "0.0.6";
src = fetchFromGitHub {
owner = "ik11235";
repo = "wakatime.fish";
rev = "v${version}";
hash = "sha256-Hsr69n4fCvPc64NztgaBZQuR0znkzlL8Uotw9Jf2S1o=";
};
preFixup = ''
substituteInPlace $out/share/fish/vendor_conf.d/wakatime.fish \
--replace-fail "if type -p wakatime" "if type -p ${lib.getExe wakatime-cli}" \
--replace-fail "(type -p wakatime)" "${lib.getExe wakatime-cli}"
'';
meta = with lib; {
description = "Fish plugin for wakatime";
homepage = "https://github.com/ik11235/wakatime.fish";
license = licenses.mit;
maintainers = with maintainers; [ ocfox ];
};
}

View File

@@ -0,0 +1,23 @@
{
lib,
buildFishPlugin,
fetchFromGitHub,
}:
buildFishPlugin rec {
pname = "z";
version = "0-unstable-2022-04-08";
src = fetchFromGitHub {
owner = "jethrokuan";
repo = pname;
rev = "85f863f20f24faf675827fb00f3a4e15c7838d76";
sha256 = "sha256-+FUBM7CodtZrYKqU542fQD+ZDGrd2438trKM0tIESs0=";
};
meta = with lib; {
description = "Pure-fish z directory jumping";
homepage = "https://github.com/jethrokuan/z";
license = licenses.mit;
maintainers = with maintainers; [ Scrumplex ];
};
}

View File

@@ -0,0 +1,65 @@
{
lib,
writeShellApplication,
fish,
writeTextFile,
}:
lib.makeOverridable (
{
completionDirs ? [ ],
functionDirs ? [ ],
confDirs ? [ ],
pluginPkgs ? [ ],
localConfig ? "",
shellAliases ? { },
runtimeInputs ? [ ],
}:
let
aliasesStr = builtins.concatStringsSep "\n" (
lib.mapAttrsToList (k: v: "alias ${k} ${lib.escapeShellArg v}") shellAliases
);
shellAliasesFishConfig = writeTextFile {
name = "wrapfish.aliases.fish";
destination = "/share/fish/vendor_conf.d/aliases.fish";
text = ''
status is-interactive; and begin
# Aliases
${aliasesStr}
end
'';
};
localFishConfig = writeTextFile {
name = "wrapfish.local.fish";
destination = "/share/fish/vendor_conf.d/config.local.fish";
text = localConfig;
};
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)
++ (map (vendorDir "conf") [
localFishConfig
shellAliasesFishConfig
]);
in
writeShellApplication {
inherit runtimeInputs;
name = "fish";
text = ''
${fish}/bin/fish --init-command "
set --prepend fish_complete_path ${lib.escapeShellArgs complPath}
set --prepend fish_function_path ${lib.escapeShellArgs funcPath}
set --local fish_conf_source_path ${lib.escapeShellArgs confPath}
for c in \$fish_conf_source_path/*; source \$c; end
" "$@"
'';
}
)

View File

@@ -0,0 +1,110 @@
{
stdenv,
lib,
fetchFromGitHub,
rustPlatform,
openssl,
zlib,
zstd,
pkg-config,
python3,
xorg,
nghttp2,
libgit2,
withDefaultFeatures ? true,
additionalFeatures ? (p: p),
testers,
nushell,
nix-update-script,
curlMinimal,
}:
let
# NOTE: when updating this to a new non-patch version, please also try to
# update the plugins. Plugins only work if they are compiled for the same
# major/minor version.
version = "0.106.1";
in
rustPlatform.buildRustPackage {
pname = "nushell";
inherit version;
src = fetchFromGitHub {
owner = "nushell";
repo = "nushell";
tag = version;
hash = "sha256-VrGsdO7RiTlf8JK3MBMcgj0z4cWUklDwikMN5Pu6JQI=";
};
cargoHash = "sha256-GSpR54QGiY9Yrs/A8neoKK6hMvSr3ORtNnwoz4GGprY=";
nativeBuildInputs = [
pkg-config
]
++ lib.optionals (withDefaultFeatures && stdenv.hostPlatform.isLinux) [ python3 ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ rustPlatform.bindgenHook ];
buildInputs = [
zstd
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ zlib ]
++ lib.optionals (withDefaultFeatures && stdenv.hostPlatform.isLinux) [ xorg.libX11 ]
++ lib.optionals (withDefaultFeatures && stdenv.hostPlatform.isDarwin) [
nghttp2
libgit2
];
buildNoDefaultFeatures = !withDefaultFeatures;
buildFeatures = additionalFeatures [ ];
preCheck = ''
export NU_TEST_LOCALE_OVERRIDE="en_US.UTF-8"
'';
checkPhase = ''
runHook preCheck
(
# The skipped tests all fail in the sandbox because in the nushell test playground,
# the tmp $HOME is not set, so nu falls back to looking up the passwd dir of the build
# user (/var/empty). The assertions however do respect the set $HOME.
set -x
HOME=$(mktemp -d) cargo test -j $NIX_BUILD_CORES --offline -- \
--test-threads=$NIX_BUILD_CORES \
--skip=repl::test_config_path::test_default_config_path \
--skip=repl::test_config_path::test_xdg_config_bad \
--skip=repl::test_config_path::test_xdg_config_empty ${lib.optionalString stdenv.hostPlatform.isDarwin ''
\
--skip=plugins::config::some \
--skip=plugins::stress_internals::test_exit_early_local_socket \
--skip=plugins::stress_internals::test_failing_local_socket_fallback \
--skip=plugins::stress_internals::test_local_socket
''}
)
runHook postCheck
'';
checkInputs =
lib.optionals stdenv.hostPlatform.isDarwin [ curlMinimal ]
++ lib.optionals stdenv.hostPlatform.isLinux [ openssl ];
passthru = {
shellPath = "/bin/nu";
tests.version = testers.testVersion {
package = nushell;
};
updateScript = nix-update-script { };
};
meta = with lib; {
description = "Modern shell written in Rust";
homepage = "https://www.nushell.sh/";
license = licenses.mit;
maintainers = with maintainers; [
Br1ght0ne
johntitor
joaquintrinanes
ryan4yin
];
mainProgram = "nu";
};
}

View File

@@ -0,0 +1,40 @@
{
stdenv,
lib,
rustPlatform,
pkg-config,
nix-update-script,
fetchFromGitHub,
dbus,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "nu_plugin_dbus";
version = "0.14.0";
src = fetchFromGitHub {
owner = "devyn";
repo = "nu_plugin_dbus";
tag = finalAttrs.version;
hash = "sha256-Ga+1zFwS/v+3iKVEz7TFmJjyBW/gq6leHeyH2vjawto=";
};
cargoHash = "sha256-7pD5LA1ytO7VqFnHwgf7vW9eS3olnZBgdsj+rmcHkbU=";
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
buildInputs = [ dbus ];
passthru.updateScript = nix-update-script { };
meta = {
description = "Nushell plugin for communicating with D-Bus";
mainProgram = "nu_plugin_dbus";
homepage = "https://github.com/devyn/nu_plugin_dbus";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ aftix ];
platforms = lib.platforms.linux;
# "Plugin `dbus` is compiled for nushell version 0.101.0, which is not
# compatible with version 0.105.1"
broken = true;
};
})

View File

@@ -0,0 +1,67 @@
{
lib,
config,
newScope,
dbus,
versionCheckHook,
nushell,
runCommand,
}:
lib.makeScope newScope (
self:
lib.mapAttrs
(
_n: p:
let
# add two checks:
# - `versionCheckhook`, checks wether it's a binary that is able to
# display its own version
# - A check which loads the plugin into the current version of nushell,
# to detect incompatibilities (plugins are compiled for very specific
# versions of nushell). If this fails, either update the plugin or mark
# as broken.
withChecks = p.overrideAttrs (
final: _prev: {
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
passthru.tests.loadCheck =
let
nu = lib.getExe nushell;
plugin = lib.getExe withChecks;
in
runCommand "test-load-${final.pname}" { } ''
touch $out
${nu} -n -c "plugin add --plugin-config $out ${plugin}"
${nu} -n -c "plugin use --plugin-config $out ${plugin}"
'';
}
);
in
withChecks
)
(
with self;
{
gstat = callPackage ./gstat.nix { };
formats = callPackage ./formats.nix { };
polars = callPackage ./polars.nix { };
query = callPackage ./query.nix { };
net = callPackage ./net.nix { };
units = callPackage ./units.nix { };
highlight = callPackage ./highlight.nix { };
dbus = callPackage ./dbus.nix {
inherit dbus;
};
skim = callPackage ./skim.nix { };
semver = callPackage ./semver.nix { };
hcl = callPackage ./hcl.nix { };
desktop_notifications = callPackage ./desktop_notifications.nix { };
}
// lib.optionalAttrs config.allowAliases {
regex = throw "`nu_plugin_regex` is no longer compatible with the current Nushell release.";
}
)
)

View File

@@ -0,0 +1,31 @@
{
lib,
rustPlatform,
fetchFromGitHub,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "nu_plugin_desktop_notifications";
version = "0.106.1";
src = fetchFromGitHub {
owner = "FMotalleb";
repo = "nu_plugin_desktop_notifications";
tag = "v${finalAttrs.version}";
hash = "sha256-FuiXHl7O6/DN7kENrVxOys8mJAGbpb11w9iJ+mqQ/ds=";
};
cargoHash = "sha256-yFkiRGrg8eGGap5vyZVRMpddsoTYNrwSC94uLYufmdc=";
passthru.updateScript = nix-update-script { };
meta = {
description = "Nushell plugin for sending desktop notifications";
mainProgram = "nu_plugin_desktop_notifications";
homepage = "https://github.com/FMotalleb/nu_plugin_desktop_notifications";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ timon ];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,33 @@
{
stdenv,
lib,
rustPlatform,
nushell,
pkg-config,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "nu_plugin_formats";
inherit (nushell) version src cargoHash;
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
buildAndTestSubdir = "crates/nu_plugin_formats";
passthru.updateScript = nix-update-script {
# Skip the version check and only check the hash because we inherit version from nushell.
extraArgs = [ "--version=skip" ];
};
meta = {
description = "Formats plugin for Nushell";
mainProgram = "nu_plugin_formats";
homepage = "https://github.com/nushell/nushell/tree/${finalAttrs.version}/crates/nu_plugin_formats";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
viraptor
aidalgol
];
};
})

View File

@@ -0,0 +1,35 @@
{
stdenv,
lib,
rustPlatform,
openssl,
nushell,
pkg-config,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "nu_plugin_gstat";
inherit (nushell) version src cargoHash;
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
buildInputs = [ openssl ];
buildAndTestSubdir = "crates/nu_plugin_gstat";
passthru.updateScript = nix-update-script {
# Skip the version check and only check the hash because we inherit version from nushell.
extraArgs = [ "--version=skip" ];
};
meta = {
description = "Git status plugin for Nushell";
mainProgram = "nu_plugin_gstat";
homepage = "https://github.com/nushell/nushell/tree/${finalAttrs.version}/crates/nu_plugin_gstat";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
mrkkrp
aidalgol
];
};
})

View File

@@ -0,0 +1,37 @@
{
stdenv,
lib,
rustPlatform,
pkg-config,
nix-update-script,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "nu_plugin_hcl";
version = "0.106.1";
src = fetchFromGitHub {
owner = "Yethal";
repo = "nu_plugin_hcl";
tag = finalAttrs.version;
hash = "sha256-LM5tDmPWmpHd4HNnWoEdDXdKUkFA8J8VeDFMw32JXLk=";
};
cargoHash = "sha256-QCkNabv3pqtaRA7Ux5eiZPE/vRILlWKdQce7Gb0vzes=";
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
# there are no tests
doCheck = false;
passthru.updateScript = nix-update-script { };
meta = {
description = "Nushell plugin for parsing Hashicorp Configuration Language files";
mainProgram = "nu_plugin_hcl";
homepage = "https://github.com/Yethal/nu_plugin_hcl";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ yethal ];
};
})

View File

@@ -0,0 +1,38 @@
{
stdenv,
lib,
rustPlatform,
pkg-config,
nix-update-script,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "nu_plugin_highlight";
version = "1.4.8+0.106.0";
src = fetchFromGitHub {
owner = "cptpiepmatz";
repo = "nu-plugin-highlight";
tag = "v${finalAttrs.version}";
hash = "sha256-H7bCX13miQECEPCOT2eF+TBkUU3qff+LhOiA008GLdI=";
fetchSubmodules = true;
};
cargoHash = "sha256-Qf6qEY6imcI0rfktGl5ErsbT+HCDgTohl+NKFsrQbzA=";
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
# there are no tests
doCheck = false;
passthru.updateScript = nix-update-script { };
meta = {
description = "`nushell` plugin for syntax highlighting";
mainProgram = "nu_plugin_highlight";
homepage = "https://github.com/cptpiepmatz/nu-plugin-highlight";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ mgttlinger ];
};
})

View File

@@ -0,0 +1,39 @@
{
stdenv,
lib,
rustPlatform,
fetchFromGitHub,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "nu_plugin_net";
version = "1.10.0";
src = fetchFromGitHub {
owner = "fennewald";
repo = "nu_plugin_net";
tag = "${finalAttrs.version}";
hash = "sha256-HiNydU40FprxVmRRZtnXom2kFYI04mbeuGTq8+BMh7o=";
};
cargoHash = "sha256-tq0XqY2B7tC2ep8vH6T3nkAqxqhniqzYnhbkfB3SbHU=";
nativeBuildInputs = lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
# there are no tests
doCheck = false;
passthru.updateScript = nix-update-script { };
meta = {
description = "Nushell plugin to list system network interfaces";
homepage = "https://github.com/fennewald/nu_plugin_net";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ happysalada ];
mainProgram = "nu_plugin_net";
# "Plugin `net` is compiled for nushell version 0.104.0, which is not
# compatible with version 0.105.1"
broken = true;
};
})

View File

@@ -0,0 +1,36 @@
{
stdenv,
lib,
rustPlatform,
openssl,
nushell,
pkg-config,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "nu_plugin_polars";
inherit (nushell) version src cargoHash;
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
buildInputs = [ openssl ];
buildAndTestSubdir = "crates/nu_plugin_polars";
checkFlags = [
"--skip=dataframe::command::core::to_repr::test::test_examples"
];
passthru.updateScript = nix-update-script {
# Skip the version check and only check the hash because we inherit version from nushell.
extraArgs = [ "--version=skip" ];
};
meta = {
description = "Nushell dataframe plugin commands based on polars";
mainProgram = "nu_plugin_polars";
homepage = "https://github.com/nushell/nushell/tree/${finalAttrs.version}/crates/nu_plugin_polars";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ joaquintrinanes ];
};
})

View File

@@ -0,0 +1,39 @@
{
stdenv,
lib,
rustPlatform,
nushell,
nix-update-script,
pkg-config,
openssl,
curl,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "nu_plugin_query";
inherit (nushell) version src cargoHash;
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
buildInputs = [
openssl
curl
];
buildAndTestSubdir = "crates/nu_plugin_query";
passthru.updateScript = nix-update-script {
# Skip the version check and only check the hash because we inherit version from nushell.
extraArgs = [ "--version=skip" ];
};
meta = {
description = "Nushell plugin to query JSON, XML, and various web data";
mainProgram = "nu_plugin_query";
homepage = "https://github.com/nushell/nushell/tree/${finalAttrs.version}/crates/nu_plugin_query";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
happysalada
aidalgol
];
};
})

View File

@@ -0,0 +1,32 @@
{
lib,
rustPlatform,
fetchFromGitHub,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "nu_plugin_semver";
version = "0.11.6";
src = fetchFromGitHub {
owner = "abusch";
repo = "nu_plugin_semver";
tag = "v${finalAttrs.version}";
hash = "sha256-JF+aY7TW0NGo/E1eFVpBZQoxLxuGja8DSoJy4xgi1Lk=";
};
cargoHash = "sha256-609w/7vmKcNv1zSfd+k6TTeU2lQuzHX3W5Y8EqKIiAM=";
passthru.update-script = nix-update-script { };
meta = {
description = "Nushell plugin to work with semver versions";
homepage = "https://github.com/abusch/nu_plugin_semver";
changelog = "https://github.com/abusch/nu_plugin_semver/blob/${finalAttrs.src.tag}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ koffydrop ];
mainProgram = "nu_plugin_semver";
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,33 @@
{
stdenv,
lib,
rustPlatform,
nix-update-script,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "nu_plugin_skim";
version = "0.17.0";
src = fetchFromGitHub {
owner = "idanarye";
repo = "nu_plugin_skim";
tag = "v${finalAttrs.version}";
hash = "sha256-2ZrN+0qdz7fgBS9KPogUIemkzO+uJdAvSOEBkfl7MI4=";
};
cargoHash = "sha256-8oAfnZ+uIckoj3QXb8ypJw/kC2VnMWRMl/oOoRkbtok=";
nativeBuildInputs = lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
passthru.updateScript = nix-update-script { };
meta = {
description = "Nushell plugin that adds integrates the skim fuzzy finder";
mainProgram = "nu_plugin_skim";
homepage = "https://github.com/idanarye/nu_plugin_skim";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ aftix ];
};
})

View File

@@ -0,0 +1,34 @@
{
stdenv,
lib,
rustPlatform,
pkg-config,
nix-update-script,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "nu_plugin_units";
version = "0.1.7";
src = fetchFromGitHub {
owner = "JosephTLyons";
repo = "nu_plugin_units";
tag = "v${finalAttrs.version}";
hash = "sha256-4donh0UlBbaEwgDxUECKTPWGLuAc9KUmrRty2Ob7ZMA=";
};
cargoHash = "sha256-MjalDrjJTAHay9zcPhA8br2tOkkIzE4etL+yF5MKetY=";
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
passthru.updateScript = nix-update-script { };
meta = {
description = "Nushell plugin for easily converting between common units";
mainProgram = "nu_plugin_units";
homepage = "https://github.com/JosephTLyons/nu_plugin_units";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ mgttlinger ];
};
})