| 24 Dec 2024 |
GGG | But yeah, most packages just outright don't work with cross from what I'm understanding then | 01:04:24 |
6pak | yup and add the fact that nativeBuildInputs/buildInputs silently use a hidden cursed splicing method that "convert" the package to a different platform set | 01:04:30 |
6pak | which is why a lot of build scripts in nixpkgs are broken | 01:04:42 |
6pak | because people are used to adding a binary to nativeBuildInputs of a setup hook or something and it working | 01:04:56 |
GGG | Since I pretty much never see `pkgsBuildHost`/`buildPackages` being used | 01:05:04 |
6pak | and then they embed a package into a script literal in the same way and it breaks | 01:05:07 |
6pak | most packages don't have a lot of custom logic so they work finel | 01:05:45 |
6pak | * most packages don't have a lot of custom logic so they work fine | 01:05:47 |
6pak | and the mobile nixos[*] project put a lot of effort to make it work | 01:05:58 |
6pak | so most native stuff works | 01:06:01 |
GGG | Issue is that there's no way to easily specify what should be taken from pkgsBuildHost and pkgsHostTarget | 01:06:27 |
GGG | I don't like that it becomes less declarative | 01:06:49 |
GGG | `{ buildPackages }` instead of `{ dotnet-sdk_9, makeWrapper, ... }` | 01:07:40 |
GGG | But I guess there's no way around it | 01:07:51 |
GGG | Thanks for the explanation though, it was something I never really considered | 01:08:08 |
6pak | I mean for add-nuget-deps the better solution is to make a fetch-deps.nix | 01:11:14 |
6pak | and do buildPackages.callPackage fetch-deps.nix {} | 01:11:24 |
6pak | the cross windows stuff in my dnspy pr was just doing whatever works to get it working as a POC | 01:12:23 |
6pak | I might tackle it together with sandboxing idk | 01:13:04 |
6pak | GGG: https://github.com/NixOS/nixpkgs/issues/310373 | 02:16:23 |
GGG | Yes, but there's no difference from what you're doing | 02:20:23 |
GGG | I'm saying to use `finalAttrs` instead of `self` | 02:20:37 |
GGG | But good to know, I'll undo a few `rec` to `finalAttrs` I did in my own PR | 02:20:58 |
6pak | let self works the same way as rec | 02:21:13 |
GGG | I see | 02:21:35 |
6pak | https://nix.dev/guides/best-practices.html#recursive-attribute-set-rec | 02:21:41 |
GGG | I myself prefer `rec` over that, but it's personal preference | 02:21:53 |
6pak | yeah and I think I would too in a typed language | 02:22:20 |
6pak | but in nix it's way too easy to make a mistake with it | 02:22:36 |
6pak | and only catch it after 10 minutes of eval+build | 02:22:48 |