ae2dc6aea6
GitOrigin-RevId: 4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0
44 lines
1 KiB
Nix
44 lines
1 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
buildGoModule rec {
|
|
pname = "qc";
|
|
version = "0.6.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "qownnotes";
|
|
repo = "qc";
|
|
rev = "v${version}";
|
|
hash = "sha256-D45uJk1Hb7k2qOLIbRdo0gQlPovUwcQ3rnYqhouhow0=";
|
|
};
|
|
|
|
vendorHash = "sha256-Cg1Op/4okIi2UTtqWnR0N3iMWzrYEaYxmXzvWIibftg=";
|
|
|
|
ldflags = [
|
|
"-s" "-w" "-X=github.com/qownnotes/qc/cmd.version=${version}"
|
|
];
|
|
|
|
# There are no automated tests
|
|
doCheck = false;
|
|
|
|
subPackages = [ "." ];
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
postInstall = ''
|
|
export HOME=$(mktemp -d)
|
|
installShellCompletion --cmd qc \
|
|
--bash <($out/bin/qc completion bash) \
|
|
--fish <($out/bin/qc completion fish) \
|
|
--zsh <($out/bin/qc completion zsh)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "QOwnNotes command-line snippet manager";
|
|
mainProgram = "qc";
|
|
homepage = "https://github.com/qownnotes/qc";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ pbek totoroot ];
|
|
};
|
|
}
|