about summary refs log tree commit diff stats
path: root/pkgs/goatcounter
diff options
context:
space:
mode:
authorAlan Pearce2024-06-29 12:06:39 +0200
committerAlan Pearce2024-06-29 14:02:25 +0200
commit1f22eb1d157275d40400c83b57fac4ad65ecb1a2 (patch)
tree8372b37375b1299a09c1efed586c379d460b4a6a /pkgs/goatcounter
parente44b42f082aee425459182711649283986ef5e46 (diff)
downloadnix-packages-1f22eb1d157275d40400c83b57fac4ad65ecb1a2.tar.lz
nix-packages-1f22eb1d157275d40400c83b57fac4ad65ecb1a2.tar.zst
nix-packages-1f22eb1d157275d40400c83b57fac4ad65ecb1a2.zip
nixos/goatcounter: init module
Diffstat (limited to 'pkgs/goatcounter')
-rw-r--r--pkgs/goatcounter/default.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/goatcounter/default.nix b/pkgs/goatcounter/default.nix
new file mode 100644
index 0000000..2dcd1e3
--- /dev/null
+++ b/pkgs/goatcounter/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+
+, withSQLite ? true
+}:
+
+buildGoModule rec {
+  pname = "goatcounter";
+  version = "2.5.0";
+
+  src = fetchFromGitHub {
+    owner = "arp242";
+    repo = "goatcounter";
+    rev = "v${version}";
+    sha256 = "sha256-lwiLk/YYxX4QwSDjpU/mAikumGXYMzleRzmPjZGruZU=";
+  };
+
+  CGO_ENABLED = if withSQLite then 1 else 0;
+  subPackages = [ "cmd/goatcounter" ];
+
+  ldflags = [ "-X=zgo.at/goatcounter/v2.Version=${version}" ];
+
+  doCheck = false;
+
+  vendorHash = "sha256-YAb3uBWQc6hWzF1Z5cAg8RzJQSJV+6dkppfczKS832s=";
+
+  meta = with lib; {
+    description = "Easy web analytics. No tracking of personal data.";
+    homepage = "https://www.goatcounter.com/";
+    license = {
+      spdxId = "LicenseRef-Goatcounter-EUPL-Modified";
+      fullName = "European Union Public License (EUPL) 1.2 (modified)";
+      url = "https://github.com/arp242/goatcounter/blob/master/LICENSE";
+      free = true;
+    };
+    platforms = platforms.unix;
+  };
+}