-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
linuxPackages: use pname and version instead of name #365953
base: staging
Are you sure you want to change the base?
Conversation
5d5061e
to
a6c0b54
Compare
@@ -55,7 +55,8 @@ let | |||
]; | |||
in | |||
stdenv.mkDerivation { | |||
name = "broadcom-sta-${version}-${kernel.version}"; |
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.
With kernel modules in particular, it's really useful to have the particular kernel version be part of their name so you can see from the failing derivation itself what kernel version they failed against.
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 we could make it a convention to add the kernel version to the derivation version
.
i.e. version = "1.2.3-${kernel.version}";
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 like that convention, and it's going to be actually true -- the version is a tuple of the package's version and the kernel for which it's intended. Now that #234651 has landed, we could even encode that in a kernel-specific mkDerivation
.
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.
The only major downside of this approach could be if someone wants to use finalAttrs.version
for src.rev/src.tag.
If we had a kernel-specific mkDerivation, we could maybe store a moduleVersion
and kernelVersion
in finalAttrs
though.
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.
If we had a kernel-specific
mkDerivation
, we could maybe store amoduleVersion
andkernelVersion
infinalAttrs
though.
Not only that -- we could use name
to write out the name of the derivation however we wanted, while still requiring the users to use pname
and version
. The default mkDerivation
behavior of name = "${pname}-${version}"
is ours to change!
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.