Files
nixpkgs/pkgs/by-name/go/golink/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

41 lines
899 B
Nix

{
git,
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "golink";
version = "1.0.0";
src = fetchFromGitHub {
owner = "tailscale";
repo = "golink";
tag = "v${version}";
hash = "sha256-cIml0ewF5j2cQySLHkMmV1rl7cVH8wuoPFeFDCARi1A=";
};
vendorHash = "sha256-QIAkmqXWH3X2dIoWyVcqFXVHBwzyv1dNPfdkzD5LuSE=";
overrideModAttrs = old: {
# netdb.go allows /etc/protocols and /etc/services to not exist and happily proceeds, but it panic()s if they exist but return permission denied.
postBuild = ''
patch -p0 < ${./darwin-sandbox-fix.patch}
'';
};
ldflags = [
"-s"
"-w"
];
meta = with lib; {
description = "Private shortlink service for tailnets";
homepage = "https://github.com/tailscale/golink";
license = licenses.bsd3;
maintainers = with maintainers; [ fab ];
mainProgram = "golink";
};
}