tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
filtron: use buildGoModule
Aaron Jheng
3 years ago
31b324c0
3b52db07
+18
-49
2 changed files
expand all
collapse all
unified
split
pkgs
servers
filtron
default.nix
deps.nix
+18
-8
pkgs/servers/filtron/default.nix
···
1
1
-
{ lib, buildGoPackage, fetchFromGitHub }:
1
1
+
{ lib, buildGoModule, fetchFromGitHub, fetchpatch }:
2
2
3
3
-
buildGoPackage rec {
3
3
+
buildGoModule rec {
4
4
pname = "filtron";
5
5
version = "0.2.0";
6
6
7
7
-
goPackagePath = "github.com/asciimoo/filtron";
8
8
-
9
7
src = fetchFromGitHub {
10
8
owner = "asciimoo";
11
9
repo = "filtron";
12
10
rev = "v${version}";
13
13
-
sha256 = "18d3h0i2sfqbc0bjx26jm2n9f37zwp8z9z4wd17sw7nvkfa72a26";
11
11
+
hash = "sha256-RihxlJvbHq5PaJz89NHl/wyXrKjSiC4XYAs7LSKAo6E=";
14
12
};
15
13
16
16
-
goDeps = ./deps.nix;
14
14
+
vendorHash = "sha256-1DRR16WiBGvhOpq12L5njJJRRCIA7ajs1Py9j/3cWPE=";
17
15
18
18
-
# The upstream test checks are obsolete/unmaintained.
19
19
-
doCheck = false;
16
16
+
patches = [
17
17
+
# Update golang version in go.mod
18
18
+
(fetchpatch {
19
19
+
url = "https://github.com/asciimoo/filtron/commit/365a0131074b3b12aaa65194bfb542182a63413c.patch";
20
20
+
hash = "sha256-QGR6YetEzA/b6tC4uD94LBkWv0+9PG7RD72Tpkn2gQU=";
21
21
+
})
22
22
+
# Add missing go.sum file
23
23
+
(fetchpatch {
24
24
+
url = "https://github.com/asciimoo/filtron/commit/077769282b4e392e96a194c8ae71ff9f693560ea.patch";
25
25
+
hash = "sha256-BhHbXDKiRjSzC6NKhKUiH6rjt/EgJcEprHMMJ1x/wiQ=";
26
26
+
})
27
27
+
];
28
28
+
29
29
+
ldflags = [ "-s" "-w" ];
20
30
21
31
meta = with lib; {
22
32
description = "Reverse HTTP proxy to filter requests by different rules.";
-41
pkgs/servers/filtron/deps.nix
···
1
1
-
[
2
2
-
{
3
3
-
goPackagePath = "github.com/valyala/fasthttp";
4
4
-
fetch = {
5
5
-
type = "git";
6
6
-
url = "https://github.com/valyala/fasthttp";
7
7
-
rev = "v1.41.0";
8
8
-
sha256 = "sha256-lV9FP7GjnQk/kJACE9l5CZ/8kzORdNpYS5lPokEYrZM=";
9
9
-
};
10
10
-
}
11
11
-
12
12
-
{
13
13
-
goPackagePath = "github.com/klauspost/compress";
14
14
-
fetch = {
15
15
-
type = "git";
16
16
-
url = "https://github.com/klauspost/compress";
17
17
-
rev = "v1.15.12";
18
18
-
sha256 = "sha256-D41sCSbaqX9tXIRcTU9TYyjPyZpuKLDeQMXETE2ulbM=";
19
19
-
};
20
20
-
}
21
21
-
22
22
-
{
23
23
-
goPackagePath = "github.com/valyala/bytebufferpool";
24
24
-
fetch = {
25
25
-
type = "git";
26
26
-
url = "https://github.com/valyala/bytebufferpool";
27
27
-
rev = "v1.0.0";
28
28
-
sha256 = "sha256-I9FPZ3kCNRB+o0dpMwBnwZ35Fj9+ThvITn8a3Jr8mAY=";
29
29
-
};
30
30
-
}
31
31
-
32
32
-
{
33
33
-
goPackagePath = "github.com/andybalholm/brotli";
34
34
-
fetch = {
35
35
-
type = "git";
36
36
-
url = "https://github.com/andybalholm/brotli";
37
37
-
rev = "v1.0.4";
38
38
-
sha256 = "sha256-gAnPRdGP4yna4hiRIEDyBtDOVJqd7RU27wlPu96Rdf8=";
39
39
-
};
40
40
-
}
41
41
-
]