depot/third_party/nixpkgs/pkgs/development/tools/qc/default.nix
Default email ae2dc6aea6 Project import generated by Copybara.
GitOrigin-RevId: 4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0
2024-10-11 07:15:48 +02:00

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 ];
};
}