1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00
nixpkgs/pkgs/development/tools/qc/default.nix

43 lines
987 B
Nix
Raw Normal View History

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