diff options
| author | David Morgan <djm_uk@protonmail.com> | 2022-12-16 16:38:25 +0000 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2022-12-21 19:43:49 +0000 |
| commit | e86c1e129fa69a2cb9bdbbcacaf378b5cba7dda8 (patch) | |
| tree | 8758ba46d59f52a57f44367c23e5321250d1a12a | |
| parent | Merge pull request #207130 from NixOS/backport-206702-to-release-22.11 (diff) | |
| download | nixpkgs-origin/backport-206427-to-release-22.11.tar.gz | |
fzf-git-sh: init at unstable-2022-09-30origin/backport-206427-to-release-22.11
(cherry picked from commit fdbbaf7ac306abd068efd678c17a4474d4f66382)
| -rw-r--r-- | pkgs/shells/fzf-git-sh/default.nix | 64 | ||||
| -rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
2 files changed, 66 insertions, 0 deletions
diff --git a/pkgs/shells/fzf-git-sh/default.nix b/pkgs/shells/fzf-git-sh/default.nix new file mode 100644 index 000000000000..598c2d0eb0b2 --- /dev/null +++ b/pkgs/shells/fzf-git-sh/default.nix @@ -0,0 +1,64 @@ +{ stdenv +, lib +, bash +, bat +, coreutils +, fetchFromGitHub +, findutils +, fzf +, gawk +, git +, gnugrep +, gnused +, tmux +, util-linux +, xdg-utils +}: + +stdenv.mkDerivation rec { + pname = "fzf-git-sh"; + version = "unstable-2022-09-30"; + + src = fetchFromGitHub { + owner = "junegunn"; + repo = "fzf-git.sh"; + rev = "9190e1bf7273d85f435fa759a5c3b20e588e9f7e"; + sha256 = "sha256-2CGjk1oTXip+eAJMuOk/X3e2KTwfwzcKTcGToA2xPd4="; + }; + + dontBuild = true; + + postPatch = '' + sed -i \ + -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,\bfzf-tmux\b,${fzf}/bin/fzf-tmux," \ + -e "/display-message/!s,\bgit\b,${git}/bin/git,g" \ + -e "s,\bgrep\b,${gnugrep}/bin/grep," \ + -e "s,\bsed\b,${gnused}/bin/sed," \ + -e "/fzf-tmux/!s,\btmux\b,${tmux}/bin/tmux," \ + -e "s,\bxargs\b,${findutils}/bin/xargs," \ + -e "s,\bxdg-open\b,${xdg-utils}/bin/xdg-open," \ + -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 + ''; + + 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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 799ad8efd6ac..e88cf62a9812 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13348,6 +13348,8 @@ with pkgs; fishPlugins = recurseIntoAttrs (callPackage ../shells/fish/plugins { }); + fzf-git-sh = callPackage ../shells/fzf-git-sh {}; + ion = callPackage ../shells/ion { inherit (darwin) Security; }; |
