about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJonas Heinrich <onny@project-insanity.org>2022-11-24 15:37:28 +0100
committerGitHub <noreply@github.com>2022-11-24 15:37:28 +0100
commit9cd423c0d8949c903cdd55f3b53772ba0f7960ee (patch)
treee24e022a0ee843bb894d4301c3b15ee86ceccba1 /pkgs
parent678836c69e8fa1963caf778e74f9019ee2ddd067 (diff)
parent5ca573772c30154f5c912edfd51951aa811fa34f (diff)
Merge pull request #202397 from dasj19/filtron-update
filtron: converted to goPackage.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/servers/filtron/default.nix9
-rw-r--r--pkgs/servers/filtron/deps.nix41
2 files changed, 46 insertions, 4 deletions
diff --git a/pkgs/servers/filtron/default.nix b/pkgs/servers/filtron/default.nix
index 6abf5933445cb..fccc1ba0016b7 100644
--- a/pkgs/servers/filtron/default.nix
+++ b/pkgs/servers/filtron/default.nix
@@ -1,9 +1,11 @@
-{ lib, buildGoModule, fetchFromGitHub }:
+{ lib, buildGoPackage, fetchFromGitHub }:
 
-buildGoModule rec {
+buildGoPackage rec {
   pname = "filtron";
   version = "0.2.0";
 
+  goPackagePath = "github.com/asciimoo/filtron";
+
   src = fetchFromGitHub {
     owner = "asciimoo";
     repo = "filtron";
@@ -11,7 +13,7 @@ buildGoModule rec {
     sha256 = "18d3h0i2sfqbc0bjx26jm2n9f37zwp8z9z4wd17sw7nvkfa72a26";
   };
 
-  vendorSha256 = null; #vendorSha256 = "";
+  goDeps = ./deps.nix;
 
   # The upstream test checks are obsolete/unmaintained.
   doCheck = false;
@@ -22,6 +24,5 @@ buildGoModule rec {
     license = licenses.agpl3;
     maintainers = [ maintainers.dasj19 ];
     platforms = platforms.linux;
-    broken = true; # vendor isn't reproducible with go > 1.17: nix-build -A $name.go-modules --check
   };
 }
diff --git a/pkgs/servers/filtron/deps.nix b/pkgs/servers/filtron/deps.nix
new file mode 100644
index 0000000000000..61320f868d05d
--- /dev/null
+++ b/pkgs/servers/filtron/deps.nix
@@ -0,0 +1,41 @@
+[
+  {
+    goPackagePath = "github.com/valyala/fasthttp";
+    fetch = {
+      type = "git";
+      url = "https://github.com/valyala/fasthttp";
+      rev = "v1.41.0";
+      sha256 = "sha256-lV9FP7GjnQk/kJACE9l5CZ/8kzORdNpYS5lPokEYrZM=";
+    };
+  }
+
+  {
+    goPackagePath = "github.com/klauspost/compress";
+    fetch = {
+      type = "git";
+      url = "https://github.com/klauspost/compress";
+      rev = "v1.15.12";
+      sha256 = "sha256-D41sCSbaqX9tXIRcTU9TYyjPyZpuKLDeQMXETE2ulbM=";
+    };
+  }
+
+  {
+    goPackagePath = "github.com/valyala/bytebufferpool";
+    fetch = {
+      type = "git";
+      url = "https://github.com/valyala/bytebufferpool";
+      rev = "v1.0.0";
+      sha256 = "sha256-I9FPZ3kCNRB+o0dpMwBnwZ35Fj9+ThvITn8a3Jr8mAY=";
+    };
+  }
+
+  {
+    goPackagePath = "github.com/andybalholm/brotli";
+    fetch = {
+      type = "git";
+      url = "https://github.com/andybalholm/brotli";
+      rev = "v1.0.4";
+      sha256 = "sha256-gAnPRdGP4yna4hiRIEDyBtDOVJqd7RU27wlPu96Rdf8=";
+    };
+  }
+]