-
-
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
fix: patchShebangs in nonexecutable bin files (#106) #107
Open
milahu
wants to merge
10
commits into
nix-community:master
Choose a base branch
from
milahu:patch-5
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
98c359b
fix: patchShebangs in nonexecutable bin files (#106)
milahu a306d45
remove cat
milahu a75e8bc
fix jq filter
milahu 48b2eaf
ignore root package, throw on error
milahu 8c9b89b
in function node_modules, ignore the install script for the root package
milahu 40e09df
remove questionmarks from derivation names for mkdir $out
milahu ff6d44a
fix: run install script for the root package
milahu 60b003c
print install commands before running them
milahu de6d2c6
fix jq filter: handle missing scripts field
milahu 99370e3
in mkShell, dont run install scripts for the root package
milahu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this should throw if binTarget is not found
in my case:
the root package.json (/tmp/package/package.json) has a bin,
but npmlock2nix will copy only the *.json files to /build, so binTarget is not found
or rather, npmlock2nix should ignore bin's for the root package (/tmp/package)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even more, npmlock2nix.node_modules should ignore install scripts for the root package,
since for the root package, only the *.json files are available,
and install scripts may require other files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that so? I am not entirely sure that is true. Right now we do an
npm install
in thenode_modules
build and that does what we need (most of the time?).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider this package.json
npmlock2nix has only two files for the root-package: package.json and package-lock.json
these are symlinked to /build in npmlock2nix.node_modules
npmlock2nix/internal.nix
Lines 365 to 368 in 33eb330
so
some/script.js
is NOT available in /build, andnpm install
would failthe job of npmlock2nix.node_modules is only to populate node_modules