Created
June 16, 2019 12:01
-
-
Save m1cr0man/f690fba0b24209cc2a09cdadcae7b0f8 to your computer and use it in GitHub Desktop.
Building nodejs package with native dependencies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{pkgs ? import /root/nixpkgs { | |
inherit system; | |
}, system ? builtins.currentSystem}: | |
let | |
nodePackages = import ./default.nix { | |
inherit pkgs system; | |
}; | |
in | |
nodePackages // { | |
"sharp-0.21.3" = nodePackages."sharp-0.21.3".override { | |
buildInputs = [ pkgs.pkgconfig pkgs.node-gyp pkgs.vips ]; | |
# https://github.com/lovell/sharp/blob/master/lib/libvips.js#L70 | |
PKG_CONFIG_PATH = "${pkgs.vips}/lib/pkgconfig"; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment