zipline: set NODE_PATH for sharp

When building sharp from source, it tries to `require("node-gyp")`,
which will not be found since it's not in zipline's deps. We therefore
set NODE_PATH with nixpkgs's node-gyp, so that it can be imported by the
sharp build script.

See:
https://github.com/lovell/sharp/blame/7b4c4762432b14c62676e860c8034b5cd326f464/install/build.js#L24
This commit is contained in:
uku
2026-03-02 11:00:07 +01:00
parent bb9f54bb0e
commit f797c11c6a
+1
View File
@@ -75,6 +75,7 @@ stdenv.mkDerivation (finalAttrs: {
env = environment // {
DATABASE_URL = "dummy";
NODE_PATH = "${node-gyp}/lib/node_modules";
};
buildPhase = ''