File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
pkgs/build-support/node/import-npm-lock Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,10 @@ lib.fix (self: {
7272 # Example: { "node_modules/axios" = { curlOptsList = [ "--verbose" ]; }; }
7373 # This will download the axios package with curl's verbose option.
7474 , fetcherOpts ? { }
75+ # A map from node_module path to an alternative package to use instead of fetching the source in package-lock.json.
76+ # Example: { "node_modules/axios" = stdenv.mkDerivation { ... }; }
77+ # This is usefull if you want to inject custom sources for a specific package.
78+ , packageSourceOverrides ? { }
7579 } :
7680 let
7781 mapLockDependencies =
@@ -94,10 +98,10 @@ lib.fix (self: {
9498 mapAttrs
9599 ( modulePath : module :
96100 let
97- src = fetchModule {
101+ src = packageSourceOverrides . ${ modulePath } or ( fetchModule {
98102 inherit module npmRoot ;
99103 fetcherOpts = fetcherOpts . ${ modulePath } or { } ;
100- } ;
104+ } ) ;
101105 in
102106 cleanModule module
103107 // lib . optionalAttrs ( src != null ) {
You can’t perform that action at this time.
0 commit comments