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