!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

113 Members
23 Servers

Load older messages


SenderMessageTime
14 Dec 2025
@emma:rory.gayEmma [it/its] ./result ./deps.json or whatever 19:37:02
@corngood:corngood.comCorngood

I don't understand what dotnet restore is trying to do though. If it's unable to restore on a read-only tree, why is it blowing up the system?

(though ive also never had the fetch-deps script work without having to explicitly pass the path to the output deps file, because it tries writing into the store by default...)

Yeah, I had to do that too

19:37:03
@emma:rory.gayEmma [it/its]clipboard.png
Download clipboard.png
19:37:23
@emma:rory.gayEmma [it/its]interesting predicament i find myself in lol19:37:28
@x408788:fi.muni.czJan Kvapil The docs are a bit dated in that regard: https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/dotnet.section.md#generating-and-updating-nuget-dependencies-generating-and-updating-nuget-dependencies
They mention $ nuget-to-json out > deps.json to call explicitly.
19:37:44
@corngood:corngood.comCorngoodfor whatever reason you can kill it with SIGINT but not ctrl-c in the terminal...19:37:51
@x408788:fi.muni.czJan Kvapil kill -9 $(pgrep dotnet) once you check there's only a single dotnet running :D 19:38:17
@corngood:corngood.comCorngoodThe docs don't really talk about flakes. You don't need to pass the path if you do an impure eval.19:38:52
@x408788:fi.muni.czJan KvapilHmm19:39:26
@x408788:fi.muni.czJan KvapilCould this be caught by type-check in buildDotnetModule?19:39:48
@emma:rory.gayEmma [it/its] dotnet restore /nix/store/85fkamr6na3xjznqa70hasdzrlxqgbrr-NBitcoin.CppBridge.csproj -p:ContinuousIntegrationBuild=
true -p:Deterministic=true -p:NuGetAudit=false --runtime linux-x64 -p:SelfContained=true
19:39:56
@emma:rory.gayEmma [it/its]oh no i can just kill it in btop lol19:40:47
@emma:rory.gayEmma [it/its]this didnt work for me19:40:52
@emma:rory.gayEmma [it/its]interestingly, i tried running that command by itself and well... it didnt work :D19:41:36
@emma:rory.gayEmma [it/its]oh interesting, it specifically doesnt work if you try to restore the store path?19:42:05
@corngood:corngood.comCorngoodYeah, I was able to run fetch-deps properly after changing it... Very strange19:42:29
@x408788:fi.muni.czJan KvapilThanks a lot. Let's not disclose the amount of time I was banging my head on this.19:43:18
@emma:rory.gayEmma [it/its]oh, i screwd myself over big time19:43:25
@corngood:corngood.comCorngoodPossibly. I'm not sure if it's 100% always a bad idea though. Like maybe you could do an out-of-tree build by setting the bin/obj dirs?19:43:38
@emma:rory.gayEmma [it/its]had to reconnect cause my shell broke, and.... LOL19:43:41
@emma:rory.gayEmma [it/its]clipboard.png
Download clipboard.png
19:43:42
@x408788:fi.muni.czJan KvapilUf19:44:03
@x408788:fi.muni.czJan KvapilWould not be the first time, when Nix filled all my disk spaces and things started to fall apart.. but not on remote 🙈19:45:12
@emma:rory.gayEmma [it/its]okay, i figured out exactly why it freezes like this!19:45:20
@emma:rory.gayEmma [it/its]you'll never guess LOL19:45:30
@emma:rory.gayEmma [it/its]clipboard.png
Download clipboard.png
19:45:47
@emma:rory.gayEmma [it/its](dotnet restore is trying to read the entire nix store, lol)19:46:02
@corngood:corngood.comCorngood

In case it's useful, here's how I debugged it:

nix develop .#modules.nbitcoin.fetch-drv - fetch-drv is the derivation used by fetch-deps, so this gives you a dev shell where genericBuild will do what fetch-deps does before calling nuget-to-json
(set -xe; shopt -s nullglob; genericBuild) - do a build with tracing turned on, so you can see the dotnet restore command where it hangs

19:46:30
@x408788:fi.muni.czJan KvapilIt IS useful!19:47:03
@emma:rory.gayEmma [it/its] i ended up doing an strace -f --trace=%file on the dotnet restore command itself 19:47:22

Show newer messages


Back to Room ListRoom Version: 9