mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-31 20:54:56 +00:00
Fixes CVE-2026-34389, CVE-2026-29180, CVE-2026-26060, CVE-2026-34386, CVE-2026-34391, CVE-2026-26061, CVE-2026-34387 and CVE-2026-34388. Fixes https://github.com/NixOS/nixpkgs/issues/504467 Fixes https://github.com/NixOS/nixpkgs/issues/504468 Fixes https://github.com/NixOS/nixpkgs/issues/504469 Fixes https://github.com/NixOS/nixpkgs/issues/504462 Fixes https://github.com/NixOS/nixpkgs/issues/504463 Fixes https://github.com/NixOS/nixpkgs/issues/504464 Fixes https://github.com/NixOS/nixpkgs/issues/504465 Fixes https://github.com/NixOS/nixpkgs/issues/504466 Changes: https://github.com/fleetdm/fleet/releases/tag/fleet-v4.82.2 https://github.com/fleetdm/fleet/releases/tag/fleet-v4.82.1 https://github.com/fleetdm/fleet/releases/tag/fleet-v4.82.0
106 lines
2.2 KiB
Nix
106 lines
2.2 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
stdenvNoCC,
|
|
yarnConfigHook,
|
|
yarnBuildHook,
|
|
nodejs_24,
|
|
fetchYarnDeps,
|
|
buildGoModule,
|
|
go-bindata,
|
|
versionCheckHook,
|
|
}:
|
|
let
|
|
pname = "fleet";
|
|
version = "4.82.2";
|
|
src = fetchFromGitHub {
|
|
owner = "fleetdm";
|
|
repo = "fleet";
|
|
tag = "fleet-v${version}";
|
|
hash = "sha256-Cbn7phhaDcpYm3nV8nLb/2QVQl9mhsRfHa6GG59MNcA=";
|
|
};
|
|
|
|
frontend = stdenvNoCC.mkDerivation {
|
|
pname = "${pname}-frontend";
|
|
inherit version src;
|
|
|
|
nativeBuildInputs = [
|
|
yarnConfigHook
|
|
yarnBuildHook
|
|
nodejs_24
|
|
];
|
|
|
|
yarnOfflineCache = fetchYarnDeps {
|
|
yarnLock = src + "/yarn.lock";
|
|
hash = "sha256-2gTV42OVgeH35rOrOgXiop+DGWtq2PpHqKY4mFblbAs=";
|
|
};
|
|
|
|
NODE_ENV = "production";
|
|
yarnBuildScript = "webpack";
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/assets
|
|
cp -r assets/* $out/assets/
|
|
|
|
mkdir -p $out/frontend/templates
|
|
cp frontend/templates/react.tmpl $out/frontend/templates/react.tmpl
|
|
|
|
runHook postInstall
|
|
'';
|
|
};
|
|
in
|
|
buildGoModule (finalAttrs: {
|
|
inherit pname version src;
|
|
|
|
vendorHash = "sha256-hgo+j2+gE0ArGRRvxC/0jcpv0Bp3hvBRO7Wl+9xl8io=";
|
|
|
|
subPackages = [
|
|
"cmd/fleet"
|
|
];
|
|
|
|
ldflags = [
|
|
"-X github.com/fleetdm/fleet/v4/server/version.appName=fleet"
|
|
"-X github.com/fleetdm/fleet/v4/server/version.version=${finalAttrs.version}"
|
|
];
|
|
|
|
nativeBuildInputs = [ go-bindata ];
|
|
|
|
preBuild = ''
|
|
cp -r ${frontend}/assets/* assets
|
|
cp -r ${frontend}/frontend/templates/react.tmpl frontend/templates/react.tmpl
|
|
|
|
go-bindata -pkg=bindata -tags full \
|
|
-o=server/bindata/generated.go \
|
|
frontend/templates/ assets/... server/mail/templates
|
|
'';
|
|
|
|
tags = [ "full" ];
|
|
|
|
doInstallCheck = true;
|
|
versionCheckProgramArg = "version";
|
|
nativeInstallCheckInputs = [
|
|
versionCheckHook
|
|
];
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
passthru = {
|
|
inherit frontend;
|
|
};
|
|
|
|
meta = {
|
|
homepage = "https://github.com/fleetdm/fleet";
|
|
changelog = "https://github.com/fleetdm/fleet/releases/tag/fleet-v${finalAttrs.version}";
|
|
description = "CLI tool to launch Fleet server";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [
|
|
asauzeau
|
|
lesuisse
|
|
bddvlpr
|
|
];
|
|
mainProgram = "fleet";
|
|
};
|
|
})
|