| 17 Mar 2025 |
GGG | Most likely yes | 23:19:12 |
Whovian9369 | That's a little frustrating, damn. Thanks! | 23:19:37 |
GGG | could probably temporarily solve it by doing touch ~/.netrc | 23:19:56 |
Corngood | That'll work if you call `nuget-to-json` directly, but not for `fetch-deps` | 23:20:34 |
GGG | oh? | 23:20:40 |
Whovian9369 | Oh it depends on the local $HOME/.netrc (or is it the one in $TMPDIR/home)? | 23:21:42 |
Corngood | Yeah, it creates a temporary $HOME I'm pretty sure. | 23:21:59 |
Corngood | Cherry picking the fix is probably easiest for fetch-deps
https://github.com/NixOS/nixpkgs/pull/389338/commits/7a36c0ef0b08e07afec4f5300956941db2945efa | 23:22:42 |
Whovian9369 | 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 | 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 | 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 |
GGG | interesting, however considering something | 23:31:37 |
GGG | this still breaks the use case for people using .netrc files | 23:31:44 |
GGG | the temp home dir | 23:31:51 |
Whovian9369 | Willing to please elaborate? | 23:32:52 |
GGG | oh no, this is a whole separate issue, don't even worry about it | 23:33:05 |
GGG | 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 |
GGG | but it's not related to your fix at all, it's a problem that already was in there to begin with | 23:33:49 |
Whovian9369 | Ah okay, thanks! | 23:33:56 |
Matt 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 |
GGG | no idea, but that's probably another issue we have to open and then consider how to fix. | 23:38:06 |
GGG | and I wouldn't even copy it, I'd just straight up link it to the temporary home if possible | 23:38:21 |
Matt Sturgeon | yeah copy/symlink/whatever | 23:38:56 |
GGG | but yeah, that would be the solution most likely | 23:39:08 |
GGG | if we cannot find a way to not use an entire $HOME dir | 23:39:20 |
Corngood | Don't we already do something like that to leak the nuget http cache? Could probably do the same thing. | 23:59:12 |
GGG | we do? | 23:59:23 |
| 18 Mar 2025 |
Corngood | I thought so. I can check when I'm back online. | 00:00:03 |
GGG | I'll try to find out when I have free time to try to save you time, but I can't guarantee that | 00:00:24 |
Matt Sturgeon | You do something with the NUGET_HTTP_CACHE_PATH variable in the add-nuget-deps wrapper | 13:22:42 |