!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

561 Members
121 Servers

Load older messages


SenderMessageTime
11 Jul 2021
@ius:nltrix.netius It seems to run configure with a correct --host, but then run it again with CC set to the build cc, then make afterwards obviously results in wrong output 13:51:03
12 Jul 2021
@rick:matrix.ciphernetics.nlRick (Mindavi) joined the room.08:17:49
@rick:matrix.ciphernetics.nlRick (Mindavi)Hey! Just found out there's a room for cross-compilation :)08:19:23
@domenkozar:matrix.orgDomen Kožar ius: nice, see https://github.com/NixOS/patchelf/issues/283 12:25:04
@sternenseemann:systemli.orgsterni (he/him) Domen Kožar: btw we can have fork()ing binaries with binfmt_misc in user space however the executable formats need to be registered via /proc first, so this is inherently impure, sadly 13:44:14
@domenkozar:matrix.orgDomen Kožar sterni (he/him): does that require sudo? 13:44:56
@sternenseemann:systemli.orgsterni (he/him)yes13:50:51
@sternenseemann:systemli.orgsterni (he/him)https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html13:50:52
13 Jul 2021
@siraben:matrix.orgsiraben
In reply to @rick:matrix.ciphernetics.nl
Hey! Just found out there's a room for cross-compilation :)
it's awesome 😎
01:38:10
15 Jul 2021
@piegames:matrix.orgpiegames How can I get a pkgs.pkgsCross.myCustomSystem? Where is pkgsCross defined? 10:00:42
@sternenseemann:systemli.orgsterni (he/him) piegames: it populates the cross set with the attributes defined in lib/systems/examples.nix 10:34:41
@piegames:matrix.orgpiegames sterni (he/him): Yeah but what if it's not on the list? 11:11:03
@sternenseemann:systemli.orgsterni (he/him)

since you don't have access to nixpkgsFun it is a bit more cumbersome to emulate, something like this should work:

self: super: {
  pkgsCross = super.pkgsCross // {
    mySystem = import super.path (super.config // {
      crossSystem = mySystemDefinition;
    });
  };
}
11:19:40
@sternenseemann:systemli.orgsterni (he/him)not sure usually you don't need the pkgsCross attribute desparately since it is the same as passing stuff to the crossSystem argument of nixpkgs11:21:54
@sternenseemann:systemli.orgsterni (he/him)it's just for convenience, really11:21:59
@piegames:matrix.orgpiegamesI see thank you11:31:51
@piegames:matrix.orgpiegamesWell, it has the disadvantage of having to import nixpkgs twice, since I need some native packages too11:32:12
@sternenseemann:systemli.orgsterni (he/him) piegames: you can always use buildPackages for that 11:33:16
@piegames:matrix.orgpiegamesOh interesting, I didn't know that11:35:05
@piegames:matrix.orgpiegames Instead of libc = "newlib";, i need to use libnano. Is this generally possible in nixpkgs? 12:26:50
@sternenseemann:systemli.orgsterni (he/him)libnano is not packaged so no12:27:29
@sternenseemann:systemli.orgsterni (he/him)but it is not impossible in general :)12:27:37
17 Jul 2021
@symphorien:xlumurb.eusymphorien this PR is probably worth mentionning here: https://github.com/NixOS/nixpkgs/issues/130349 14:01:52
@siraben:matrix.orgsirabenThat seems like a good idea, it's recurring pattern in Nixpkgs and I sometimes have to second-guess what to compare.15:27:02
@symphorien:xlumurb.eusymphorienIt used to exist and was removed so I'd like yo hear why 😃15:57:42
@symphorien:xlumurb.eusymphorienI think there was stdenv.isCross17:23:11
@rick:matrix.ciphernetics.nlRick (Mindavi)
In reply to @symphorien:xlumurb.eu
It used to exist and was removed so I'd like yo hear why 😃
John has a good point
17:24:49
@symphorien:xlumurb.eusymphorienOh that's the reason17:27:00
@rick:matrix.ciphernetics.nlRick (Mindavi)In short: there's no one-size-fits-all solution, and being explicit is better17:41:14
@sternenseemann:systemli.orgsterni (he/him)sometimes you'd need to check targetPlatform equality for example20:53:55

There are no newer messages yet.


Back to Room ListRoom Version: 6