-
-
Notifications
You must be signed in to change notification settings - Fork 159
[RFC 0192] version pins for the pkgs/by-name structure
#192
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
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Michael Daniels <[email protected]>
|
Related: NixOS/nixpkgs#421201 |
| - Every attrName in the resulting attribute set has to be a valid package | ||
| attribute name. | ||
| - Every attrValue should be the pinned version of the respectice attrName | ||
| package, this is however hard to check I think. | ||
| - Every attrName has to be a functionArg of the `package.nix`. |
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.
Maybe this is out of scope, but can we also pin dependencies that not just differ in their semantic versions like nodejs = nodejs_22, but have other overrides or logic?
Some example pins.nix:
{
darwin,
stdenv,
}@args:
{
stdenv = if args.stdenv.hostPlatform.isDarwin then darwin.bootstrapStdenv else args.stdenv;
}{
luajit,
}@args:
{
luajit = args.luajit.override { enable52Compat = true; };
}This would be useful to keep compatibility with previous overrides of a package when removing by-name overrides.
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 think we lose some of the usefulness if we allow that
also like with version pins we can already do that just in the package.nix with let in
| lists the problem this RFC is trying to solve under "Future work". | ||
|
|
||
| # Unresolved questions | ||
| [unresolved]: #unresolved-questions |
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.
When overriding a package, will it override the the arguments of pins.nix or the arguments of package.nix?
Perhaps it could override package.nix and we could have an overridePins function.
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.
.override {} overrides the package.nix
why would someone need to override the pins?
package.overridePins {
dependency_3 = my-dependency_3;
}would be the same as
package.override {
dependency = my-dependency_3;
}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 think there is an ambiguity here. Overrides relative to callPackage path/to/package.nix {} are not provided at all, because this would break more than help (and also override works relative to a package that is defined, and the package defined does use pins). You can just override all the pinned stuff one-by-one, though, if for some specific package it makes sense.
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.
sorry, i don't understand what you are trying to say
Rendered
Sorry if the RFC text is short, i don't know what else to write. The feature is quite simple.