-
Notifications
You must be signed in to change notification settings - Fork 6
/
default.nix
39 lines (30 loc) · 999 Bytes
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ buildGoModule, installShellFiles, lib }:
buildGoModule rec {
pname = "qc";
version = "0.5.1";
src = builtins.path { path = ./.; name = "qc"; };
vendorSha256 = "sha256-7t5rQliLm6pMUHhtev/kNrQ7AOvmA/rR93SwNQhov6o=";
ldflags = [
"-s" "-w" "-X=github.com/qownnotes/qc/cmd.version=${version}"
];
doCheck = false;
subPackages = [ "." ];
nativeBuildInputs = [
installShellFiles
];
postInstall = ''
# for some reason we need a writable home directory, or the completion files will be empty
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 ];
platforms = platforms.linux ++ platforms.darwin;
};
}