Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5}:
6
7buildGoModule rec {
8 pname = "nexttrace";
9 version = "1.4.0";
10
11 src = fetchFromGitHub {
12 owner = "nxtrace";
13 repo = "NTrace-core";
14 rev = "v${version}";
15 sha256 = "sha256-S3rxA5V3x4xdfUiq+XnP2ObE2gQ/3IcooIx6ShNkLrc=";
16 };
17 vendorHash = "sha256-9CNreBLmx1t95M8BijfytDxDrr/GL1GPI/ed9SdYae4=";
18
19 doCheck = false; # Tests require a network connection.
20
21 ldflags = [
22 "-s"
23 "-w"
24 "-X github.com/nxtrace/NTrace-core/config.Version=v${version}"
25 "-checklinkname=0" # refers to https://github.com/nxtrace/NTrace-core/issues/247
26 ];
27
28 postInstall = ''
29 mv $out/bin/NTrace-core $out/bin/nexttrace
30 '';
31
32 meta = with lib; {
33 description = "Open source visual route tracking CLI tool";
34 homepage = "https://mtr.moe";
35 license = licenses.gpl3Only;
36 maintainers = with maintainers; [ sharzy ];
37 mainProgram = "nexttrace";
38 };
39}