nixpkgs/pkgs/development/tools/qc/default.nix

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

44 lines
1020 B
Nix
Raw Normal View History

2023-05-04 07:39:45 +00:00
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "qc";
2023-09-19 06:30:52 +00:00
version = "0.5.1";
2023-05-04 07:39:45 +00:00
src = fetchFromGitHub {
owner = "qownnotes";
repo = "qc";
rev = "v${version}";
2023-09-19 06:30:52 +00:00
hash = "sha256-SrvcRF2yRGGPTk835ykG+NH9WPoc/bXO5tSj43Q7T3g=";
2023-05-04 07:39:45 +00:00
};
vendorHash = "sha256-7t5rQliLm6pMUHhtev/kNrQ7AOvmA/rR93SwNQhov6o=";
ldflags = [
"-s" "-w" "-X=github.com/qownnotes/qc/cmd.version=${version}"
];
2023-09-19 06:30:52 +00:00
# There are no automated tests
2023-05-04 07:39:45 +00:00
doCheck = false;
subPackages = [ "." ];
nativeBuildInputs = [
installShellFiles
];
postInstall = ''
2023-06-25 16:28:04 +00:00
export HOME=$(mktemp -d)
2023-05-04 07:39:45 +00:00
installShellCompletion --cmd qc \
2023-06-25 16:28:04 +00:00
--bash <($out/bin/qc completion bash) \
--fish <($out/bin/qc completion fish) \
--zsh <($out/bin/qc completion zsh)
2023-05-04 07:39:45 +00:00
'';
meta = with lib; {
description = "QOwnNotes command-line snippet manager";
homepage = "https://github.com/qownnotes/qc";
license = licenses.mit;
maintainers = with maintainers; [ pbek totoroot ];
};
}