2022-09-22 12:36:57 +00:00
|
|
|
{ buildGoModule, fetchFromGitHub, installShellFiles, lib }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "pet";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.8.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "knqyf263";
|
|
|
|
repo = "pet";
|
|
|
|
rev = "v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
sha256 = "sha256-XFizQxegyMIAUEKT8/kzWyC4TWICMUE7SuHQsTNpK4w=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
vendorHash = "sha256-XvSg7EhFdK7wt1Eei56pj/emiE4qsVJkOpgPNsnDNc4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s" "-w" "-X=github.com/knqyf263/pet/cmd.version=${version}"
|
|
|
|
];
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2022-09-22 12:36:57 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd pet \
|
|
|
|
--zsh ./misc/completions/zsh/_pet
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple command-line snippet manager, written in Go";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "pet";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/knqyf263/pet";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ kalbasit ];
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
}
|