!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

577 Members
128 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
18 Mar 2025
@fzakaria:one.ems.hostfzakariato avoid "mass rebuilds" -- it's so fragile. I tried moving things to overlay and too much borked19:16:18
19 Mar 2025
@xokdvium:matrix.orgSergei Zimmerman (xokdvium) changed their display name from xokdvium to Sergei Zimmerman (xokdvium).21:12:18
21 Mar 2025
@domenkozar:matrix.orgDomen Kožar changed their profile picture.11:41:12
24 Mar 2025
@rhelmot:matrix.orgrhelmotI'm having trouble parsing the logic behind hostOffset in setup hooks. Is the idea that if I'm currently running for a package that was brought in as a buildInput it'll be 0 and if it's a nativeBuildInput it'll be 1?01:52:53
@Ericson2314:matrix.orgJohn Ericson-1 for native build input iirc?03:09:34
@Ericson2314:matrix.orgJohn EricsonBut I could forget 03:09:38
26 Mar 2025
@rosssmyth:matrix.org@rosssmyth:matrix.org

Is there an example somewhere of where multilib + crosspkgs is broken? From #380325

What would it take to fix it?

18:57:13
@stephen:crabsin.spacen3tcat joined the room.18:57:22
@stephen:crabsin.spacen3tcat 19:00:25
@stephen:crabsin.spacen3tcat 19:01:16
@stephen:crabsin.spacen3tcat

Hello! I'm new to cross-compiling on NixOS. I want to compile C code for my custom M68k computer.

This is what my flake.nix file currently looks like:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    flake-utils.url = "github:numtide/flake-utils?ref=main";
  };

  outputs =
    inputs:
    inputs.flake-utils.lib.eachDefaultSystem (
      system:
      let
        pkgs = inputs.nixpkgs.legacyPackages.${system};
      in
        {
          devShells.default = pkgs.mkShell {
            packages = (
              with pkgs; [
                minipro
                gnumake
                pkgsCross.m68k.buildPackages.gcc
                xxd
              ]
            );
          };
        }
    );
}

I think I want to remove the pkgsCross.m68k line and add in crossSystem pointing at this patch from K900: https://github.com/K900/nixpkgs/commit/e8d4e76093cd396805e76c908734a351cc6d1f39
But I'm not really clear on what I'm actually doing (plus I want my other packages to not be cross-compiled as I want to run them on my x86 box)

19:04:42
@k900:0upti.meK900Easiest is probably to just cherry-pick that patch into your own nixpkgs fork19:06:20
@k900:0upti.meK900And then it should work19:06:25

Show newer messages


Back to Room ListRoom Version: 6