linuxPackages.nvidia_x11: aarch64-linux support
* Add aarch64-linux binary packages * add cross-compilation support to open-package Signed-off-by: Mika Tammi <mika.tammi@unikie.com>
This commit is contained in:
parent
10a29e158d
commit
2a6b15d371
3 changed files with 34 additions and 7 deletions
|
@ -27,6 +27,7 @@ rec {
|
||||||
production = generic {
|
production = generic {
|
||||||
version = "525.105.17";
|
version = "525.105.17";
|
||||||
sha256_64bit = "sha256-xjWiGigsm1NIXxnrtkoPS1NqlouU1Nl2KeC8VHpYFCo=";
|
sha256_64bit = "sha256-xjWiGigsm1NIXxnrtkoPS1NqlouU1Nl2KeC8VHpYFCo=";
|
||||||
|
sha256_aarch64 = "sha256-FUbmupHNVab3sM/ShDXPM7pK+5GC2/ri1YW20Hx3vbE=";
|
||||||
openSha256 = "sha256-O3XB8tNLmNkzrYoVyJVEE0IcE772lOdr8qn4rQHIupE=";
|
openSha256 = "sha256-O3XB8tNLmNkzrYoVyJVEE0IcE772lOdr8qn4rQHIupE=";
|
||||||
settingsSha256 = "sha256-KUw31Am9Zfwk5QTs6th8+J3C4oUBacNgb7ZUNeV68W4=";
|
settingsSha256 = "sha256-KUw31Am9Zfwk5QTs6th8+J3C4oUBacNgb7ZUNeV68W4=";
|
||||||
persistencedSha256 = "sha256-jhBtsf9MXrkU/SsBndR1ESGUHhgUWiSH7R75swk3m40=";
|
persistencedSha256 = "sha256-jhBtsf9MXrkU/SsBndR1ESGUHhgUWiSH7R75swk3m40=";
|
||||||
|
@ -37,6 +38,7 @@ rec {
|
||||||
latest = selectHighestVersion production (generic {
|
latest = selectHighestVersion production (generic {
|
||||||
version = "530.41.03";
|
version = "530.41.03";
|
||||||
sha256_64bit = "sha256-riehapaMhVA/XRYd2jQ8FgJhKwJfSu4V+S4uoKy3hLE=";
|
sha256_64bit = "sha256-riehapaMhVA/XRYd2jQ8FgJhKwJfSu4V+S4uoKy3hLE=";
|
||||||
|
sha256_aarch64 = "sha256-uM5zMEO/AO32VmqUOzmc05FFm/lz76jPSSaQmeZUlFo=";
|
||||||
openSha256 = "sha256-etbtw6LMRUcFoZC9EDDRrTDekV8JFRYmkp3idLaMk5g=";
|
openSha256 = "sha256-etbtw6LMRUcFoZC9EDDRrTDekV8JFRYmkp3idLaMk5g=";
|
||||||
settingsSha256 = "sha256-8KB6T9f+gWl8Ni+uOyrJKiiH5mNx9eyfCcW/RjPTQQA=";
|
settingsSha256 = "sha256-8KB6T9f+gWl8Ni+uOyrJKiiH5mNx9eyfCcW/RjPTQQA=";
|
||||||
persistencedSha256 = "sha256-zrstlt/0YVGnsPGUuBbR9ULutywi2wNDVxh7OhJM7tM=";
|
persistencedSha256 = "sha256-zrstlt/0YVGnsPGUuBbR9ULutywi2wNDVxh7OhJM7tM=";
|
||||||
|
@ -45,6 +47,7 @@ rec {
|
||||||
beta = selectHighestVersion latest (generic {
|
beta = selectHighestVersion latest (generic {
|
||||||
version = "530.30.02";
|
version = "530.30.02";
|
||||||
sha256_64bit = "sha256-R/3bvXoiumYZI9vObn9R7sVN9oBQxAbMBJDDv77eeWM=";
|
sha256_64bit = "sha256-R/3bvXoiumYZI9vObn9R7sVN9oBQxAbMBJDDv77eeWM=";
|
||||||
|
sha256_aarch64 = "sha256-/b5Jdow+O7ExXjtXTzDX38qgmBDUYDUl+5zxXvbi1ts=";
|
||||||
openSha256 = "sha256-LCtTyuJ8s8isTBt9HetItLqSjL1GOn0tPUarjuxHpMk=";
|
openSha256 = "sha256-LCtTyuJ8s8isTBt9HetItLqSjL1GOn0tPUarjuxHpMk=";
|
||||||
settingsSha256 = "sha256-6mynLNSaWeiB52HdwZ0EQNyPg+tuat0oEqpZGSb2yQo=";
|
settingsSha256 = "sha256-6mynLNSaWeiB52HdwZ0EQNyPg+tuat0oEqpZGSb2yQo=";
|
||||||
persistencedSha256 = "sha256-h6iq0iD9F41a7s6jWKPTI+oVzgDRIr1Kk97LNH9rg7E=";
|
persistencedSha256 = "sha256-h6iq0iD9F41a7s6jWKPTI+oVzgDRIr1Kk97LNH9rg7E=";
|
||||||
|
@ -71,6 +74,7 @@ rec {
|
||||||
legacy_470 = generic {
|
legacy_470 = generic {
|
||||||
version = "470.161.03";
|
version = "470.161.03";
|
||||||
sha256_64bit = "sha256-Xagqf4x254Hn1/C+e3mNtNNE8mvU+s+avPPHHHH+dkA=";
|
sha256_64bit = "sha256-Xagqf4x254Hn1/C+e3mNtNNE8mvU+s+avPPHHHH+dkA=";
|
||||||
|
sha256_aarch64 = "sha256-Ak+j3CkQNCsclv0X23gP1fx3XPOSEyRkjyK5+GDxhn4=";
|
||||||
settingsSha256 = "sha256-ryUSiI8PsY3knkJLg0k1EmyYW5OWkhuZma/hmXNuojw=";
|
settingsSha256 = "sha256-ryUSiI8PsY3knkJLg0k1EmyYW5OWkhuZma/hmXNuojw=";
|
||||||
persistencedSha256 = "sha256-/2h90Gq9NQd9Q+9eLVE6vrxXmINXxlLcSNOHxKToOEE=";
|
persistencedSha256 = "sha256-/2h90Gq9NQd9Q+9eLVE6vrxXmINXxlLcSNOHxKToOEE=";
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
, url ? null
|
, url ? null
|
||||||
, sha256_32bit ? null
|
, sha256_32bit ? null
|
||||||
, sha256_64bit
|
, sha256_64bit
|
||||||
|
, sha256_aarch64 ? null
|
||||||
, openSha256 ? null
|
, openSha256 ? null
|
||||||
, settingsSha256
|
, settingsSha256
|
||||||
, settingsVersion ? version
|
, settingsVersion ? version
|
||||||
|
@ -28,7 +29,7 @@
|
||||||
libsOnly ? false
|
libsOnly ? false
|
||||||
, # don't include the bundled 32-bit libraries on 64-bit platforms,
|
, # don't include the bundled 32-bit libraries on 64-bit platforms,
|
||||||
# even if it’s in downloaded binary
|
# even if it’s in downloaded binary
|
||||||
disable32Bit ? false
|
disable32Bit ? stdenv.hostPlatform.system == "aarch64-linux"
|
||||||
# 32 bit libs only version of this package
|
# 32 bit libs only version of this package
|
||||||
, lib32 ? null
|
, lib32 ? null
|
||||||
# Whether to extract the GSP firmware
|
# Whether to extract the GSP firmware
|
||||||
|
@ -59,14 +60,28 @@ let
|
||||||
src =
|
src =
|
||||||
if stdenv.hostPlatform.system == "x86_64-linux" then
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = args.url or "https://us.download.nvidia.com/XFree86/Linux-x86_64/${version}/NVIDIA-Linux-x86_64-${version}${pkgSuffix}.run";
|
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"
|
||||||
|
];
|
||||||
sha256 = sha256_64bit;
|
sha256 = sha256_64bit;
|
||||||
}
|
}
|
||||||
else if stdenv.hostPlatform.system == "i686-linux" then
|
else if stdenv.hostPlatform.system == "i686-linux" then
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = args.url or "https://download.nvidia.com/XFree86/Linux-x86/${version}/NVIDIA-Linux-x86-${version}${pkgSuffix}.run";
|
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"
|
||||||
|
];
|
||||||
sha256 = sha256_32bit;
|
sha256 = sha256_32bit;
|
||||||
}
|
}
|
||||||
|
else if stdenv.hostPlatform.system == "aarch64-linux" && sha256_aarch64 != null then
|
||||||
|
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"
|
||||||
|
];
|
||||||
|
sha256 = sha256_aarch64;
|
||||||
|
}
|
||||||
else throw "nvidia-x11 does not support platform ${stdenv.hostPlatform.system}";
|
else throw "nvidia-x11 does not support platform ${stdenv.hostPlatform.system}";
|
||||||
|
|
||||||
patches = if libsOnly then null else patches;
|
patches = if libsOnly then null else patches;
|
||||||
|
@ -126,7 +141,9 @@ let
|
||||||
homepage = "https://www.nvidia.com/object/unix.html";
|
homepage = "https://www.nvidia.com/object/unix.html";
|
||||||
description = "X.org driver and kernel module for NVIDIA graphics cards";
|
description = "X.org driver and kernel module for NVIDIA graphics cards";
|
||||||
license = licenses.unfreeRedistributable;
|
license = licenses.unfreeRedistributable;
|
||||||
platforms = [ "x86_64-linux" ] ++ optionals (!i686bundled) [ "i686-linux" ];
|
platforms = [ "x86_64-linux" ]
|
||||||
|
++ optionals (sha256_32bit != null) [ "i686-linux" ]
|
||||||
|
++ optionals (sha256_aarch64 != null) [ "aarch64-linux" ];
|
||||||
maintainers = with maintainers; [ jonringer kiskae ];
|
maintainers = with maintainers; [ jonringer kiskae ];
|
||||||
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;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
, broken ? false
|
, broken ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation ({
|
||||||
pname = "nvidia-open";
|
pname = "nvidia-open";
|
||||||
version = "${kernel.version}-${nvidia_x11.version}";
|
version = "${kernel.version}-${nvidia_x11.version}";
|
||||||
|
|
||||||
|
@ -24,6 +24,10 @@ stdenv.mkDerivation {
|
||||||
"SYSSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source"
|
"SYSSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source"
|
||||||
"SYSOUT=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
"SYSOUT=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||||
"MODLIB=$(out)/lib/modules/${kernel.modDirVersion}"
|
"MODLIB=$(out)/lib/modules/${kernel.modDirVersion}"
|
||||||
|
{
|
||||||
|
aarch64-linux = "TARGET_ARCH=aarch64";
|
||||||
|
x86_64-linux = "TARGET_ARCH=x86_64";
|
||||||
|
}.${stdenv.hostPlatform.system}
|
||||||
];
|
];
|
||||||
|
|
||||||
installTargets = [ "modules_install" ];
|
installTargets = [ "modules_install" ];
|
||||||
|
@ -33,8 +37,10 @@ stdenv.mkDerivation {
|
||||||
description = "NVIDIA Linux Open GPU Kernel Module";
|
description = "NVIDIA Linux Open GPU Kernel Module";
|
||||||
homepage = "https://github.com/NVIDIA/open-gpu-kernel-modules";
|
homepage = "https://github.com/NVIDIA/open-gpu-kernel-modules";
|
||||||
license = with licenses; [ gpl2Plus mit ];
|
license = with licenses; [ gpl2Plus mit ];
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
||||||
maintainers = with maintainers; [ nickcao ];
|
maintainers = with maintainers; [ nickcao ];
|
||||||
inherit broken;
|
inherit broken;
|
||||||
};
|
};
|
||||||
}
|
} // lib.optionalAttrs stdenv.hostPlatform.isAarch64 {
|
||||||
|
env.NIX_CFLAGS_COMPILE = "-fno-stack-protector";
|
||||||
|
})
|
||||||
|
|
Loading…
Reference in a new issue