From 75e60a40d4551c70bd80ac68bb22c144d6caa5d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= Date: Sun, 11 Apr 2021 03:13:26 +0100 Subject: [PATCH] Explain sharp deps and use them in the dev shell The sharp dependencies are *also* required in the dev shell when upstream pulls their prebuilt binaries. --- flake.nix | 5 +++-- nix/override.nix | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 85489e0..efab4df 100644 --- a/flake.nix +++ b/flake.nix @@ -42,7 +42,8 @@ devShell = prev.mkShell { buildInputs = with prev; - with nodePackages; [ + with nodePackages; + [ nodejs node2nix @@ -50,7 +51,7 @@ prettier typescript typescript-language-server - ]; + ] ++ packages.nodeEnv.shell.buildInputs; }; }; }; diff --git a/nix/override.nix b/nix/override.nix index 6842c88..781a8d1 100644 --- a/nix/override.nix +++ b/nix/override.nix @@ -6,9 +6,14 @@ in nodePackages // { shell = nodePackages.shell.override { buildInputs = with pkgs; [ pkgs.nodePackages.node-gyp-build + pkgconfig + + # For sharp (dependency of the auto-favicon + # generator). This depends on the vips (which uses + # gobjects), and builds using node-gyp, which in turn + # needs python. vips glib - pkgconfig ]; npmFlags = "--ignore-scripts";