codebase-memory-mcp: build web ui

We do not need gnumake in nativeBuildInputs as it is included in stdenv.
This commit is contained in:
Sandro Jäckel
2026-06-28 21:40:40 +02:00
parent 2b3763c395
commit 1a0fe66286
@@ -1,8 +1,11 @@
{
lib,
stdenv,
bash,
fetchFromGitHub,
gnumake,
fetchNpmDeps,
nodejs,
npmHooks,
stdenv,
zlib,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -20,9 +23,31 @@ stdenv.mkDerivation (finalAttrs: {
./remove-install-update.diff
];
nativeBuildInputs = [ gnumake ];
postPatch = ''
substituteInPlace Makefile.cbm \
--replace-fail "npm ci &&" ""
buildInputs = [ zlib ];
substituteInPlace scripts/embed-frontend.sh \
--replace-fail "/bin/bash" "${bash}/bin/bash"
'';
npmDeps = fetchNpmDeps {
inherit (finalAttrs) src;
sourceRoot = "${finalAttrs.src.name}/${finalAttrs.npmRoot}";
hash = "sha256-feoZNsZfrPgoLdjlnnh3w3vTxR6AwPdUkPubaR93TAk=";
};
npmRoot = "graph-ui";
nativeBuildInputs = [
nodejs
npmHooks.npmConfigHook
];
buildInputs = [
bash
zlib
];
strictDeps = true;
__structuredAttrs = true;
@@ -34,7 +59,7 @@ stdenv.mkDerivation (finalAttrs: {
# scripts/build.sh verifies CC via `file`, which fails on Nix's compiler wrapper.
# Call make directly — mirrors upstream flake.nix.
makeFlags = [
"cbm"
"cbm-with-ui"
"CFLAGS_EXTRA='-DCBM_VERSION=\"${finalAttrs.version}\"'"
];