Skip to content
Snippets Groups Projects

Properly default pkgs-cross

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

Pipeline #100265 passed

Pipeline passed for 301ab201 on fgaz/cross-compile-riscv64-fix

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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};
  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • 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;
    • Now that pkgs contains the target's dependencies, regardless if the target is the same as the host or not (cross and non-cross), do we still need this if statement? :thinking:

    • Please register or sign in to reply
    Please register or sign in to reply
    Loading