nvidia_x11.mkDriver: use finalAttrs
This allows correct usage of overrideAttrs and also ensures overrides are properly propagated to the packages in passthru. Signed-off-by: Paul Meyer <katexochen0@gmail.com>
This commit is contained in:
parent
8d6ded0aab
commit
2e36163f1c
@ -6,9 +6,9 @@
|
|||||||
sha256_aarch64 ? null,
|
sha256_aarch64 ? null,
|
||||||
openSha256 ? null,
|
openSha256 ? null,
|
||||||
settingsSha256 ? null,
|
settingsSha256 ? null,
|
||||||
settingsVersion ? version,
|
settingsVersion ? null,
|
||||||
persistencedSha256 ? null,
|
persistencedSha256 ? null,
|
||||||
persistencedVersion ? version,
|
persistencedVersion ? null,
|
||||||
fabricmanagerSha256 ? null,
|
fabricmanagerSha256 ? null,
|
||||||
fabricmanagerVersion ? version,
|
fabricmanagerVersion ? version,
|
||||||
useGLVND ? true,
|
useGLVND ? true,
|
||||||
@ -140,8 +140,9 @@ let
|
|||||||
|
|
||||||
[1]: https://www.nvidia.com/content/DriverDownloads/licence.php?lang=us
|
[1]: https://www.nvidia.com/content/DriverDownloads/licence.php?lang=us
|
||||||
'';
|
'';
|
||||||
|
in
|
||||||
|
|
||||||
self = stdenv.mkDerivation {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
name = "nvidia-${if useFabricmanager then "dc" else "x11"}-${version}${nameSuffix}";
|
name = "nvidia-${if useFabricmanager then "dc" else "x11"}-${version}${nameSuffix}";
|
||||||
|
|
||||||
builder = ./builder.sh;
|
builder = ./builder.sh;
|
||||||
@ -271,7 +272,7 @@ let
|
|||||||
hash:
|
hash:
|
||||||
callPackage ./open.nix {
|
callPackage ./open.nix {
|
||||||
inherit hash;
|
inherit hash;
|
||||||
nvidia_x11 = self;
|
nvidia_x11 = finalAttrs.finalPackage;
|
||||||
patches =
|
patches =
|
||||||
(builtins.map (rewritePatch {
|
(builtins.map (rewritePatch {
|
||||||
from = "kernel";
|
from = "kernel";
|
||||||
@ -284,7 +285,7 @@ let
|
|||||||
settings =
|
settings =
|
||||||
if useSettings then
|
if useSettings then
|
||||||
(if settings32Bit then pkgsi686Linux.callPackage else callPackage)
|
(if settings32Bit then pkgsi686Linux.callPackage else callPackage)
|
||||||
(import ./settings.nix self settingsSha256)
|
(import ./settings.nix finalAttrs.finalPackage settingsSha256)
|
||||||
{
|
{
|
||||||
withGtk2 = preferGtk2;
|
withGtk2 = preferGtk2;
|
||||||
withGtk3 = !preferGtk2;
|
withGtk3 = !preferGtk2;
|
||||||
@ -296,7 +297,7 @@ let
|
|||||||
if usePersistenced then
|
if usePersistenced then
|
||||||
lib.mapNullable (
|
lib.mapNullable (
|
||||||
hash:
|
hash:
|
||||||
callPackage (import ./persistenced.nix self hash) {
|
callPackage (import ./persistenced.nix finalAttrs.finalPackage hash) {
|
||||||
fetchFromGitHub = fetchFromGithubOrNvidia;
|
fetchFromGitHub = fetchFromGithubOrNvidia;
|
||||||
}
|
}
|
||||||
) persistencedSha256
|
) persistencedSha256
|
||||||
@ -304,10 +305,14 @@ let
|
|||||||
{ };
|
{ };
|
||||||
fabricmanager =
|
fabricmanager =
|
||||||
if useFabricmanager then
|
if useFabricmanager then
|
||||||
lib.mapNullable (hash: callPackage (import ./fabricmanager.nix self hash) { }) fabricmanagerSha256
|
lib.mapNullable (
|
||||||
|
hash: callPackage (import ./fabricmanager.nix finalAttrs.finalPackage hash) { }
|
||||||
|
) fabricmanagerSha256
|
||||||
else
|
else
|
||||||
{ };
|
{ };
|
||||||
inherit persistencedVersion settingsVersion;
|
settingsVersion = if settingsVersion != null then settingsVersion else finalAttrs.version;
|
||||||
|
persistencedVersion =
|
||||||
|
if persistencedVersion != null then persistencedVersion else finalAttrs.version;
|
||||||
compressFirmware = false;
|
compressFirmware = false;
|
||||||
ibtSupport = ibtSupport || (lib.versionAtLeast version "530");
|
ibtSupport = ibtSupport || (lib.versionAtLeast version "530");
|
||||||
}
|
}
|
||||||
@ -332,7 +337,4 @@ let
|
|||||||
priority = 4; # resolves collision with xorg-server's "lib/xorg/modules/extensions/libglx.so"
|
priority = 4; # resolves collision with xorg-server's "lib/xorg/modules/extensions/libglx.so"
|
||||||
inherit broken;
|
inherit broken;
|
||||||
};
|
};
|
||||||
};
|
})
|
||||||
|
|
||||||
in
|
|
||||||
self
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user