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

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

50 lines
1.1 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, installShellFiles
, testers
, zig_0_11
, callPackage
2022-08-19 09:38:54 +02:00
}:
stdenv.mkDerivation (finalAttrs: {
2022-08-19 09:38:54 +02:00
pname = "zf";
2024-02-07 08:33:07 +01:00
version = "0.9.1";
2022-08-19 09:38:54 +02:00
src = fetchFromGitHub {
owner = "natecraddock";
repo = "zf";
rev = "refs/tags/${finalAttrs.version}";
2024-02-07 08:33:07 +01:00
hash = "sha256-JPv/59ELh+CS1/akuLNy0qSimMEJsypPO8hiHFAOirI=";
2022-08-19 09:38:54 +02: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 09:38:54 +02:00
'';
2023-09-30 17:55:38 +02:00
passthru.tests.version = testers.testVersion { package = finalAttrs.finalPackage; };
2022-08-19 09:38:54 +02:00
meta = {
2022-08-19 09:38:54 +02: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 ];
2023-11-27 02:17:53 +01:00
mainProgram = "zf";
2022-08-19 09:38:54 +02:00
};
})