| 25 Feb 2025 |
rosssmyth | Ok, the answer is no you cannot do that. | 21:18:23 |
emily | [rust, cargo] is invalid syntax | 21:27:54 |
emily | [rustc cargo] should work. but you probably want rustPlatform.cargo{Setup,Build}Hook? and you probably even just want rustPlatform.buildRustPackage | 21:28:55 |
rosssmyth | yeah sorry | 21:31:40 |
rosssmyth | I had it as rustc | 21:31:44 |
rosssmyth | but I looked at nix-diff and it pulls in the incorrect rustc and cargo | 21:32:01 |
Artturin | Your rustPlatform override only affects that attr | 21:32:35 |
emily | is there a reason you're not just using rustPlatform.buildRustPackage? | 21:32:40 |
rosssmyth | I do use the hooks, but you must supply rustc and cargo in the build inputs otherwise it fails to build. | 21:33:04 |
emily | right. but I mean if you're just building a simple Rust package you don't need to explicitly specify any of that with buildRustPackage. (if it's more elaborate then carry on) | 21:33:45 |
rosssmyth | And I am not using buildRustPackage because my snippet isn't exactly what I have written. I am using finalAttrs a lot which is not compatible with buildRustPackage (yet) | 21:33:54 |
rosssmyth | Once either #354999 or #194475 are merged I shall switch to buildRustPackage | 21:34:58 |
danielbarter | In the past month, a rust cross build in my CI broke: https://github.com/NixOS/nixpkgs/issues/384662.
I don't have a lot of rust experience, but experimenting in nix-shell, it seems like cargo isn't understanding that we are attempting to do a cross build.
Any help would be much appreciated :D
| 23:55:13 |
danielbarter | it could be caused by something up stream, but haven't been able to verify | 23:56:14 |
| 26 Feb 2025 |
emily | maybe related to https://github.com/NixOS/nixpkgs/pull/369424 | 00:09:05 |
Axman6 | This is more a style thing than anything I guess, but if you're developing a project which is intended to build cross compiled packages (using flakes), would you add those a individual packages and use nix build .#foo-aarch64-linux or would you use legacyPackages and use nix build .#legacyPackages.pkgsCross.aarch64-multiplatform.foo? I have a flake which currently does the former, and I need the binaries it produces for specific platforms in another flake, and it feels a bit weird sometimes using packages.bar = pkgs.foo; and sometimes using packages.bar-platform = pkgs.bar.override {foo = foo-flake.packages.${system}.foo-platform;}; (where foo-platform was defined as packages.foo-platform = pkgs.pkgsCross.platform.foo;) | 01:46:40 |
danielbarter | emily: thanks that is indeed the cause | 02:23:43 |
emily | I suggest leaving a comment :) | 02:24:27 |
danielbarter | yep! https://github.com/NixOS/nixpkgs/pull/369424#issuecomment-2683739473 | 02:31:13 |
Artturin | provide an overlay | 14:48:12 |
| lzcunt changed their display name from sananatheskenana to lzcunt. | 18:20:26 |
| cowpuncher1 joined the room. | 19:14:38 |
| 27 Feb 2025 |
| hab25 joined the room. | 17:43:29 |
| 1 Mar 2025 |
| @achnazoor:matrix.org left the room. | 12:44:13 |
| 3 Mar 2025 |
| bendanm joined the room. | 04:43:44 |
| 4 Mar 2025 |
| lassulus changed their profile picture. | 17:48:51 |
| 5 Mar 2025 |
| loudgolem joined the room. | 02:40:28 |
rhelmot | The conclusion of this journey: I got immich to stand up cross compiled from linux to freebsd. This entailed fixing the build for immich itself (node, ffmpeg -> pipewire -> ...), postgres, a postgres plugin which uses a niche build system for postgres rust plugins (pgrx) which claims to not support cross, and redis | 07:36:43 |
rhelmot | and of course, the requisite nixbsd pieces, including nixos containers nixbsd jails now existing | 07:37:26 |
rhelmot | so many pull requests to submit in the coming days... | 07:39:41 |