nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildGoModule,
4 fetchFromSourcehut,
5}:
6
7buildGoModule rec {
8 pname = "qcal";
9 version = "0.9.3";
10 src = fetchFromSourcehut {
11 owner = "~psic4t";
12 repo = "qcal";
13 rev = version;
14 hash = "sha256-VnUbell8/9nnx+FBfXSV+jwQ4SwaX0kzZsp9MeD8uT4=";
15 };
16 vendorHash = null;
17
18 # Replace "config-sample.json" in error message with the absolute path
19 # to that config file in the nix store
20 preBuild = ''
21 substituteInPlace helpers.go \
22 --replace-fail " config-sample.json " " $out/share/qcal/config-sample.json "
23 '';
24
25 postInstall = ''
26 mkdir -p $out/share/qcal
27 cp config-sample.json $out/share/qcal/
28 '';
29
30 meta = {
31 description = "CLI calendar application for CalDAV servers written in Go";
32 homepage = "https://git.sr.ht/~psic4t/qcal";
33 changelog = "https://git.sr.ht/~psic4t/qcal/refs/${version}";
34 license = lib.licenses.gpl3;
35 mainProgram = "qcal";
36 maintainers = with lib.maintainers; [ antonmosich ];
37 };
38}