Make Camino examples and scaffolds complete Yarn and Nix packages
This commit is contained in:
@@ -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
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user