From b4da951ec277047419df3369dd6d16e25971b60e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 31 May 2023 15:02:51 +0200 Subject: [PATCH 1/2] vaapiIntel: add enableGui option, adopt to SuperSandro2000 --- pkgs/development/libraries/vaapi-intel/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/vaapi-intel/default.nix b/pkgs/development/libraries/vaapi-intel/default.nix index 2a9f0cf74032..5622ad158f91 100644 --- a/pkgs/development/libraries/vaapi-intel/default.nix +++ b/pkgs/development/libraries/vaapi-intel/default.nix @@ -1,6 +1,7 @@ { lib, stdenv, fetchFromGitHub, autoreconfHook, gnum4, pkg-config, python3 -, intel-gpu-tools, libdrm, libva, libX11, libGL, wayland, libXext +, intel-gpu-tools, libdrm, libva , enableHybridCodec ? false, vaapi-intel-hybrid +, enableGui ? true, libX11, libGL, wayland, libXext }: stdenv.mkDerivation rec { @@ -22,13 +23,14 @@ stdenv.mkDerivation rec { ''; configureFlags = [ - "--enable-x11" - "--enable-wayland" + (lib.enableFeature enableGui "x11") + (lib.enableFeature enableGui "wayland") ] ++ lib.optional enableHybridCodec "--enable-hybrid-codec"; nativeBuildInputs = [ autoreconfHook gnum4 pkg-config python3 ]; - buildInputs = [ intel-gpu-tools libdrm libva libX11 libXext libGL wayland ] + buildInputs = [ intel-gpu-tools libdrm libva ] + ++ lib.optionals enableGui [ libX11 libXext libGL wayland ] ++ lib.optional enableHybridCodec vaapi-intel-hybrid; enableParallelBuilding = true; @@ -48,6 +50,6 @@ stdenv.mkDerivation rec { backends for each supported hardware vendor. ''; platforms = [ "x86_64-linux" "i686-linux" ]; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ SuperSandro2000 ]; }; } From fdb8f4994a578fa848cc369fce6d15028ab7a459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 31 May 2023 15:04:02 +0200 Subject: [PATCH 2/2] vaapiIntel: rename to intel-vaapi-driver I tripped over this way to often and a package attr matching the pname is way nicer, anyway. --- nixos/doc/manual/configuration/gpu-accel.chapter.md | 2 +- nixos/modules/hardware/opengl.nix | 8 ++++---- .../{vaapi-intel => intel-vaapi-driver}/default.nix | 0 pkgs/development/libraries/libva/default.nix | 4 ++-- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 4 ++-- 6 files changed, 10 insertions(+), 9 deletions(-) rename pkgs/development/libraries/{vaapi-intel => intel-vaapi-driver}/default.nix (100%) diff --git a/nixos/doc/manual/configuration/gpu-accel.chapter.md b/nixos/doc/manual/configuration/gpu-accel.chapter.md index aa41e25e56f3..40878b5da4b5 100644 --- a/nixos/doc/manual/configuration/gpu-accel.chapter.md +++ b/nixos/doc/manual/configuration/gpu-accel.chapter.md @@ -189,7 +189,7 @@ Older Intel GPUs use the i965 driver, which can be installed with: ```nix hardware.opengl.extraPackages = [ - vaapiIntel + intel-vaapi-driver ]; ``` diff --git a/nixos/modules/hardware/opengl.nix b/nixos/modules/hardware/opengl.nix index 9108bcbd1652..0ff018ddc47d 100644 --- a/nixos/modules/hardware/opengl.nix +++ b/nixos/modules/hardware/opengl.nix @@ -87,13 +87,13 @@ in extraPackages = mkOption { type = types.listOf types.package; default = []; - example = literalExpression "with pkgs; [ intel-media-driver intel-ocl vaapiIntel ]"; + example = literalExpression "with pkgs; [ intel-media-driver intel-ocl intel-vaapi-driver ]"; description = lib.mdDoc '' Additional packages to add to OpenGL drivers. This can be used to add OpenCL drivers, VA-API/VDPAU drivers etc. ::: {.note} - intel-media-driver supports hardware Broadwell (2014) or newer. Older hardware should use the mostly unmaintained vaapiIntel driver. + intel-media-driver supports hardware Broadwell (2014) or newer. Older hardware should use the mostly unmaintained intel-vaapi-driver driver. ::: ''; }; @@ -101,13 +101,13 @@ in extraPackages32 = mkOption { type = types.listOf types.package; default = []; - example = literalExpression "with pkgs.pkgsi686Linux; [ intel-media-driver vaapiIntel ]"; + example = literalExpression "with pkgs.pkgsi686Linux; [ intel-media-driver intel-vaapi-driver ]"; description = lib.mdDoc '' Additional packages to add to 32-bit OpenGL drivers on 64-bit systems. Used when {option}`driSupport32Bit` is set. This can be used to add OpenCL drivers, VA-API/VDPAU drivers etc. ::: {.note} - intel-media-driver supports hardware Broadwell (2014) or newer. Older hardware should use the mostly unmaintained vaapiIntel driver. + intel-media-driver supports hardware Broadwell (2014) or newer. Older hardware should use the mostly unmaintained intel-vaapi-driver driver. ::: ''; }; diff --git a/pkgs/development/libraries/vaapi-intel/default.nix b/pkgs/development/libraries/intel-vaapi-driver/default.nix similarity index 100% rename from pkgs/development/libraries/vaapi-intel/default.nix rename to pkgs/development/libraries/intel-vaapi-driver/default.nix diff --git a/pkgs/development/libraries/libva/default.nix b/pkgs/development/libraries/libva/default.nix index d7a7f43e7e80..a271c24d9dab 100644 --- a/pkgs/development/libraries/libva/default.nix +++ b/pkgs/development/libraries/libva/default.nix @@ -7,7 +7,7 @@ , intel-compute-runtime , intel-media-driver , mpv -, vaapiIntel +, intel-vaapi-driver , vlc }: @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { passthru.tests = { # other drivers depending on libva and selected application users. # Please get a confirmation from the maintainer before adding more applications. - inherit intel-compute-runtime intel-media-driver vaapiIntel mpv vlc; + inherit intel-compute-runtime intel-media-driver intel-vaapi-driver mpv vlc; }; meta = with lib; { diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 67538ab89e2e..0e97cdce5e5d 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1712,6 +1712,7 @@ mapAliases ({ v4l_utils = v4l-utils; # Added 2019-08-07 vamp = { vampSDK = vamp-plugin-sdk; }; # Added 2020-03-26 + vaapiIntel = intel-vaapi-driver; # Added 2023-05-31 vapor = throw "vapor was removed because it was unmaintained and upstream service no longer exists"; varnish62 = throw "varnish62 was removed from nixpkgs, because it is unmaintained upstream. Please switch to a different release"; # Added 2021-07-26 varnish63 = throw "varnish63 was removed from nixpkgs, because it is unmaintained upstream. Please switch to a different release"; # Added 2021-07-26 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 90c4544ed927..047268e659b7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20209,8 +20209,8 @@ with pkgs; inherit (pkgsi686Linux) amdvlk intel-media-driver + intel-vaapi-driver mesa - vaapiIntel libvdpau-va-gl vaapiVdpau beignet @@ -24464,7 +24464,7 @@ with pkgs; v8 = darwin.apple_sdk_11_0.callPackage ../development/libraries/v8 { }; - vaapiIntel = callPackage ../development/libraries/vaapi-intel { }; + intel-vaapi-driver = callPackage ../development/libraries/intel-vaapi-driver { }; vaapi-intel-hybrid = callPackage ../development/libraries/vaapi-intel-hybrid { };