Based on the Nix expression from https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/node/build-npm-package/default.nix, the buildNpmPackage
function takes the following fields as inputs:
name
: The name of the package. It defaults to a combination ofpname
andversion
fromargs
.src
: The source of the package if it's a single source. Defaults tonull
.srcs
: The sources of the package if there are multiple. Defaults tonull
.sourceRoot
: The root directory of the source. Defaults tonull
.prePatch
: Commands to run before applying patches. Defaults to an empty string.patches
: A list of patches to be applied to the source. Defaults to an empty list.postPatch
: Commands to run after applying patches. Defaults to an empty string.nativeBuildInputs
: A list of native build dependencies. Defaults to an empty list.