xmonad: fix xmonad --recompile when cross-compiled#397767
Open
sorki wants to merge 1 commit intoNixOS:masterfrom
Open
xmonad: fix xmonad --recompile when cross-compiled#397767sorki wants to merge 1 commit intoNixOS:masterfrom
sorki wants to merge 1 commit intoNixOS:masterfrom
Conversation
by using `targetPrefix` in front of `ghc` binary. The contents of the `bin` directory look like this ```shell armv7l-unknown-linux-gnueabihf-ghc armv7l-unknown-linux-gnueabihf-hp2ps armv7l-unknown-linux-gnueabihf-ghc-9.6.6 armv7l-unknown-linux-gnueabihf-hp2ps-ghc-9.6.6 armv7l-unknown-linux-gnueabihf-ghci armv7l-unknown-linux-gnueabihf-hsc2hs armv7l-unknown-linux-gnueabihf-ghci-9.6.6 armv7l-unknown-linux-gnueabihf-hsc2hs-ghc-9.6.6 armv7l-unknown-linux-gnueabihf-ghc-pkg hsc2hs-ghc-9.6.6 armv7l-unknown-linux-gnueabihf-ghc-pkg-9.6.6 xmonad ``` and before this patch XMONAD_GHC points to just `.../bin/ghc`. This is also propagates `targetPrefix` via `ghcWithPackages.passthru` set, to make it consistent with `(pkgs.haskellPackages.ghcWithPackages (ps: [])).passthru.targetPrefix` which is equal to `pkgs.haskellPackages.ghc.passthru.targetPrefix`, but missing when any package is added to the list.
Member
Author
sternenseemann
approved these changes
Apr 10, 2025
Member
|
Note that this is, I guess, less wrong than before, but still incorrect. The cross compiler that would end up being used can't be executed on the platform that xmonad would run on. Therefore In principle, you'd need to pick out a cross compiled ghc, however, this is only possible for GHC < 9.6 at the moment… |
Member
Author
|
Yeah you're right, it points to x86 GHC targeting arm (which is executed by arm |
6 tasks
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.
by using
targetPrefixin front ofghcbinary.The contents of the
bindirectory look like thisand before this patch
XMONAD_GHCpoints to just.../bin/ghc.This is also propagates
targetPrefixviaghcWithPackages.passthruset, to make it consistent with(pkgs.haskellPackages.ghcWithPackages (ps: [])).passthru.targetPrefixwhich is equal to
pkgs.haskellPackages.ghc.passthru.targetPrefix, but missing when any package is added to the list.Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.