depot/third_party/nixpkgs/pkgs/development/tools/qc/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

43 lines
1,020 B
Nix

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "qc";
version = "0.5.1";
src = fetchFromGitHub {
owner = "qownnotes";
repo = "qc";
rev = "v${version}";
hash = "sha256-SrvcRF2yRGGPTk835ykG+NH9WPoc/bXO5tSj43Q7T3g=";
};
vendorHash = "sha256-7t5rQliLm6pMUHhtev/kNrQ7AOvmA/rR93SwNQhov6o=";
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";
homepage = "https://github.com/qownnotes/qc";
license = licenses.mit;
maintainers = with maintainers; [ pbek totoroot ];
};
}