some overrideDerivation cleanups#41732
Conversation
|
FWIW: https://github.com/NixOS/nixpkgs/pull/41165/files#r193124185 but I don't know why. |
|
Maybe he meant both overrideAttrs and overrideDerivation? No idea, but I won't let it worry me without an explanation :) The docs certainly favor overrideAttrs: https://nixos.org/nixpkgs/manual/#sec-pkg-overrideDerivation |
|
Yes, I believe this warning in the linked manual chapter applies to both:
|
There was a problem hiding this comment.
It should be possible to not introduce overrideAttrs here:
luajit_2_0 = generic {
version = "2.0.5";
isStable = true;
sha256 = "0yg9q4q6v028bgh85317ykc9whgxgysp76qzaqgq55y6jy11yjw7";
meta = meta // {
platforms = lib.filter (p: p != "aarch64-linux") meta.platforms;
};
generic = { ..., meta ? meta }:
stdenv.mkDerivation rec {
inherit name version src meta;
....
;
overrideAttrs doesn't make this generative stuff cleaner IMO.
There was a problem hiding this comment.
I agree. @infinisil can you adjust it as shown by @danbst?
|
I see no harm in replacing |
There was a problem hiding this comment.
I agree. @infinisil can you adjust it as shown by @danbst?
These four top-level packages were the only ones that didn't have the meta.position attribute automagically set. This commit fixes this.
fe55ce0 to
02f11bc
Compare
|
Fixed that, but I couldn't use |
|
oh right, forgot func args are implicilty |
|
|
| enableParallelBuilding = false; | ||
| }) // { | ||
|
|
||
| meta = with stdenv.lib; { |
There was a problem hiding this comment.
I don't think meta works with overrideAttrs. Can you confirm that the meta is still being applied? I thought you still had to do a union like with overrideDerivation.
There was a problem hiding this comment.
Does indeed work, the main reason I'm doing this PR is to have meta.position available. All other meta attributes work as well.
These four top-level packages were the only ones that didn't have the
meta.position attribute automagically set. This commit fixes this.
Motivation for this change
Things done
sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)