mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-21 12:38:41 +03:00
filtron: use buildGoModule
This commit is contained in:
parent
3b52db07e2
commit
31b324c027
@ -1,22 +1,32 @@
|
|||||||
{ lib, buildGoPackage, fetchFromGitHub }:
|
{ lib, buildGoModule, fetchFromGitHub, fetchpatch }:
|
||||||
|
|
||||||
buildGoPackage rec {
|
buildGoModule rec {
|
||||||
pname = "filtron";
|
pname = "filtron";
|
||||||
version = "0.2.0";
|
version = "0.2.0";
|
||||||
|
|
||||||
goPackagePath = "github.com/asciimoo/filtron";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "asciimoo";
|
owner = "asciimoo";
|
||||||
repo = "filtron";
|
repo = "filtron";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "18d3h0i2sfqbc0bjx26jm2n9f37zwp8z9z4wd17sw7nvkfa72a26";
|
hash = "sha256-RihxlJvbHq5PaJz89NHl/wyXrKjSiC4XYAs7LSKAo6E=";
|
||||||
};
|
};
|
||||||
|
|
||||||
goDeps = ./deps.nix;
|
vendorHash = "sha256-1DRR16WiBGvhOpq12L5njJJRRCIA7ajs1Py9j/3cWPE=";
|
||||||
|
|
||||||
# The upstream test checks are obsolete/unmaintained.
|
patches = [
|
||||||
doCheck = false;
|
# Update golang version in go.mod
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/asciimoo/filtron/commit/365a0131074b3b12aaa65194bfb542182a63413c.patch";
|
||||||
|
hash = "sha256-QGR6YetEzA/b6tC4uD94LBkWv0+9PG7RD72Tpkn2gQU=";
|
||||||
|
})
|
||||||
|
# Add missing go.sum file
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/asciimoo/filtron/commit/077769282b4e392e96a194c8ae71ff9f693560ea.patch";
|
||||||
|
hash = "sha256-BhHbXDKiRjSzC6NKhKUiH6rjt/EgJcEprHMMJ1x/wiQ=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
ldflags = [ "-s" "-w" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Reverse HTTP proxy to filter requests by different rules.";
|
description = "Reverse HTTP proxy to filter requests by different rules.";
|
||||||
|
41
pkgs/servers/filtron/deps.nix
generated
41
pkgs/servers/filtron/deps.nix
generated
@ -1,41 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
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=";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
]
|
|
Loading…
Reference in New Issue
Block a user