!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

120 Members
23 Servers

Load older messages


SenderMessageTime
23 Dec 2024
@whovian9369:matrix.orgWhovian9369 On prerelease and git I'm only doing --replace-fail '{chash:8}' "${substring 0 8 src.rev}" which I'm pretty confident aren't going to mis-match at all even between updates.
(If those change at all, like if one gets removed, I'm sure that I'll figure it out pretty easily and add it to the extensive file list.)
04:10:32
24 Dec 2024
@6pak:matrix.org6pak GGG replied to your question about buildPackages 00:56:32
@6pak:matrix.org6pakif after reading the link you are still confused, don't worry, I think everyone is00:56:42
@6pak:matrix.org6pakimo the mess comes from the implicit splicing mechanic, it would be much clearer if you were forced to explicitly reference the package set but oh well00:57:54
@gggkiller:matrix.orgGGGHuh, I thought `hostPlatform` was already the machine it's being built on01:00:43
@6pak:matrix.org6pakhostPlatform is the host that will run the package01:01:04
@6pak:matrix.org6pakbuildPlatform is the host that is building the package01:01:17
@6pak:matrix.org6paktargetPlatform is a special thing for target-specific packages, like the GCC compiler01:01:43
@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

Show newer messages


Back to Room ListRoom Version: 9