-
-
Couldn't load subscription status.
- Fork 18
Use Unix Domain Socket for the registry #22
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -167,6 +167,9 @@ let | |||||||||
|
|
||||||||||
| configurePhase = attrs.configurePhase or "export HOME=$(mktemp -d)"; | ||||||||||
|
|
||||||||||
| nativeBuildInputs = (mkDerivationAttrs.nativeBuildInputs or []) | ||||||||||
| ++ pkgs.lib.singleton pkgs.ip2unix; | ||||||||||
|
|
||||||||||
| buildPhase = attrs.buildPhase or '' | ||||||||||
| runHook preBuild | ||||||||||
|
|
||||||||||
|
|
@@ -175,15 +178,16 @@ let | |||||||||
|
|
||||||||||
| echo "Starting napalm registry" | ||||||||||
|
|
||||||||||
| napalm-registry --snapshot ${snapshot} & | ||||||||||
| registrySock="$TMPDIR/registry.sock" | ||||||||||
| napalm-registry --path "$registrySock" --snapshot ${snapshot} & | ||||||||||
| napalm_REGISTRY_PID=$! | ||||||||||
|
|
||||||||||
| while ! nc -z localhost 8081; do | ||||||||||
| echo waiting for registry to be alive on port 8081 | ||||||||||
| while [ ! -e "$registrySock" ]; do | ||||||||||
| echo waiting for registry socket to be alive in "$registrySock" | ||||||||||
| sleep 1 | ||||||||||
| done | ||||||||||
|
|
||||||||||
| npm config set registry 'http://localhost:8081' | ||||||||||
| npm config set registry 'http://127.0.0.100' | ||||||||||
|
|
||||||||||
| export CPATH="${pkgs.nodejs}/include/node:$CPATH" | ||||||||||
|
|
||||||||||
|
|
@@ -195,7 +199,8 @@ let | |||||||||
| while IFS= read -r c | ||||||||||
| do | ||||||||||
| echo "Running npm command: $c" | ||||||||||
| $c || (echo "$c: failure, aborting" && kill $napalm_REGISTRY_PID && exit 1) | ||||||||||
| ip2unix -r out,addr=127.0.0.100,path="$registrySock" -- $c \ | ||||||||||
| || (echo "$c: failure, aborting" && kill $napalm_REGISTRY_PID && exit 1) | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The socket file should already be cleaned up by
Suggested change
|
||||||||||
| echo "Overzealously patching shebangs" | ||||||||||
| if [ -d node_modules ]; then find node_modules -type d -name bin | \ | ||||||||||
| while read file; do patchShebangs $file; done; fi | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,7 @@ dependencies: | |
| - time | ||
| - unordered-containers | ||
| - uri-encode | ||
| - network | ||
| - warp | ||
| - zlib | ||
|
|
||
|
|
||
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.
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.
Why nest this into another directory? We already set this up accordingly in the builder sandbox and if this would interfere with build-specific files, the
mktempvariant would have the same issue.