1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00
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
1,020 B
Nix
Raw Normal View History

2023-05-04 08:39:45 +01:00
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "qc";
2023-09-19 07:30:52 +01:00
version = "0.5.1";
2023-05-04 08:39:45 +01:00
src = fetchFromGitHub {
owner = "qownnotes";
repo = "qc";
rev = "v${version}";
2023-09-19 07:30:52 +01:00
hash = "sha256-SrvcRF2yRGGPTk835ykG+NH9WPoc/bXO5tSj43Q7T3g=";
2023-05-04 08:39:45 +01:00
};
vendorHash = "sha256-7t5rQliLm6pMUHhtev/kNrQ7AOvmA/rR93SwNQhov6o=";
ldflags = [
"-s" "-w" "-X=github.com/qownnotes/qc/cmd.version=${version}"
];
2023-09-19 07:30:52 +01:00
# There are no automated tests
2023-05-04 08:39:45 +01:00
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 ];
};
}