Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 53 lines 1.1 kB view raw
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 fetchNpmDeps, 6 pkg-config, 7 nodejs, 8 npmHooks, 9 lz4, 10}: 11 12buildGoModule rec { 13 pname = "coroot"; 14 version = "1.11.4"; 15 16 src = fetchFromGitHub { 17 owner = "coroot"; 18 repo = "coroot"; 19 rev = "v${version}"; 20 hash = "sha256-m8rh969hac6D5KaSH5BvIQGJ+0qTAfyoK/cKCidt4N8="; 21 }; 22 23 vendorHash = "sha256-1yKb8CuNcwpHWC0eDIs2Ml3H7xGYaTCGxyrtuyLvd8c="; 24 npmDeps = fetchNpmDeps { 25 src = "${src}/front"; 26 hash = "sha256-inZV+iv837+7ntBae/oLSNLxpzoqEcJNPNdBE+osJHQ="; 27 }; 28 29 nativeBuildInputs = [ 30 pkg-config 31 nodejs 32 npmHooks.npmConfigHook 33 ]; 34 buildInputs = [ lz4 ]; 35 36 overrideModAttrs = oldAttrs: { 37 nativeBuildInputs = lib.remove npmHooks.npmConfigHook oldAttrs.nativeBuildInputs; 38 preBuild = null; 39 }; 40 41 npmRoot = "front"; 42 preBuild = '' 43 npm --prefix="$npmRoot" run build-prod 44 ''; 45 46 meta = { 47 description = "Open-source APM & Observability tool"; 48 homepage = "https://coroot.com"; 49 license = lib.licenses.asl20; 50 maintainers = with lib.maintainers; [ errnoh ]; 51 mainProgram = "coroot"; 52 }; 53}