mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 13:03:34 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
58 lines
1.3 KiB
Nix
58 lines
1.3 KiB
Nix
{ stdenvNoCC
|
|
, lib
|
|
, bash
|
|
, coreutils
|
|
, findutils
|
|
, fetchFromGitHub
|
|
, fzf
|
|
, gawk
|
|
, git
|
|
, gnugrep
|
|
, gnused
|
|
, makeWrapper
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
pname = "zsh-forgit";
|
|
version = "24.11.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "wfxr";
|
|
repo = "forgit";
|
|
rev = "refs/tags/${finalAttrs.version}";
|
|
hash = "sha256-8BMFL3WktkkB8m6asbNeb9swnLWi3jHo012fBXGa8ls=";
|
|
};
|
|
|
|
strictDeps = true;
|
|
|
|
postPatch = ''
|
|
substituteInPlace forgit.plugin.zsh \
|
|
--replace-fail "\$FORGIT_INSTALL_DIR/bin/git-forgit" "$out/bin/git-forgit"
|
|
'';
|
|
|
|
dontBuild = true;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -D bin/git-forgit $out/bin/git-forgit
|
|
install -D completions/_git-forgit $out/share/zsh/site-functions/_git-forgit
|
|
install -D forgit.plugin.zsh $out/share/zsh/${finalAttrs.pname}/forgit.plugin.zsh
|
|
wrapProgram $out/bin/git-forgit \
|
|
--prefix PATH : ${lib.makeBinPath [ bash coreutils findutils fzf gawk git gnugrep gnused ]}
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/wfxr/forgit";
|
|
description = "Utility tool powered by fzf for using git interactively";
|
|
mainProgram = "git-forgit";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ deejayem ];
|
|
platforms = platforms.all;
|
|
};
|
|
})
|