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
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 ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue