-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
treewide: assemble all fetchurlBoot
uses in overrides to fetchurl
#56067
Conversation
… itself The only outside-curl uses of `fetchurlBoot` left are `stdenv` and `apple-source-releases`. The latter one can probably be removed too, but I can't test it. Pros: - Aggregates all behind-the-scenes insanity in a single place. Cons: - At the cost of 10 more derivations (but 0 new outpaths).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work! This definitely looks good to me.
@@ -1,4 +1,4 @@ | |||
{ lib, stdenv, fetchurlBoot, buildPackages | |||
{ lib, stdenv, fetchurl, buildPackages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel this is a degradation in clarity, making it clear this is a super low dependency package. Do you think otherwise?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I see your point, but I think uniformity of package expressions should be preferable to low-level implementation details, and fetchurlBoot
is such an implementation detail.
Thanks!! I've been hoping to see this go for awhile now. |
@oxij You write:
The comment talks only about darwin, but there's also this part about Windows. Why does I'm trying to add some more comments here, so it would be great to know this. |
@oxij You write:
```
# On darwin, libkrb5 needs bootstrap_cmds which would require
# converting many packages to fetchurl_boot to avoid evaluation cycles.
gssSupport = !stdenv.isDarwin && !stdenv.hostPlatform.isWindows;
```
That was introduced in c303047 by @vcunat. (`git log -p -S 'On darwin, libkrb5 needs bootstrap_cmds which would require'`)
The comment talks only about darwin, but there's also this part about Windows.
Why does `hostPlatform.isWindows` also disable it?
I took that from the corresponding line of `pkgs/tools/networking/curl/default.nix` to keep the value of that parameter on Windows.
Now that I think about it, #66506 should probably do
```diff
- # On darwin, libkrb5 needs bootstrap_cmds which would require
- # converting many packages to fetchurl_boot to avoid evaluation cycles.
- gssSupport = !stdenv.isDarwin && !stdenv.hostPlatform.isWindows;
+ gssSupport = !stdenv.isDarwin || old.gssSupport;
```
|
Oops, I meant
```diff
+ gssSupport = !stdenv.isDarwin && old.gssSupport;
```
|
@oxij I think Regarding what you said, so you mean that I should change my fix from #66506 from
to
Is that correct? |
Is that correct?
No, my point was to remove duplicated sub-expressions in two definitions of `gssSupport` but, as you note in #66546, that needs a different semantics for `.override (old: ...)`.
|
@oxij OK. Still, what I suggested there above still is better than what I have now, right? Using
would not force Do you see what I mean? The original forcing was added with the intent to be just for Darwin, so I'm trying to make it just for Darwin. |
What?
This kills top-level
fetchurlBoot
attribute and isolates rest of the uses tostdenv
, normalfetchurl
and one Darwin reference I don't touch because I can't test it.Note that this change is a noop for
nix-env -qaP --out-path
diff.nix-env -qaP --drv-path
diff is huge because everything that depends on curl itself and anything curl itself depends on will evaluate to new derivations. I.e. this changes a lot of .drvs but does zero rebuilds.Stuff referencing
pkgsCross
works as before, so I declare this not breaking anything. Before rebase I was running on top of this for 3 months or so.Why?
fetchurlBoot
got in the way of clean breaking of dependency cycles for mydoCheckByDefault
thingy (#39464), I got pissed and (mostly) killed it.git log
treewide: assemble all
fetchurlBoot
uses in overrides tofetchurl
itselfThe only outside-curl uses of
fetchurlBoot
left arestdenv
and
apple-source-releases
. The latter one can probably be removedtoo, but I can't test it.
Pros:
Cons:
nix-instantiate
environmentnix-env -qaP --out-path
diffs/cc @Ericson2314 @matthewbauer @7c6f434c