Nix + dotnet | 124 Members | |
| 24 Servers |
| Sender | Message | Time |
|---|---|---|
| 14 Aug 2023 | ||
| build fails as such: | 03:33:58 | |
| * build fails as such: | 03:34:30 | |
| 03:38:42 | ||
In reply to @yarekt:matrix.orgdon't, i strongly advise you to use this in shellHooks only if you use that globally it will affect everything (and can possibly break anything). also other people won't be able to just run nix-shell and get a working development environment, since they won't have your global variablewhich goes against the reproducibility goals of nix | 07:12:43 | |
| whats the best way to make a deps.nix? nuget-to-nix usually works but misses dependencies for awsm | 07:19:49 | |
| * whats the best way to make a deps.nix? nuget-to-nix usually works but misses dependencies for wasm | 07:20:05 | |
| nuget-to-nix is mostly an internal tool used by the fetch-deps script | 07:41:35 | |
| follow the docs to get a buildDotnetModule derivation working, and then run the fetch-deps script from the derivation attributes, as shown in the docs | 07:42:51 | |
| well i did follow the docs but i needed nuget-to-nix to generate the deps.nix | 07:45:24 | |
| fetch-deps runs nuget-to-nix internally | 07:45:59 | |
| what problem did you run into that you had to run nuget-to-nix? | 07:46:17 | |
| my issue is that its missing a framework dependency | 07:46:22 | |
| i dont remember, its been ages and i stuck with it | 07:46:39 | |
| are you trying to package a .net framework app? | 07:46:56 | |
| no, im building a blazor wasm app | 07:47:11 | |
| oh yeah, the error you posted above right | 07:47:45 | |
| hmm seems like this package is restored differently internally | 07:47:58 | |
i had to explicitly add this line to deps.nix for my project to fix that error: (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.Mono.browser-wasm"; version = "7.0.9"; sha256 = "PHY9n/4/MY3FdnsQWXr/UyByzSxStzcXt11Ys9reN8w="; }) | 07:48:01 | |
| and it’s not being picked up by nuget-to-nix | 07:48:14 | |
| yeah that should fix it for now | 07:48:23 | |
| now im dealing with a NETSDK1084 (no app host available for specific RuntimeIdentifier) | 07:48:32 | |
In reply to @magikarpz:matrix.orgbecause its a framework dep, not a project dep | 07:48:47 | |
| it’ll need to be fixed upstream in nixpkgs | 07:48:55 | |
| i guess so, since it has a package type of DotnetPlatform | 07:49:23 | |
| that can also be because of a missing nuget | 07:49:42 | |
| most of the platform packages are bundled with the dotnet-sdk package in nixpkgs | 07:50:03 | |
| yeah this one is just missing | 07:50:14 | |
| but i guess all the blazor stuff isn’t there, so it has to be added | 07:50:19 | |
| Hmm, with dotnet you usually specify all the dependencies in its <foo>.csproj file, and they get pulled down in a restore step. Does Nix replace that somehow? | 16:39:14 | |
| I suppose it wants to if it needs reproducible builds | 16:39:25 | |