2023-08-22 20:05:09 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromSourcehut
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "qcal";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.9.2";
|
2023-08-22 20:05:09 +00:00
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~psic4t";
|
|
|
|
repo = "qcal";
|
|
|
|
rev = version;
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-azUN4oYbD0fBZav4ogh/mELV9+IW6aAV7Oom8Wq6sYI=";
|
2023-08-22 20:05:09 +00:00
|
|
|
};
|
2024-09-19 14:19:46 +00:00
|
|
|
vendorHash = "sha256-W9g2JzShvm2hJ+fcdwsoD3B6iUU55ufN6FTTl6qK6Oo=";
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
# Replace "config-sample.json" in error message with the absolute path
|
|
|
|
# to that config file in the nix store
|
|
|
|
preBuild = ''
|
|
|
|
substituteInPlace helpers.go \
|
2024-09-19 14:19:46 +00:00
|
|
|
--replace-fail " config-sample.json " " $out/share/qcal/config-sample.json "
|
2023-08-22 20:05:09 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
2023-10-09 19:29:22 +00:00
|
|
|
mkdir -p $out/share/qcal
|
|
|
|
cp config-sample.json $out/share/qcal/
|
2023-08-22 20:05:09 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "CLI calendar application for CalDAV servers written in Go";
|
|
|
|
homepage = "https://git.sr.ht/~psic4t/qcal";
|
2024-10-04 16:56:33 +00:00
|
|
|
changelog = "https://git.sr.ht/~psic4t/qcal/refs/${version}";
|
2023-08-22 20:05:09 +00:00
|
|
|
license = licenses.gpl3;
|
|
|
|
mainProgram = "qcal";
|
|
|
|
maintainers = with maintainers; [ antonmosich ];
|
|
|
|
};
|
|
|
|
}
|