haskellPackages.mkDerivation: make work in pkgsCross.ghcjs#209043
Merged
maralorn merged 6 commits intoNixOS:haskell-updatesfrom Jan 5, 2023
Merged
haskellPackages.mkDerivation: make work in pkgsCross.ghcjs#209043maralorn merged 6 commits intoNixOS:haskell-updatesfrom
maralorn merged 6 commits intoNixOS:haskell-updatesfrom
Conversation
Previously, we would try to calculate the name of buildPackages.stdenv.cc and then just hope that it is in PATH somehow. This definitely doesn't work in all cases. The new approach is to add buildPackages.stdenv.cc to depsBuildBuild which also populates CC_FOR_BUILD which we can directly re-use.
This line may look odd, but we should not set ghc.isGhcjs if we are using the JavaScript backend. It is a normal cross backend and no special code is required to make it work, i.e. everything will be named as it would be normally. Additionally, passing --ghcjs to Cabal will make it do the wrong thing. We need to, of course, stop strip from being thrown at the JS objects in both cases.
The JavaScript backend emits `#!/usr/bin/env node` shebangs we need to take care off using patchShebangs in fixupPhase.
31998d8 to
d9591db
Compare
It should be just below the current output limit, but we'll see. If it doesn't fit, we may have to disable profiling objects.
Member
Author
|
Should be good to go, worked out all the kinks I could find. |
Member
|
Does it make sense to call the cross target also ghcjs? Won‘t that confuse people? Should we maybe call it "js" "javascript" or something? |
Member
Author
|
The cross target is literally called |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of changes
Just need to account for some quirks of that particular cross set, so it works as expected.
pkgsCross.ghcjs.haskell.packages.ghcHEAD.hello.pkgsCross.aarch64-multiplatformpkgsStaticThings done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes