!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

112 Members
23 Servers

Load older messages


SenderMessageTime
14 Dec 2025
@corngood:corngood.comCorngood
In reply to @emma:rory.gay
doesnt take much to reproduce either: dotnet new blazor-wasm
We should probably just make the test based on this template project. I also haven't figured out the whole workload thing or how we can support it
04:53:26
@emma:rory.gayEmma [it/its]you shouldnt even need the workload06:16:39
@emma:rory.gayEmma [it/its]i dont have the workload, and never had it (and no im not using anything special here)06:16:52
@emma:rory.gayEmma [it/its] dotnet publish -c Release -r browser-wasm 06:17:01
@emma:rory.gayEmma [it/its] as soon as i remove browser-wasm it builds fine 06:17:13
@emma:rory.gayEmma [it/its] * as soon as i remove browser-wasm it builds fine, but fails to restore specifically under nix with the fetch-deps script 06:17:28
@x408788:fi.muni.czJan Kvapil joined the room.16:43:30
@x408788:fi.muni.czJan Kvapil

Hi folks, I can't seem to get the NuGet dependencies working (https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/dotnet.section.md#generating-and-updating-nuget-dependencies-generating-and-updating-nuget-dependencies). Using fetch-deps runs for a loong time and then kills the terminal (afaict) and using the manual dotnet restore.. and then nuget-to-json works, but then buildling the module still gives an error:

> /nix/store/85fkamr6na3xjznqa70hasdzrlxqgbrr-NBitcoin.CppBridge.csproj : error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json.
       > /nix/store/85fkamr6na3xjznqa70hasdzrlxqgbrr-NBitcoin.CppBridge.csproj : error NU1301:   Resource temporarily unavailable (api.nuget.org:443)
       > /nix/store/85fkamr6na3xjznqa70hasdzrlxqgbrr-NBitcoin.CppBridge.csproj : error NU1301:   Resource temporarily unavailable

Anyone experienced something similar?

16:47:23
@x408788:fi.muni.czJan Kvapil I am trying to package this NBitcoin module for bitcoinfuzz: https://github.com/quapka/bitcoinfuzz/blob/build-with-nix/modules/nbitcoin/default.nix 16:51:57
@corngood:corngood.comCorngoodI would try to figure out what's going on with `fetch-deps`. What's the last output you see?17:38:23
@x408788:fi.muni.czJan Kvapil Would be nice to be able to use the lock file generated by the dotnet restore --use-lock-file... that one is almost immediate. 17:43:02
@x408788:fi.muni.czJan Kvapil
fetching dependencies for bitcoinfuzz-nbitcoin
Running phase: unpackPhase
unpacking source archive /nix/store/lqaq6biab3kvs0fx951r91sqwiv1licv-source
source root is source/modules/nbitcoin
Running phase: patchPhase
Running phase: configureNuget
The template "NuGet Config" was created successfully.

Processing post-creation actions...



Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
Executing dotnetConfigureHoo
17:48:30
@corngood:corngood.comCorngood
In reply to @x408788:fi.muni.cz
Would be nice to be able to use the lock file generated by the dotnet restore --use-lock-file... that one is almost immediate.
Is the problem that it's not using the lockfile during the build?
18:30:21
@x408788:fi.muni.czJan KvapilThat one is not in the correct format, not a list. I haven't investigated further.18:37:51
@x408788:fi.muni.czJan Kvapil I am re-trying fetch-deps with dotnet 10, but so far it got "stuck" on the same dotnetConfigureHook. 18:38:32
@emma:rory.gayEmma [it/its]could be taking a while because it has to redownload all dependencies cleanly18:39:41
@x408788:fi.muni.czJan Kvapil Maybe, but that seems to have been already done. At least the very first line was these 36 derivations will be built and it finished rather quickly. 18:40:44
@emma:rory.gayEmma [it/its]fairly certain that's for building the script itself18:41:04
@x408788:fi.muni.czJan KvapilDotnet RAM's usage is peaking around 20+GB.18:42:59
@x408788:fi.muni.czJan Kvapil* Dotnet's RAM usage is peaking around 20+GB.18:43:06
@x408788:fi.muni.czJan KvapilAnd swap also full (there's not much else running).18:43:59
@x408788:fi.muni.czJan Kvapil* And swap also full (there's not much else running other than dotnet).18:44:06
@emma:rory.gayEmma [it/its]sounds like something is going horifically wrong 👀18:44:12
@x408788:fi.muni.czJan KvapilI guess this could explain the fact that it does not end, but get's killed.18:44:45
@emma:rory.gayEmma [it/its] as far as i can tell it just uses nuget-to-json 18:45:58
@x408788:fi.muni.czJan Kvapil https://github.com/NixOS/nixpkgs/blob/4f9edc162689feca1e63212e7d510679258bd12b/pkgs/build-support/dotnet/add-nuget-deps/fetch-deps.sh, there's the genericBuild. 18:48:09
@x408788:fi.muni.czJan Kvapil Which somehow ends up running https://github.com/NixOS/nixpkgs/blob/4f9edc162689feca1e63212e7d510679258bd12b/pkgs/build-support/dotnet/build-dotnet-module/hook/dotnet-hook.sh#L7-L70
Executing dotnetConfigureHook is the last output I get.
18:48:38
@x408788:fi.muni.czJan Kvapil

This is the running dotnet process

dotnetrestore/nix/store/85fkamr6na3xjznqa70hasdzrlxqgbrr-NBitcoin.CppBridge.csproj-p:ContinuousIntegrationBuild=true-p:Deterministic=true-p:NuGetAudit=false--runtimeosx-x64-p:SelfContained=true
18:50:40
@emma:rory.gayEmma [it/its]yeah, seems to be hanging on trying to restore your project18:52:10
@x408788:fi.muni.czJan Kvapil I dunno if the --runtime osx-x64 should be the one. 18:53:17

Show newer messages


Back to Room ListRoom Version: 9