2024-01-01 18:56:16 +00:00
|
|
|
{
|
|
|
|
dream2nix,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
imports = [
|
|
|
|
dream2nix.modules.dream2nix.nodejs-package-json-v3
|
|
|
|
dream2nix.modules.dream2nix.nodejs-granular-v3
|
2024-01-02 15:23:56 +00:00
|
|
|
dream2nix.modules.dream2nix.nodejs-devshell-v3
|
2024-01-01 18:56:16 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
deps = {nixpkgs, ...}: {
|
|
|
|
inherit (nixpkgs) pkg-config runCommandLocal rsync vips yj;
|
|
|
|
};
|
|
|
|
|
|
|
|
name = "tlaternet-templates";
|
|
|
|
version = "0.1.0";
|
|
|
|
|
|
|
|
mkDerivation = {
|
|
|
|
src = config.deps.runCommandLocal "source" {nativeBuildInputs = [config.deps.yj];} ''
|
|
|
|
cp -r ${./.} $out/
|
|
|
|
chmod -R u+w $out
|
|
|
|
yj < $out/package.yaml > $out/package.json
|
|
|
|
'';
|
|
|
|
|
2024-01-02 15:23:56 +00:00
|
|
|
nativeBuildInputs = [config.deps.yj];
|
|
|
|
|
2024-01-01 18:56:16 +00:00
|
|
|
# The default phase (which is hidden in `preInstallPhases`) will
|
|
|
|
# copy the full node_modules directory to the output, and symlink
|
|
|
|
# executables and whatnot.
|
|
|
|
#
|
|
|
|
# Since this package's output is static HTML/JS, we do not want
|
|
|
|
# that.
|
|
|
|
preInstallPhases = lib.mkForce [];
|
|
|
|
installPhase = ''
|
|
|
|
cp -r dist $out
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
nodejs-granular-v3.deps = {
|
|
|
|
sharp."0.28.3".mkDerivation.buildInputs = with config.deps; [
|
|
|
|
vips
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
};
|
2024-01-02 15:23:56 +00:00
|
|
|
|
|
|
|
nodejs-devshell-v3.nodeModules = {
|
|
|
|
nodejs-granular-v3.deps.sharp."0.28.3".mkDerivation.buildInputs = with config.deps; [
|
|
|
|
vips
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
};
|
2024-01-01 18:56:16 +00:00
|
|
|
}
|