nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 nix-update-script,
6}:
7rustPlatform.buildRustPackage rec {
8 pname = "firezone-headless-client";
9 version = "1.5.5";
10 src = fetchFromGitHub {
11 owner = "firezone";
12 repo = "firezone";
13 tag = "headless-client-${version}";
14 hash = "sha256-Lo5iUXlpAecglr0uohOdsefeaDQZor2YoF0O99CxvEo=";
15 };
16
17 cargoHash = "sha256-1e2uqxZFDbtcQREB0s2jxfSFgs/hnPxTlUGFeK5L9yw=";
18 sourceRoot = "${src.name}/rust";
19 buildAndTestSubdir = "headless-client";
20 env.RUSTFLAGS = "--cfg system_certs";
21
22 # Required to remove profiling arguments which conflict with this builder
23 postPatch = ''
24 rm .cargo/config.toml
25 '';
26
27 # Required to run tests
28 preCheck = ''
29 export XDG_RUNTIME_DIR=$(mktemp -d)
30 '';
31
32 passthru.updateScript = nix-update-script {
33 extraArgs = [
34 "--version-regex"
35 "headless-client-(.*)"
36 ];
37 };
38
39 meta = {
40 description = "CLI client for the Firezone zero-trust access platform";
41 homepage = "https://github.com/firezone/firezone";
42 license = lib.licenses.asl20;
43 maintainers = with lib.maintainers; [
44 oddlama
45 patrickdag
46 ];
47 mainProgram = "firezone-headless-client";
48 platforms = lib.platforms.linux;
49 };
50}