Unverified Commit a9860fd2 authored by Fernando Rodrigues's avatar Fernando Rodrigues Committed by GitHub
Browse files

fosrl-newt: 1.5.2 -> 1.7.0, modernize (#470284)

parents dfa9b257 c0a6aaf0
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -3,37 +3,36 @@
  buildGoModule,
  fetchFromGitHub,
  versionCheckHook,
  nix-update-script,
}:

buildGoModule rec {
  pname = "newt";
  version = "1.5.2";
  version = "1.7.0";

  src = fetchFromGitHub {
    owner = "fosrl";
    repo = "newt";
    tag = version;
    hash = "sha256-svMAMPK8f5cwIPzr0+WdoWzHDV1jtuO1Lm2oZIVHE6k=";
    hash = "sha256-R6X9DOu1iGS/a4d5kmKoBZI0L5k7S0w3SHHFQnQH/ho=";
  };

  vendorHash = "sha256-wNdZEfPx12T0jvCEDkz04X8N6t/pNIOXWFSTHteeZYs=";

  postPatch = ''
    substituteInPlace main.go \
      --replace-fail "version_replaceme" "${version}"
  '';
  vendorHash = "sha256-5Xr6mwPtsqEliKeKv2rhhp6JC7u3coP4nnhIxGMqccU=";

  nativeInstallCheckInputs = [ versionCheckHook ];

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

  doInstallCheck = true;

  versionCheckProgramArg = [ "-version" ];

  passthru.updateScript = nix-update-script { };

  meta = {
    description = "Tunneling client for Pangolin";
    homepage = "https://github.com/fosrl/newt";
@@ -43,6 +42,7 @@ buildGoModule rec {
      fab
      jackr
      sigmasquadron
      water-sucks
    ];
    mainProgram = "newt";
  };