Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildGoModule, 4 fleet, 5 writableTmpDirAsHomeHook, 6 versionCheckHook, 7 stdenv, 8}: 9 10buildGoModule (finalAttrs: { 11 pname = "fleetctl"; 12 13 inherit (fleet) version src vendorHash; 14 15 subPackages = [ 16 "cmd/fleetctl" 17 ]; 18 19 ldflags = [ 20 "-X github.com/fleetdm/fleet/v4/server/version.appName=fleetctl" 21 "-X github.com/fleetdm/fleet/v4/server/version.version=${finalAttrs.version}" 22 ]; 23 24 nativeCheckInputs = [ 25 writableTmpDirAsHomeHook 26 ]; 27 28 # Try to access /var/empty/.goquery/history subfolders 29 doCheck = !stdenv.hostPlatform.isDarwin; 30 doInstallCheck = !stdenv.hostPlatform.isDarwin; 31 32 nativeInstallCheckInputs = [ 33 versionCheckHook 34 ]; 35 36 meta = { 37 homepage = "https://github.com/fleetdm/fleet"; 38 changelog = "https://github.com/fleetdm/fleet/releases/tag/fleet-v${finalAttrs.version}"; 39 description = "CLI tool for managing Fleet"; 40 license = lib.licenses.mit; 41 maintainers = with lib.maintainers; [ 42 lesuisse 43 ]; 44 mainProgram = "fleetctl"; 45 }; 46})