-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for patching dependencies
Can be used to patchShebangs for specific packages, which with NPM version 7.0 can't be done globally for all packages anymore Could also be a replacement for preInstallLinks
- Loading branch information
Showing
8 changed files
with
229 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "source-patching", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"custom-hello-world": "^1.0.0" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ npmlock2nix }: | ||
npmlock2nix.shell { | ||
src = ./.; | ||
node_modules_attrs = { | ||
sourceAttrs = { | ||
custom-hello-world = _: { | ||
patches = builtins.toFile "custom-hello-world.patch" '' | ||
diff --git a/lib/index.js b/lib/index.js | ||
index 1f66513..64391a7 100644 | ||
--- a/lib/index.js | ||
+++ b/lib/index.js | ||
@@ -21,7 +21,7 @@ function generateHelloWorld({ comma, exclamation, lowercase }) { | ||
if (comma) | ||
helloWorldStr += ','; | ||
- helloWorldStr += ' World'; | ||
+ helloWorldStr += ' Nix'; | ||
if (exclamation) | ||
helloWorldStr += '!'; | ||
''; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains 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
This file contains 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
This file contains 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