-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce preInstallCustomCommands attribute for node modules #71
base: master
Are you sure you want to change the base?
Introduce preInstallCustomCommands attribute for node modules #71
Conversation
preInstallCustomCommands allows to run arbitrary shell scripts, running per node module pinned to given version - such approach, allows for fixing node modules which would otherwise be unfit for running on NixOS
ef41aa8
to
525b97c
Compare
Proposal: Make Example: preInstallCustomCommands = package_name: version: if package_name = "foo" && version == "bar" then "exit 123" else null; |
In addition to @andir 's suggestion there would also have to be some tests for this new feature. Please have a look at the existing ones and see if you can figure out how to write one in the same way. |
This change modifies preInstallCustomCommands attribute, allowing the end-user to fully customize behaviour
I have made the |
I am very interested into this solution as |
With NPM 7, hook scripts, which this PR relies on, are not supported anymore, see also #110. However with #151 it will become possible to patch the sources of arbitrary packages, which should cover mostly the same use cases as hook scripts. @AleksanderGondek Could you try out #151 and see if that can be used for your use cases? |
Fixes #70 - introduce new node_modules attribute:
preInstallCustomCommands
.It allows for execution of arbitrary shell scripts, running per node module pinned to given version - such approach, allows for fixing node modules which would otherwise be unfit for running on NixOS