summary refs log tree commit diff
path: root/pkgs/tools/networking/qcard
diff options
context:
space:
mode:
authorAnton Mosich <anton@mosich.at>2023-07-29 16:39:24 +0200
committerAnderson Torres <torres.anderson.85@protonmail.com>2023-09-10 15:54:14 +0000
commit43d1a2fc3ea67ef5d2eb7588a5035c0a15cd1820 (patch)
tree4bad8723c81e8bb274afe8e66116ef1993ebd12d /pkgs/tools/networking/qcard
parent930336411cd02eef7363f06bd777bcee3d26b739 (diff)
qcard: init at 0.7.1
Diffstat (limited to 'pkgs/tools/networking/qcard')
-rw-r--r--pkgs/tools/networking/qcard/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/tools/networking/qcard/default.nix b/pkgs/tools/networking/qcard/default.nix
new file mode 100644
index 0000000000000..16ffb5d686fea
--- /dev/null
+++ b/pkgs/tools/networking/qcard/default.nix
@@ -0,0 +1,38 @@
+{ lib
+, buildGoModule
+, fetchFromSourcehut
+}:
+
+buildGoModule rec {
+  pname = "qcard";
+  version = "0.7.1";
+
+  src = fetchFromSourcehut {
+    owner = "~psic4t";
+    repo = "qcard";
+    rev = version;
+    hash = "sha256-OwmJSeAOZTX7jMhoLHSIJa0jR8zCadISQF/PqFqltRY=";
+  };
+
+  vendorHash = null;
+
+  # Replace "config-sample.json" in error message with the absolute path
+  # to that config file in the nix store
+  preBuild = ''
+    substituteInPlace helpers.go \
+      --replace " config-sample.json " " $out/share/qcard/config-sample.json "
+  '';
+
+  postInstall = ''
+    mkdir -p $out/share/qcard
+    cp config-sample.json $out/share/qcard/
+  '';
+
+  meta = {
+    description = "CLI addressbook application for CardDAV servers written in Go";
+    homepage = "https://git.sr.ht/~psic4t/qcard";
+    license = lib.licenses.gpl3Plus;
+    mainProgram = "qcard";
+    maintainers = with lib.maintainers; [ antonmosich ];
+  };
+}