!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

120 Members
24 Servers

Load older messages


SenderMessageTime
17 Mar 2025
@gggkiller:matrix.orgGGGMost likely yes23:19:12
@whovian9369:matrix.orgWhovian9369That's a little frustrating, damn. Thanks!23:19:37
@gggkiller:matrix.orgGGG could probably temporarily solve it by doing touch ~/.netrc 23:19:56
@corngood:corngood.comCorngoodThat'll work if you call `nuget-to-json` directly, but not for `fetch-deps`23:20:34
@gggkiller:matrix.orgGGGoh?23:20:40
@whovian9369:matrix.orgWhovian9369 Oh it depends on the local $HOME/.netrc (or is it the one in $TMPDIR/home)? 23:21:42
@corngood:corngood.comCorngoodYeah, it creates a temporary $HOME I'm pretty sure.23:21:59
@corngood:corngood.comCorngoodCherry picking the fix is probably easiest for fetch-deps https://github.com/NixOS/nixpkgs/pull/389338/commits/7a36c0ef0b08e07afec4f5300956941db2945efa23:22:42
@whovian9369:matrix.orgWhovian9369 Yeah but then that requires applying it in the derivation.
What I did is cp fetch-deps fetch-deps.sh && chmod 600 fetch-deps.sh && chmod +x fetch-deps.sh, and added touch "$HOME/.netrc" under where it runs the mkdir.
23:27:01
@whovian9369:matrix.orgWhovian9369 That appears to have worked and let me generate deps.json -- Small/Temporarily manual patch that forces it to work, at least. 23:27:55
@whovian9369:matrix.orgWhovian9369
diff --git a/nix/store/j4lwavhd4spz7bhn7c0bmyczishf1402-yura-2025.01.25-unstable-fetch-deps b/fetch-deps.sh
index f29778f..b7dbff7 100755
--- a/nix/store/j4lwavhd4spz7bhn7c0bmyczishf1402-yura-2025.01.25-unstable-fetch-deps
+++ b/fetch-deps.sh
@@ -16,6 +16,7 @@ export NUGET_HTTP_CACHE_PATH=${NUGET_HTTP_CACHE_PATH-~/.local/share/NuGet/v3-cac

 HOME=$TMPDIR/home
 mkdir "$HOME"
+touch "$HOME/.netrc"

 cd "$TMPDIR"

This seems to be the minimal diff to force it to work afaict

23:29:47
@gggkiller:matrix.orgGGGinteresting, however considering something23:31:37
@gggkiller:matrix.orgGGG this still breaks the use case for people using .netrc files 23:31:44
@gggkiller:matrix.orgGGGthe temp home dir23:31:51
@whovian9369:matrix.orgWhovian9369Willing to please elaborate?23:32:52
@gggkiller:matrix.orgGGGoh no, this is a whole separate issue, don't even worry about it23:33:05
@gggkiller:matrix.orgGGG it's just that some people use .netrc files to connect to private nuget repos, and since we change $HOME in fetch-deps, that entirely breaks that use-case 23:33:28
@gggkiller:matrix.orgGGGbut it's not related to your fix at all, it's a problem that already was in there to begin with23:33:49
@whovian9369:matrix.orgWhovian9369Ah okay, thanks!23:33:56
@mattsturg:matrix.orgMatt Sturgeon So should the script copy ~/.netrc if it exists before it creates the temp home? Does it have to be ~/.netrc or can it also be configured at some other locations (e.g. XDG dirs)? 23:37:40
@gggkiller:matrix.orgGGGno idea, but that's probably another issue we have to open and then consider how to fix.23:38:06
@gggkiller:matrix.orgGGGand I wouldn't even copy it, I'd just straight up link it to the temporary home if possible23:38:21
@mattsturg:matrix.orgMatt Sturgeonyeah copy/symlink/whatever23:38:56
@gggkiller:matrix.orgGGGbut yeah, that would be the solution most likely23:39:08
@gggkiller:matrix.orgGGG if we cannot find a way to not use an entire $HOME dir 23:39:20
@corngood:corngood.comCorngoodDon't we already do something like that to leak the nuget http cache? Could probably do the same thing.23:59:12
@gggkiller:matrix.orgGGGwe do?23:59:23
18 Mar 2025
@corngood:corngood.comCorngoodI thought so. I can check when I'm back online.00:00:03
@gggkiller:matrix.orgGGGI'll try to find out when I have free time to try to save you time, but I can't guarantee that00:00:24
@mattsturg:matrix.orgMatt Sturgeon You do something with the NUGET_HTTP_CACHE_PATH variable in the add-nuget-deps wrapper 13:22:42

Show newer messages


Back to Room ListRoom Version: 9