Unverified Commit 7bff840f authored by Nick Cao's avatar Nick Cao Committed by GitHub
Browse files

Merge pull request #269262 from Kiskae/nvidia/545.29.06

linuxPackages.nvidia_x11: 545.29.02 -> 545.29.06
parents c6c09736 9c24e11f
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -36,12 +36,12 @@ rec {
  };

  latest = selectHighestVersion production (generic {
    version = "545.29.02";
    sha256_64bit = "sha256-RncPlaSjhvBFUCOzWdXSE3PAfRPCIrWAXyJMdLPKuIU=";
    sha256_aarch64 = "sha256-Y2RDOuDtiIclr06gmLrPDfE5VFmFamXxiIIKtKAewro=";
    openSha256 = "sha256-PukpOBtG5KvZKWYfJHVQO6SuToJUd/rkjpOlEi8pSmk=";
    settingsSha256 = "sha256-zj173HCZJaxAbVV/A2sbJ9IPdT1+3yrwyxD+AQdkSD8=";
    persistencedSha256 = "sha256-mmMi2pfwzI1WYOffMVdD0N1HfbswTGg7o57x9/IiyVU=";
    version = "545.29.06";
    sha256_64bit = "sha256-grxVZ2rdQ0FsFG5wxiTI3GrxbMBMcjhoDFajDgBFsXs=";
    sha256_aarch64 = "sha256-o6ZSjM4gHcotFe+nhFTePPlXm0+RFf64dSIDt+RmeeQ=";
    openSha256 = "sha256-h4CxaU7EYvBYVbbdjiixBhKf096LyatU6/V6CeY9NKE=";
    settingsSha256 = "sha256-YBaKpRQWSdXG8Usev8s3GYHCPqL8PpJeF6gpa2droWY=";
    persistencedSha256 = "sha256-AiYrrOgMagIixu3Ss2rePdoL24CKORFvzgZY3jlNbwM=";

    patchFlags = [ "-p1" "-d" "kernel" ];
    patches = [];
+107 −55
Original line number Diff line number Diff line
@@ -27,8 +27,18 @@
, brokenOpen ? broken
}@args:

{ lib, stdenv, callPackage, pkgs, pkgsi686Linux, fetchurl
, kernel ? null, perl, nukeReferences, which, libarchive
{ lib
, stdenv
, callPackage
, pkgs
, pkgsi686Linux
, fetchurl
, fetchzip
, kernel ? null
, perl
, nukeReferences
, which
, libarchive
, # Whether to build the libraries only (i.e. not the kernel module or
  # nvidia-settings).  Used to support 32-bit binaries on 64-bit
  # Linux.
@@ -42,7 +52,8 @@
  # firmware
, firmware ? openSha256 != null || useFabricmanager
  # Whether the user accepts the NVIDIA Software License
, config, acceptLicense ? config.nvidia.acceptLicense or false
, config
, acceptLicense ? config.nvidia.acceptLicense or false
}:

with lib;
@@ -60,9 +71,18 @@ let
  i686bundled = versionAtLeast version "391" && !disable32Bit;

  libPathFor = pkgs: lib.makeLibraryPath (with pkgs; [
    libdrm xorg.libXext xorg.libX11
    xorg.libXv xorg.libXrandr xorg.libxcb zlib stdenv.cc.cc
    wayland mesa libGL openssl
    libdrm
    xorg.libXext
    xorg.libX11
    xorg.libXv
    xorg.libXrandr
    xorg.libxcb
    zlib
    stdenv.cc.cc
    wayland
    mesa
    libGL
    openssl
    dbus # for nvidia-powerd
  ]);

@@ -94,7 +114,8 @@ let
    src =
      if !acceptLicense && (openSha256 == null) then throwLicense else
      if stdenv.hostPlatform.system == "x86_64-linux" then
        fetchurl {
        fetchurl
          {
            urls = if args ? url then [ args.url ] else [
              "https://us.download.nvidia.com/XFree86/Linux-x86_64/${version}/NVIDIA-Linux-x86_64-${version}${pkgSuffix}.run"
              "https://download.nvidia.com/XFree86/Linux-x86_64/${version}/NVIDIA-Linux-x86_64-${version}${pkgSuffix}.run"
@@ -102,7 +123,8 @@ let
            sha256 = sha256_64bit;
          }
      else if stdenv.hostPlatform.system == "i686-linux" then
        fetchurl {
        fetchurl
          {
            urls = if args ? url then [ args.url ] else [
              "https://us.download.nvidia.com/XFree86/Linux-x86/${version}/NVIDIA-Linux-x86-${version}${pkgSuffix}.run"
              "https://download.nvidia.com/XFree86/Linux-x86/${version}/NVIDIA-Linux-x86-${version}${pkgSuffix}.run"
@@ -110,7 +132,8 @@ let
            sha256 = sha256_32bit;
          }
      else if stdenv.hostPlatform.system == "aarch64-linux" && sha256_aarch64 != null then
        fetchurl {
        fetchurl
          {
            urls = if args ? url then [ args.url ] else [
              "https://us.download.nvidia.com/XFree86/aarch64/${version}/NVIDIA-Linux-aarch64-${version}${pkgSuffix}.run"
              "https://download.nvidia.com/XFree86/Linux-aarch64/${version}/NVIDIA-Linux-aarch64-${version}${pkgSuffix}.run"
@@ -154,21 +177,49 @@ let

    disallowedReferences = optionals (!libsOnly) [ kernel.dev ];

    passthru = {
      open = mapNullable (hash: callPackage ./open.nix {
    passthru =
      let
        fetchFromGithubOrNvidia = { owner, repo, rev, ... }@args:
          let
            args' = builtins.removeAttrs args [ "owner" "repo" "rev" ];
            baseUrl = "https://github.com/${owner}/${repo}";
          in
          fetchzip (args' // {
            urls = [
              "${baseUrl}/archive/${rev}.tar.gz"
              "https://download.nvidia.com/XFree86/${repo}/${repo}-${rev}.tar.bz2"
            ];
            # github and nvidia use different compression algorithms,
            #  use an invalid file extension to force detection.
            extension = "tar.??";
          });
      in
      {
        open = mapNullable
          (hash: callPackage ./open.nix {
            inherit hash;
            nvidia_x11 = self;
            broken = brokenOpen;
      }) openSha256;
      settings = if useSettings then
        (if settings32Bit then pkgsi686Linux.callPackage else callPackage) (import ./settings.nix self settingsSha256) {
          })
          openSha256;
        settings =
          if useSettings then
            (if settings32Bit then pkgsi686Linux.callPackage else callPackage) (import ./settings.nix self settingsSha256)
              {
                withGtk2 = preferGtk2;
                withGtk3 = !preferGtk2;
                fetchFromGitHub = fetchFromGithubOrNvidia;
              } else { };
      persistenced = if usePersistenced then
        mapNullable (hash: callPackage (import ./persistenced.nix self hash) { }) persistencedSha256
        persistenced =
          if usePersistenced then
            mapNullable
              (hash: callPackage (import ./persistenced.nix self hash) {
                fetchFromGitHub = fetchFromGithubOrNvidia;
              })
              persistencedSha256
          else { };
      fabricmanager = if useFabricmanager then
        fabricmanager =
          if useFabricmanager then
            mapNullable (hash: callPackage (import ./fabricmanager.nix self hash) { }) fabricmanagerSha256
          else { };
        inherit persistencedVersion settingsVersion;
@@ -191,4 +242,5 @@ let
    };
  };

in self
in
self
+0 −8
Original line number Diff line number Diff line
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, kernel
, nvidia_x11
, hash
@@ -19,13 +18,6 @@ stdenv.mkDerivation ({
    inherit hash;
  };

  patches = lib.optionals (nvidia_x11.version == "545.29.02")[
    (fetchpatch {
      url = "https://github.com/NVIDIA/open-gpu-kernel-modules/files/13310810/0001-nvkms-initialize-brightnessType-in-_BACKLIGHT_BRIGHT.patch.txt";
      hash = "sha256-9N+DbyT4VmGNTHXWf23PJU4YWZS+0JK7yqkmkpnINPk=";
    })
  ];

  nativeBuildInputs = kernel.moduleBuildDependencies;

  makeFlags = kernel.makeFlags ++ [