Cannot use pkgs.fetchgit
(and other fetchers) through proxy #986
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
Feature/S3
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#986
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
I set up global proxy on my NixOS and tried to build a derivation using pkgs.fetchgit in it, but it failed because it was unable to connect to the proxy server.
Steps To Reproduce
networking.proxy.default = "http://127.0.0.1:1081";
and rebuild systempkgs.fetchgit
, e.g.(I know it's incorrect without a hash, but that doesn't matter here)
3.
nix-build
fails with error:Expected behavior
Fetch the repository and tell me the hash is wrong.
nix --version
outputAdditional context
The same derivation builds with official Nix, so it should be a Lix-specific problem, I think.
Using other fetchers, e.g. fetchurl, also fails similarly.
can you retry with
nix.settings.pasta-path = ""
in your config?we didn't turn pasta on by default right?
i suspect this is just dns resolution shenanigans and /etc/resolv.conf. though pasta surely should be necessary to make the resolver unreachable from fod sandbox right? overall, weird.another possibility is a straight up broken entry in resolv.conf.OR is this a busted proxy config? port 1081 is a weird port and I'm really wondering why it's being used.wow oops. very curious what causes that proxy to be unreachable. pasta seems like a good candidate tbh!
We turned Pasta on by default on NixOS unstable, not on NixOS stable.
Pasta is also turned on by default on HEAD builds.
@pennae wrote in #986 (comment):
It seems to build correctly without pasta (i.e. with this line), asking me to correct the hash.
had feared as much. interestingly we cannot reproduce this behavior, when we add a proxy that rejects all connections we instead get
I made a demo config based on my current nixos config, and it encounters the problem in the vm built by
nixos-rebuild build-vm
:https://github.com/inmaldrerah/nixos-config/tree/demo
Log in with user
inme
and passwordpasswd
.alright, that helps a lot!
unfortunately it's a kernel bug. the next kernel updates nixos gets should fix it, until then all you can do is disable pasta.
the most recent crop of stable releases (6.16.6, 6.12.46, 6.6.105, 6.1.151) have the fix, the bug should resolve itself once nixpkgs picks these up.