-
Notifications
You must be signed in to change notification settings - Fork 79
Update to spago 0.93.44 and Nixpkgs 25.5 #701
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 3 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 |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| /node_modules | ||
| /output | ||
| /output-es | ||
| /scratch | ||
| /.vscode | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,8 +2,7 @@ | |
| makeWrapper, | ||
| lib, | ||
| stdenv, | ||
| purix, | ||
| purs-backend-es, | ||
| purs-backend-es-unstable, | ||
| esbuild, | ||
| writeText, | ||
| nodejs, | ||
|
|
@@ -32,16 +31,27 @@ let | |
| "buildPhase" | ||
| "installPhase" | ||
| ]; | ||
| nativeBuildInputs = [ purs-backend-es ]; | ||
| nativeBuildInputs = [ purs-backend-es-unstable ]; | ||
| buildPhase = '' | ||
| ln -s ${package-lock}/js/node_modules . | ||
| cp -r ${spago-lock.registry-app}/output . | ||
| cp -r ${spago-lock}/output . | ||
| echo "Optimizing with purs-backend-es..." | ||
| purs-backend-es build | ||
| ''; | ||
| installPhase = '' | ||
| mkdir $out | ||
| mv output-es $out/output | ||
| mkdir $out; | ||
| cp -r output-es $out/output; | ||
| # This for loop exists because purs-backend-es finds the corefn.json files | ||
| # just fine, but doesn't find the foreign.js files. | ||
| # I suspect this is because of a quirky interaction between Nix and `copyFile`, | ||
| # but I'm not sure how to fix it so we work around it by copying the foreign | ||
| # modules by hand. | ||
| for dir in output/*/; do | ||
|
Contributor
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. Why not something like
Member
Author
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. I can't parse that command - do you have a more precise suggestion? I'm happy with the for loop because it's very readable.
Member
Author
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. Ah you did edit in a runnable command, I must have seen an outdated version. That works just as well, but I'd still prefer the for loop |
||
| subdir=$(basename "$dir") | ||
| if [ -f "output/$subdir/foreign.js" ]; then | ||
| cp "output/$subdir/foreign.js" "$out/output/$subdir/" || true; | ||
| fi | ||
| done | ||
| ''; | ||
| }; | ||
| in | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,4 +75,5 @@ package: | |
| test: | ||
| main: Test.Registry.Main | ||
| dependencies: | ||
| - registry-test-utils | ||
| - spec | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,4 +47,5 @@ package: | |
| - node-execa | ||
| - node-fs | ||
| - node-process | ||
| - registry-test-utils | ||
| - spec | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,5 +51,5 @@ package: | |
| - json | ||
| - node-child-process | ||
| - node-execa | ||
| - registry-test-utils | ||
| - spec | ||
| - unsafe-coerce | ||
Uh oh!
There was an error while loading. Please reload this page.