Nix Cross Compiling | 555 Members | |
| 120 Servers |
| Sender | Message | Time |
|---|---|---|
| 15 Jul 2021 | ||
piegames: it populates the cross set with the attributes defined in lib/systems/examples.nix | 10:34:41 | |
| sterni (he/him): Yeah but what if it's not on the list? | 11:11:03 | |
| since you don't have access to nixpkgsFun it is a bit more cumbersome to emulate, something like this should work:
| 11:19:40 | |
| not sure usually you don't need the pkgsCross attribute desparately since it is the same as passing stuff to the crossSystem argument of nixpkgs | 11:21:54 | |
| it's just for convenience, really | 11:21:59 | |
| I see thank you | 11:31:51 | |
| Well, it has the disadvantage of having to import nixpkgs twice, since I need some native packages too | 11:32:12 | |
| piegames: you can always use buildPackages for that | 11:33:16 | |
| Oh interesting, I didn't know that | 11:35:05 | |
Instead of libc = "newlib";, i need to use libnano. Is this generally possible in nixpkgs? | 12:26:50 | |
| libnano is not packaged so no | 12:27:29 | |
| but it is not impossible in general :) | 12:27:37 | |
| 17 Jul 2021 | ||
| this PR is probably worth mentionning here: https://github.com/NixOS/nixpkgs/issues/130349 | 14:01:52 | |
| That seems like a good idea, it's recurring pattern in Nixpkgs and I sometimes have to second-guess what to compare. | 15:27:02 | |
| It used to exist and was removed so I'd like yo hear why 😃 | 15:57:42 | |
| I think there was stdenv.isCross | 17:23:11 | |
In reply to @symphorien:xlumurb.euJohn has a good point | 17:24:49 | |
| Oh that's the reason | 17:27:00 | |
| In short: there's no one-size-fits-all solution, and being explicit is better | 17:41:14 | |
| sometimes you'd need to check targetPlatform equality for example | 20:53:55 | |
| also x86_64 -> i686 is still cross compiling, but you could e. g. run tests | 20:54:18 | |
| so yeah one size does not fit all | 20:54:30 | |
| 18 Jul 2021 | ||
| 20:25:13 | ||
Can somebody explain to me where the non 32 bit version of the mingw headers are? One would assume it's pkgsCross.mingwW64.windows.mingw_w64_headers but that evalutes to /nix/store/m7mvg8ldx7fj0rliz60gjyrzy7rm6ig2-mingw-w64-x86_64-w64-mingw32-6.0.0-headers and throws an #error Only Win32 target is supported! error. | 20:27:15 | |
| Package for reference:
| 20:27:52 | |
| * Package for reference:
| 20:52:35 | |
| 19 Jul 2021 | ||
| You need to take all your packages from pkgCross.ming.... | 05:29:30 | |
| The easiest way is to take callPackage from it like in https://nixos.wiki/wiki/Cross_Compiling | 05:31:46 | |
| thx, will look into that. | 08:18:33 | |
| I ended up with
called via | 15:00:17 | |