Make Camino examples and scaffolds complete Yarn and Nix packages

This commit is contained in:
Timothy J. Aveni
2026-09-22 14:42:54 -07:00
parent 0da022e216
commit 785c54992f
8 changed files with 164 additions and 20 deletions
+29
View File
@@ -0,0 +1,29 @@
{
pkgs,
src,
nodejs ? pkgs.nodejs_24,
}:
let
project = (pkgs.callPackage (src + "/yarn-project.nix") { inherit nodejs; }) {
inherit src;
overrideAttrs = _: {
buildPhase = "runHook preBuild; runHook postBuild";
installPhase = ''
runHook preInstall
test -d node_modules
mkdir -p "$out"
cp -a node_modules/. "$out/"
runHook postInstall
'';
};
};
in
project
// {
devShell = pkgs.mkShell {
packages = [
nodejs
project.yarn-freestanding
];
};
}