nixpkgs/pkgs/tools/misc/zf/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.1 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, installShellFiles
, testers
, zig_0_11
, callPackage
2022-08-19 07:38:54 +00:00
}:
stdenv.mkDerivation (finalAttrs: {
2022-08-19 07:38:54 +00:00
pname = "zf";
version = "0.9.0";
2022-08-19 07:38:54 +00:00
src = fetchFromGitHub {
owner = "natecraddock";
repo = "zf";
rev = "refs/tags/${finalAttrs.version}";
hash = "sha256-qzGr72EnWlGZgd7/r+8Iv+1i/Q9qvWpf/cgkr+TrgkE=";
2022-08-19 07:38:54 +00:00
};
nativeBuildInputs = [
installShellFiles
zig_0_11.hook
];
postPatch = ''
ln -s ${callPackage ./deps.nix { }} $ZIG_GLOBAL_CACHE_DIR/p
'';
postInstall = ''
installManPage doc/zf.1
installShellCompletion \
--bash complete/zf \
--fish complete/zf.fish \
--zsh complete/_zf
2022-08-19 07:38:54 +00:00
'';
2023-09-30 15:55:38 +00:00
passthru.tests.version = testers.testVersion { package = finalAttrs.finalPackage; };
2022-08-19 07:38:54 +00:00
meta = {
2022-08-19 07:38:54 +00:00
homepage = "https://github.com/natecraddock/zf";
description = "A commandline fuzzy finder that prioritizes matches on filenames";
changelog = "https://github.com/natecraddock/zf/releases/tag/${finalAttrs.version}";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ dit7ya figsoda mmlb ];
2022-08-19 07:38:54 +00:00
};
})