fluffychat: 1.22.1 -> 1.23.0 (#364091)
[NixPkgs.git] / pkgs / by-name / fi / filtron / package.nix
blobf4083022478a3a777db7547948434a191d8de1de
2   lib,
3   buildGoModule,
4   fetchFromGitHub,
5   fetchpatch,
6 }:
8 buildGoModule rec {
9   pname = "filtron";
10   version = "0.2.0";
12   src = fetchFromGitHub {
13     owner = "asciimoo";
14     repo = "filtron";
15     rev = "v${version}";
16     hash = "sha256-RihxlJvbHq5PaJz89NHl/wyXrKjSiC4XYAs7LSKAo6E=";
17   };
19   vendorHash = "sha256-1DRR16WiBGvhOpq12L5njJJRRCIA7ajs1Py9j/3cWPE=";
21   patches = [
22     # Update golang version in go.mod
23     (fetchpatch {
24       url = "https://github.com/asciimoo/filtron/commit/365a0131074b3b12aaa65194bfb542182a63413c.patch";
25       hash = "sha256-QGR6YetEzA/b6tC4uD94LBkWv0+9PG7RD72Tpkn2gQU=";
26     })
27     # Add missing go.sum file
28     (fetchpatch {
29       url = "https://github.com/asciimoo/filtron/commit/077769282b4e392e96a194c8ae71ff9f693560ea.patch";
30       hash = "sha256-BhHbXDKiRjSzC6NKhKUiH6rjt/EgJcEprHMMJ1x/wiQ=";
31     })
32   ];
34   ldflags = [
35     "-s"
36     "-w"
37   ];
39   meta = with lib; {
40     description = "Reverse HTTP proxy to filter requests by different rules";
41     homepage = "https://github.com/asciimoo/filtron";
42     license = licenses.agpl3Only;
43     maintainers = [ maintainers.dasj19 ];
44     platforms = platforms.linux;
45     mainProgram = "filtron";
46   };