!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

127 Members
24 Servers

Load older messages


SenderMessageTime
24 Dec 2024
@6pak:matrix.org6pakbecause you can build a GCC compiler on linux-x64 (buildPlatform) that will run on linux-arm64 (hostPlatform) that compiles binaries for linux-riscv (targetPlatform)01:02:38
@6pak:matrix.org6pakso in most cases hostPlatform == targetPlatform01:02:52
@6pak:matrix.org6pakin nixpkgs I think it's only GCC that uses targetPlatform?01:03:22
@gggkiller:matrix.orgGGGGod, this is so confusing01:03:34
@6pak:matrix.org6pakllvm/clang can compile to multiple targets from single binary just fine01:03:35
@gggkiller:matrix.orgGGGI think I get it now though01:04:11
@gggkiller:matrix.orgGGGBut yeah, most packages just outright don't work with cross from what I'm understanding then01:04:24
@6pak:matrix.org6pak 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:matrix.org6pakwhich is why a lot of build scripts in nixpkgs are broken01:04:42
@6pak:matrix.org6pakbecause people are used to adding a binary to nativeBuildInputs of a setup hook or something and it working01:04:56
@gggkiller:matrix.orgGGGSince I pretty much never see `pkgsBuildHost`/`buildPackages` being used01:05:04
@6pak:matrix.org6pakand then they embed a package into a script literal in the same way and it breaks01:05:07
@6pak:matrix.org6pak most packages don't have a lot of custom logic so they work finel 01:05:45
@6pak:matrix.org6pak * most packages don't have a lot of custom logic so they work fine 01:05:47
@6pak:matrix.org6pakand the mobile nixos[*] project put a lot of effort to make it work01:05:58
@6pak:matrix.org6pakso most native stuff works01:06:01
@gggkiller:matrix.orgGGGIssue is that there's no way to easily specify what should be taken from pkgsBuildHost and pkgsHostTarget01:06:27
@gggkiller:matrix.orgGGGI don't like that it becomes less declarative01:06:49
@gggkiller:matrix.orgGGG`{ buildPackages }` instead of `{ dotnet-sdk_9, makeWrapper, ... }`01:07:40
@gggkiller:matrix.orgGGGBut I guess there's no way around it01:07:51
@gggkiller:matrix.orgGGGThanks for the explanation though, it was something I never really considered01:08:08
@6pak:matrix.org6pak I mean for add-nuget-deps the better solution is to make a fetch-deps.nix 01:11:14
@6pak:matrix.org6pak and do buildPackages.callPackage fetch-deps.nix {} 01:11:24
@6pak:matrix.org6pakthe cross windows stuff in my dnspy pr was just doing whatever works to get it working as a POC01:12:23
@6pak:matrix.org6pak I might tackle it together with sandboxing idk 01:13:04
@6pak:matrix.org6pak GGG: https://github.com/NixOS/nixpkgs/issues/310373 02:16:23
@gggkiller:matrix.orgGGGYes, but there's no difference from what you're doing02:20:23
@gggkiller:matrix.orgGGGI'm saying to use `finalAttrs` instead of `self`02:20:37
@gggkiller:matrix.orgGGGBut good to know, I'll undo a few `rec` to `finalAttrs` I did in my own PR02:20:58
@6pak:matrix.org6paklet self works the same way as rec02:21:13

Show newer messages


Back to Room ListRoom Version: 9