2020-03-08 06:47:50 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, makeWrapper, iptables, iproute }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "tailscale";
|
2020-06-04 05:23:29 +01:00
|
|
|
# Tailscale uses "git describe" as version numbers. 0.99.1-0 means
|
|
|
|
# "tag v0.99.1 plus 0 commits", which corresponds to rev="v0.99.1"
|
|
|
|
# below.
|
|
|
|
version = "0.99.1-0";
|
2020-03-08 06:47:50 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tailscale";
|
|
|
|
repo = "tailscale";
|
2020-06-04 05:23:29 +01:00
|
|
|
rev = "v0.99.1";
|
|
|
|
sha256 = "1kq4x5xknv0qq6n78xj5wjbf6svbdyw4nzs7z5gjb3ylj2vl97pb";
|
2020-03-08 06:47:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
CGO_ENABLED = 0;
|
|
|
|
|
|
|
|
goPackagePath = "tailscale.com";
|
2020-06-04 05:23:29 +01:00
|
|
|
vendorSha256 = "0yf2zdpd12w4qf4sbv7bkr40hw5faqynr6lb84v7w6v0az0nfzds";
|
2020-03-08 06:47:50 +00:00
|
|
|
subPackages = [ "cmd/tailscale" "cmd/tailscaled" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/tailscaled --prefix PATH : ${
|
|
|
|
lib.makeBinPath [ iproute iptables ]
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://tailscale.com";
|
|
|
|
description = "The node agent for Tailscale, a mesh VPN built on WireGuard";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ danderson mbaillie ];
|
|
|
|
};
|
2020-06-04 05:23:29 +01:00
|
|
|
}
|