Skip to content

Instantly share code, notes, and snippets.

@m1cr0man
Created June 16, 2019 12:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m1cr0man/f690fba0b24209cc2a09cdadcae7b0f8 to your computer and use it in GitHub Desktop.
Save m1cr0man/f690fba0b24209cc2a09cdadcae7b0f8 to your computer and use it in GitHub Desktop.
Building nodejs package with native dependencies
{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