| 11 Jul 2021 |
sterni (he/him) | getent is a wrapper derivation generated using runCommand, so it doesn't have the pname/version split | 13:37:06 |
ius | Right, if I build it separately I can see it builds a derivation of the mangled version as well as the wrapper. In that case, the issue is in the dependency | 13:38:13 |
ius | ar x /nix/store/y7z59i6l25m46jdqgqxjpbzsq4npd9mb-compat-netbsd-9.1-powerpc-unknown-linux-musl/lib/libnbcompat.a db.lo
# file db.lo
db.lo: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
| 13:42:45 |
ius | Git history tells me it should cross compile, but I don't see how that's supposed to work looking at the source: https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/bsd/netbsd/default.nix#L160
# the build system re-runs `./configure` with `HOST_CC` (which is their
# name for Build CC) as a compiler to make `defs.mk`, which is installed
depsBuildBuild = [ buildPackages.stdenv.cc ] ++ commonDeps;
HOST_CC = "${buildPackages.stdenv.cc.targetPrefix}cc";
| 13:48:40 |
ius | 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 (Mindavi) joined the room. | 08:17:49 |
Rick (Mindavi) | Hey! Just found out there's a room for cross-compilation :) | 08:19:23 |
Domen Kožar | ius: nice, see https://github.com/NixOS/patchelf/issues/283 | 12:25:04 |
sterni (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 |
Domen Kožar | sterni (he/him): does that require sudo? | 13:44:56 |
sterni (he/him) | yes | 13:50:51 |
sterni (he/him) | https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html | 13:50:52 |
| 13 Jul 2021 |
siraben | 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 | How can I get a pkgs.pkgsCross.myCustomSystem? Where is pkgsCross defined? | 10:00:42 |
sterni (he/him) | piegames: it populates the cross set with the attributes defined in lib/systems/examples.nix | 10:34:41 |
piegames | sterni (he/him): Yeah but what if it's not on the list? | 11:11:03 |
sterni (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 |
sterni (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 nixpkgs | 11:21:54 |
sterni (he/him) | it's just for convenience, really | 11:21:59 |
piegames | I see thank you | 11:31:51 |
piegames | Well, it has the disadvantage of having to import nixpkgs twice, since I need some native packages too | 11:32:12 |
sterni (he/him) | piegames: you can always use buildPackages for that | 11:33:16 |
piegames | Oh interesting, I didn't know that | 11:35:05 |
piegames | Instead of libc = "newlib";, i need to use libnano. Is this generally possible in nixpkgs? | 12:26:50 |
sterni (he/him) | libnano is not packaged so no | 12:27:29 |
sterni (he/him) | but it is not impossible in general :) | 12:27:37 |
| 17 Jul 2021 |
symphorien | this PR is probably worth mentionning here: https://github.com/NixOS/nixpkgs/issues/130349 | 14:01:52 |
siraben | 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 |
symphorien | It used to exist and was removed so I'd like yo hear why 😃 | 15:57:42 |
symphorien | I think there was stdenv.isCross | 17:23:11 |