From 682798c26e18d8d5ce21f339ea24b5120fe31168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= Date: Tue, 2 Jan 2024 16:23:56 +0100 Subject: [PATCH] templates: Make devshell work properly --- packages/templates/default.nix | 11 +++++++++++ packages/templates/{lock.json => package-lock.json} | 0 2 files changed, 11 insertions(+) rename packages/templates/{lock.json => package-lock.json} (100%) diff --git a/packages/templates/default.nix b/packages/templates/default.nix index 9b89df1..e8db970 100644 --- a/packages/templates/default.nix +++ b/packages/templates/default.nix @@ -7,6 +7,7 @@ imports = [ dream2nix.modules.dream2nix.nodejs-package-json-v3 dream2nix.modules.dream2nix.nodejs-granular-v3 + dream2nix.modules.dream2nix.nodejs-devshell-v3 ]; deps = {nixpkgs, ...}: { @@ -23,6 +24,8 @@ yj < $out/package.yaml > $out/package.json ''; + nativeBuildInputs = [config.deps.yj]; + # The default phase (which is hidden in `preInstallPhases`) will # copy the full node_modules directory to the output, and symlink # executables and whatnot. @@ -35,10 +38,18 @@ ''; }; + nodejs-package-lock-v3.packageLockFile = "${config.mkDerivation.src}/package-lock.json"; nodejs-granular-v3.deps = { sharp."0.28.3".mkDerivation.buildInputs = with config.deps; [ vips pkg-config ]; }; + + nodejs-devshell-v3.nodeModules = { + nodejs-granular-v3.deps.sharp."0.28.3".mkDerivation.buildInputs = with config.deps; [ + vips + pkg-config + ]; + }; } diff --git a/packages/templates/lock.json b/packages/templates/package-lock.json similarity index 100% rename from packages/templates/lock.json rename to packages/templates/package-lock.json