[Backport release-26.11] intel-media-driver: allow disabling unfree code, fix license (#596800)

This commit is contained in:
Sandro
2026-12-03 12:10:35 +00:00
committed by GitHub
4 changed files with 49 additions and 4 deletions

View File

@@ -146,6 +146,20 @@ Modern Intel GPUs use the iHD driver, which can be installed with:
{ hardware.graphics.extraPackages = [ intel-media-driver ]; }
```
Note that this package includes nonfree render kernels by default. If you
prefer, and you're willing to forgo any extra functionality provided by these
render kernels for your hardware, you can install the version with only free
software render kernels. Consult [the upstream
README](https://github.com/intel/media-driver#components-and-features) for
more information on which feature/hardware combinations require unfree render
kernels.
The free version of the iHD driver can be installed with:
```nix
{ hardware.graphics.extraPackages = [ intel-media-driver-free ]; }
```
Older Intel GPUs use the i965 driver, which can be installed with:
```nix

View File

@@ -97,6 +97,15 @@ in
::: {.note}
intel-media-driver supports hardware Broadwell (2014) or newer. Older hardware should use the mostly unmaintained intel-vaapi-driver driver.
:::
::: {.note}
intel-media-driver includes nonfree render kernels by default. If you
prefer, and you're willing to forgo any extra functionality provided by these
render kernels for your hardware, you can install the version with only free
software render kernels, intel-media-driver-free. Consult [the upstream
README](https://github.com/intel/media-driver#components-and-features) for
more information on which feature/hardware combinations require unfree render
kernels.
:::
'';
type = lib.types.listOf lib.types.package;
default = [ ];
@@ -111,6 +120,15 @@ in
::: {.note}
intel-media-driver supports hardware Broadwell (2014) or newer. Older hardware should use the mostly unmaintained intel-vaapi-driver driver.
:::
::: {.note}
intel-media-driver includes nonfree render kernels by default. If you
prefer, and you're willing to forgo any extra functionality provided by these
render kernels for your hardware, you can install the version with only free
software render kernels, intel-media-driver-free. Consult [the upstream
README](https://github.com/intel/media-driver#components-and-features) for
more information on which feature/hardware combinations require unfree render
kernels.
:::
'';
type = lib.types.listOf lib.types.package;
default = [ ];

View File

@@ -9,6 +9,7 @@
libpciaccess,
intel-gmmlib,
libdrm,
enableUnfree ? true,
enableX11 ? stdenv.hostPlatform.isLinux,
libx11,
nix-update-script,
@@ -20,6 +21,9 @@ stdenv.mkDerivation (finalAttrs: {
pname = "intel-media-driver";
version = "26.3.5";
__structuredAttrs = true;
strictDeps = true;
outputs = [
"out"
"dev"
@@ -46,6 +50,7 @@ stdenv.mkDerivation (finalAttrs: {
cmakeFlags = [
"-DINSTALL_DRIVER_SYSCONF=OFF"
"-DLIBVA_DRIVERS_PATH=${placeholder "out"}/lib/dri"
(lib.cmakeBool "ENABLE_NONFREE_KERNELS" enableUnfree)
# Works only on hosts with suitable CPUs.
"-DMEDIA_RUN_TEST_SUITE=OFF"
"-DMEDIA_BUILD_FATAL_WARNINGS=OFF"
@@ -93,10 +98,14 @@ stdenv.mkDerivation (finalAttrs: {
'';
homepage = "https://github.com/intel/media-driver";
changelog = "https://github.com/intel/media-driver/releases/tag/intel-media-${finalAttrs.version}";
license = with lib.licenses; [
bsd3
mit
];
license =
with lib.licenses;
[
bsd3
mit
]
# See upstream README on unfree components; we use this license to keep things working
++ lib.optionals enableUnfree [ unfreeRedistributableFirmware ];
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ SuperSandro2000 ];
};

View File

@@ -5425,6 +5425,10 @@ with pkgs;
callPackages ../development/libraries/science/astronomy/indilib/indi-3rdparty.nix { }
);
intel-media-driver-free = intel-media-driver.override {
enableUnfree = false;
};
ios-cross-compile = callPackage ../development/compilers/ios-cross-compile/9.2.nix { };
iso-flags-png-320x240 = iso-flags.overrideAttrs (oldAttrs: {