diff --git a/pkgs/by-name/fi/firezone-gateway/package.nix b/pkgs/by-name/fi/firezone-gateway/package.nix new file mode 100644 index 000000000000..0e6010b3b92d --- /dev/null +++ b/pkgs/by-name/fi/firezone-gateway/package.nix @@ -0,0 +1,45 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + nix-update-script, +}: +rustPlatform.buildRustPackage rec { + pname = "firezone-gateway"; + version = "1.4.5"; + src = fetchFromGitHub { + owner = "firezone"; + repo = "firezone"; + tag = "gateway-${version}"; + hash = "sha256-2MDQyMCQIqV1Kbem53jnE8DGUZ6SrZqp2LpGJXvLBgA="; + }; + + useFetchCargoVendor = true; + cargoHash = "sha256-Yz9xuH8Eph1pzv0siTpvdSXZLj/AjS5PR06CitK9NdE="; + sourceRoot = "${src.name}/rust"; + buildAndTestSubdir = "gateway"; + RUSTFLAGS = "--cfg system_certs"; + + # Required to remove profiling arguments which conflict with this builder + postPatch = '' + rm .cargo/config.toml + ''; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "gateway-(.*)" + ]; + }; + + meta = { + description = "WireGuard tunnel server for the Firezone zero-trust access platform"; + homepage = "https://github.com/firezone/firezone"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ + oddlama + patrickdag + ]; + mainProgram = "firezone-gateway"; + }; +}