Properly default pkgs-cross
4 unresolved threads
4 unresolved threads
This is one way to fix it, though I'm not sure you intended it to work this way
Edited by Francesco Gazzetta
Merge request reports
Activity
requested review from @supersven
mentioned in merge request !14 (closed)
75 75 }; 76 76 77 77 pkgs = import nixpkgs { inherit system; overlays = [ overlay ]; }; 78 pkgs-cross = if crossTargetPkgs != null then pkgs.pkgsCross.${crossTargetPkgs} else null; 78 pkgs-cross = if crossTargetPkgs != null then crossTargetPkgs else pkgs.pkgsCross.${crossTarget}; Thanks for chiming in and joining my chaos
As you might have guessed, this has grown a bit while getting little attention (besides "works for me/now".)
I think we/you may drop
crossTargetPkgs
and instead write something likechanged this line in version 2 of the diff
BTW, after I missed your message on Matrix, I pasted my answer (and a bit more) to a wiki page: https://gitlab.haskell.org/ghc/ghc/-/wikis/RISCV64/RISCV64-Nix-cross-environment-(hacky)
Maybe, that's helpful?
122 # gmp.out 123 123 glibcLocales 124 ncurses.dev 125 ncurses.out 126 124 perl 127 125 git 128 126 file 129 127 which 130 128 python3 131 129 xorg.lndir # for source distribution generation 130 hlint 131 clang_15 132 gcc 133 lld_15 134 ]) 135 ++ (with pkgs; [ 253 253 packages = _pkgset: [ hsdrv ]; 254 254 nativeBuildInputs = depsTools; 255 255 buildInputs = depsSystem; 256 passthru.pkgs = pkgs; 256 passthru.pkgs = buildPackages; 257 257 258 258 hardeningDisable = [ "fortify" ]; ## Effectuated by cc-wrapper 259 259 # Without this, we see a whole bunch of warnings about LANG, LC_ALL and locales in general. 260 260 # In particular, this makes many tests fail because those warnings show up in test outputs too... 261 261 # The solution is from: https://github.com/NixOS/nix/issues/318#issuecomment-52986702 262 LOCALE_ARCHIVE = if stdenv.isLinux then "${glibcLocales}/lib/locale/locale-archive" else ""; 262 LOCALE_ARCHIVE = if stdenv.isLinux then "${buildPackages.glibcLocales}/lib/locale/locale-archive" else ""; 263 263 264 264 CONFIGURE_ARGS = 265 if crossTargetPkgs == null then 265 if crossTarget == null then with pkgs;
Please register or sign in to reply