about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/re/reproxy/package.nix
blob: f90ad1246cf85f2837cedcebb0ddda06d2bdc798 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ lib, stdenv, buildGoModule, fetchFromGitHub }:

buildGoModule rec {
  pname = "reproxy";
  version = "1.1.1";

  src = fetchFromGitHub {
    owner = "umputun";
    repo = "reproxy";
    rev = "v${version}";
    hash = "sha256-/ydpqi7O4z41YxYb/RngPWk/79h3MIxAopzqIDMgw1g=";
  };

  vendorHash = null;

  ldflags = [
    "-s" "-w" "-X main.revision=${version}"
  ];

  checkFlags = [
    # Requires network access or fluky
    "-skip=^Test(_MainWithPlugin|_MainWithSSL|_Main|Http_matchHandler|Http_withBasicAuth|File_Events|File_Events_BusyListener)$"
  ];

  postInstall = ''
    mv $out/bin/{app,reproxy}
  '';

  meta = with lib; {
    description = "Simple edge server / reverse proxy";
    homepage = "https://reproxy.io/";
    changelog = "https://github.com/umputun/reproxy/releases/tag/${src.rev}";
    license = licenses.mit;
    maintainers = with maintainers; [ sikmir ];
    mainProgram = "reproxy";
  };
}