coroot: init at 1.5.8 (#346844)

This commit is contained in:
Mathew Polzin 2024-10-16 10:20:23 -05:00 committed by GitHub
commit ae455cac19
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,62 @@
{
lib,
buildGoModule,
fetchFromGitHub,
fetchNpmDeps,
fetchpatch,
pkg-config,
nodejs,
npmHooks,
lz4,
}:
buildGoModule rec {
pname = "coroot";
version = "1.5.8";
src = fetchFromGitHub {
owner = "coroot";
repo = "coroot";
rev = "v${version}";
hash = "sha256-c8i+JtmUzq8lsRU8NpR4p1EXtIljYs1uZAq3O5fMqa4=";
};
# github.com/grafana/pyroscope-go/godeltaprof 0.1.6 is broken on go 1.23
# use patch from https://github.com/coroot/coroot/pull/357 until it gets fixed
patches = [
(fetchpatch {
url = "https://github.com/coroot/coroot/commit/9bf6ac0ad4dfaa7f13e6d9b5ce5e331d1478aafc.patch";
hash = "sha256-5otqdYyQ57sNjF84CRgx0wcztsRdTdsNuhEkvGyw7UE=";
})
];
vendorHash = "sha256-W0UNw8FEIHDKQDCjBryDSJB/UhNyAtMxC6A/9lr79sg=";
npmDeps = fetchNpmDeps {
src = "${src}/front";
hash = "sha256-inZV+iv837+7ntBae/oLSNLxpzoqEcJNPNdBE+osJHQ=";
};
nativeBuildInputs = [
pkg-config
nodejs
npmHooks.npmConfigHook
];
buildInputs = [ lz4 ];
overrideModAttrs = oldAttrs: {
nativeBuildInputs = lib.remove npmHooks.npmConfigHook oldAttrs.nativeBuildInputs;
preBuild = null;
};
npmRoot = "front";
preBuild = ''
npm --prefix="$npmRoot" run build-prod
'';
meta = {
description = "Open-source APM & Observability tool";
homepage = "https://coroot.com";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ errnoh ];
mainProgram = "coroot";
};
}