Files
nixpkgs/pkgs/by-name/fz/fzf-git-sh/package.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

69 lines
1.8 KiB
Nix

{
stdenv,
lib,
bash,
bat,
coreutils,
fetchFromGitHub,
findutils,
fzf,
gawk,
git,
gnugrep,
gnused,
util-linux,
xdg-utils,
zsh,
unstableGitUpdater,
}:
stdenv.mkDerivation rec {
pname = "fzf-git-sh";
version = "0-unstable-2025-10-05";
src = fetchFromGitHub {
owner = "junegunn";
repo = "fzf-git.sh";
rev = "90d80420f679af6d120d34b6c9ceb2225dbd9649";
hash = "sha256-/9NhKkPdOtV3LbxPZ3FQEqpzqWZqlkh7La3ND+zZXyg=";
};
dontBuild = true;
postPatch = ''
sed -i \
-e "s,\bfzf\b,${fzf}/bin/fzf," \
-e "s,\bawk\b,${gawk}/bin/awk," \
-e "s,\bbash\b,${bash}/bin/bash," \
-e "s,\bbat\b,${bat}/bin/bat," \
-e "s,\bcat\b,${coreutils}/bin/cat," \
-e "s,\bcut\b,${coreutils}/bin/cut," \
-e "s,\bhead\b,${coreutils}/bin/head," \
-e "s,\buniq\b,${coreutils}/bin/uniq," \
-e "s,\bcolumn\b,${util-linux}/bin/column," \
-e "s,\bgrep\b,${gnugrep}/bin/grep," \
-e "s,\bsed\b,${gnused}/bin/sed," \
-e "s,\bxargs\b,${findutils}/bin/xargs," \
-e "s,\bxdg-open\b,${xdg-utils}/bin/xdg-open," \
-e "s,\bzsh\b,${zsh}/bin/zsh," \
-e "/display-message\|fzf-git-\$o-widget\|\burl=\|\$remote_url =~ /!s,\bgit\b,${git}/bin/git,g" \
-e "s,__fzf_git=.*BASH_SOURCE.*,__fzf_git=$out/share/${pname}/fzf-git.sh," \
-e "/__fzf_git=.*readlink.*/d" \
fzf-git.sh
'';
installPhase = ''
install -D fzf-git.sh $out/share/${pname}/fzf-git.sh
'';
passthru.updateScript = unstableGitUpdater { };
meta = with lib; {
homepage = "https://github.com/junegunn/fzf-git.sh";
description = "Bash and zsh key bindings for Git objects, powered by fzf";
license = licenses.mit;
maintainers = with maintainers; [ deejayem ];
platforms = platforms.all;
};
}