nixpkgs/pkgs/servers/headscale/default.nix

27 lines
770 B
Nix
Raw Normal View History

2021-07-09 22:06:53 +00:00
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "headscale";
2021-08-08 13:26:45 +00:00
version = "0.5.2";
2021-07-09 22:06:53 +00:00
src = fetchFromGitHub {
owner = "juanfont";
repo = "headscale";
rev = "v${version}";
2021-08-08 13:26:45 +00:00
sha256 = "sha256-AclIH2Gd8U/Hfy24KOFic/np4qAWELlIMfsPCSkdjog=";
2021-07-09 22:06:53 +00:00
};
2021-08-07 09:24:25 +00:00
vendorSha256 = "sha256-UIBH6Pf2mmXBsdFW0RRvedLQhonNsrl4j2fxxRtum4M=";
2021-07-09 22:06:53 +00:00
# Ldflags are same as build target in the project's Makefile
# https://github.com/juanfont/headscale/blob/main/Makefile
ldflags = [ "-s" "-w" "-X main.version=v${version}" ];
meta = with lib; {
description = "An implementation of the Tailscale coordination server";
homepage = "https://github.com/juanfont/headscale";
license = licenses.bsd3;
maintainers = with maintainers; [ nkje ];
};
}