nixpkgs/pkgs/tools/misc/zf/default.nix
figsoda 17d404ee80 zig.hook: rename from zigHook
This makes using specific versions of zig easier (without overrides)
2023-08-10 02:37:53 +00:00

46 lines
1008 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, installShellFiles
, testers
, zig_0_10
}:
stdenv.mkDerivation (finalAttrs: {
pname = "zf";
version = "0.8.0";
src = fetchFromGitHub {
owner = "natecraddock";
repo = "zf";
rev = "refs/tags/${finalAttrs.version}";
fetchSubmodules = true;
hash = "sha256-MzlSU5x2lb6PJZ/iNAi2aebfuClBprlfHMIG/4OPmuc=";
};
nativeBuildInputs = [
installShellFiles
zig_0_10.hook
];
doCheck = false; # it's failing somehow
postInstall = ''
installManPage doc/zf.1
installShellCompletion \
--bash complete/zf \
--fish complete/zf.fish \
--zsh complete/_zf
'';
passthru.tests.version = testers.testVersion { package = finalAttrs.zf; };
meta = {
homepage = "https://github.com/natecraddock/zf";
description = "A commandline fuzzy finder that prioritizes matches on filenames";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ dit7ya mmlb ];
};
})