mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 04:53:27 +00:00
54 lines
1.1 KiB
Nix
54 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
fetchNpmDeps,
|
|
pkg-config,
|
|
nodejs,
|
|
npmHooks,
|
|
lz4,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "coroot";
|
|
version = "1.6.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "coroot";
|
|
repo = "coroot";
|
|
rev = "v${version}";
|
|
hash = "sha256-i5tML5cQPtZ5dKWJQENRSLQM5m9b5vd1h+OtRYbv9qo=";
|
|
};
|
|
|
|
vendorHash = "sha256-wyxNT8g5TUCjlxauL7NmCf4HZ91V2nD64L1L/rYH864=";
|
|
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";
|
|
};
|
|
}
|