diff --git a/pkgs/by-name/ed/edid-decode/package.nix b/pkgs/by-name/ed/edid-decode/package.nix deleted file mode 100644 index f5ac1176221ea..0000000000000 --- a/pkgs/by-name/ed/edid-decode/package.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ - lib, - stdenv, - fetchgit, - unstableGitUpdater, -}: - -stdenv.mkDerivation { - pname = "edid-decode"; - version = "0-unstable-2024-04-02"; - - outputs = [ - "out" - "man" - ]; - - src = fetchgit { - url = "https://git.linuxtv.org/edid-decode.git"; - rev = "3d635499e4aca3319f0796ba787213c981c5a770"; - hash = "sha256-bqzO39YM/3h9p37xaGJAw9xERgWOD+4yqO/XQiq/QqM="; - }; - - preBuild = '' - export DESTDIR=$out - export bindir=/bin - export mandir=/share/man - ''; - - enableParallelBuilding = true; - - passthru.updateScript = unstableGitUpdater { }; - - meta = with lib; { - description = "EDID decoder and conformance tester"; - homepage = "https://git.linuxtv.org/edid-decode.git"; - license = with licenses; [ mit ]; - maintainers = with maintainers; [ Madouura ]; - platforms = platforms.all; - mainProgram = "edid-decode"; - }; -} diff --git a/pkgs/by-name/ed/edid-generator/package.nix b/pkgs/by-name/ed/edid-generator/package.nix index fd8735ff4226a..30f74cb253e20 100644 --- a/pkgs/by-name/ed/edid-generator/package.nix +++ b/pkgs/by-name/ed/edid-generator/package.nix @@ -3,8 +3,8 @@ stdenv, fetchFromGitHub, dos2unix, - edid-decode, hexdump, + v4l-utils, zsh, }: @@ -34,8 +34,8 @@ stdenv.mkDerivation { nativeBuildInputs = [ dos2unix - edid-decode hexdump + v4l-utils zsh ]; diff --git a/pkgs/by-name/ga/gamescope/package.nix b/pkgs/by-name/ga/gamescope/package.nix index 0dc0354b37452..795701f89d5c6 100644 --- a/pkgs/by-name/ga/gamescope/package.nix +++ b/pkgs/by-name/ga/gamescope/package.nix @@ -1,7 +1,7 @@ { stdenv, buildPackages, - edid-decode, + v4l-utils, fetchFromGitHub, fetchpatch, meson, @@ -115,7 +115,7 @@ stdenv.mkDerivation (finalAttrs: { # For `libdisplay-info` python3 hwdata - edid-decode + v4l-utils # For OpenVR cmake diff --git a/pkgs/by-name/li/libdisplay-info/package.nix b/pkgs/by-name/li/libdisplay-info/package.nix index 241f09ebc1905..97406754be659 100644 --- a/pkgs/by-name/li/libdisplay-info/package.nix +++ b/pkgs/by-name/li/libdisplay-info/package.nix @@ -7,7 +7,7 @@ ninja, python3, hwdata, - edid-decode, + v4l-utils, }: stdenv.mkDerivation rec { @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { meson pkg-config ninja - edid-decode + v4l-utils hwdata python3 ]; diff --git a/pkgs/os-specific/linux/v4l-utils/default.nix b/pkgs/os-specific/linux/v4l-utils/default.nix index 791cebda3abfc..67f3ad828bf1b 100644 --- a/pkgs/os-specific/linux/v4l-utils/default.nix +++ b/pkgs/os-specific/linux/v4l-utils/default.nix @@ -2,50 +2,60 @@ stdenv, lib, fetchurl, + glibc, + clang, + doxygen, + meson, + ninja, pkg-config, perl, argp-standalone, libjpeg, + json_c, + libbpf, + libelf, udev, udevCheckHook, withUtils ? true, withGUI ? true, alsa-lib, - libX11, + qt5compat, qtbase, libGLU, wrapQtAppsHook, }: -# See libv4l in all-packages.nix for the libs only (overrides alsa, libX11 & QT) +# See libv4l in all-packages.nix for the libs only (overrides alsa, QT) let withQt = withUtils && withGUI; in # we need to use stdenv.mkDerivation in order not to pollute the libv4l’s closure with Qt -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "v4l-utils"; - version = "1.24.1"; + version = "1.30.1"; src = fetchurl { - url = "https://linuxtv.org/downloads/${pname}/${pname}-${version}.tar.bz2"; - hash = "sha256-y7f+imMH9c5TOgXN7XC7k8O6BjlaubbQB+tTt12AX1s="; + url = "https://linuxtv.org/downloads/v4l-utils/v4l-utils-${finalAttrs.version}.tar.xz"; + hash = "sha256-wc9UnC7DzznrXse/FXMTSeYbJqIbXpY5IttCIzO64Zc="; }; - outputs = [ "out" ] ++ lib.optional withUtils "lib" ++ [ "dev" ]; + outputs = + [ "out" ] + ++ lib.optional withUtils "lib" + ++ [ + "doc" + "dev" + ]; - configureFlags = ( - if withUtils then - [ - "--with-localedir=${placeholder "lib"}/share/locale" - "--with-udevdir=${placeholder "out"}/lib/udev" - ] - else - [ - "--disable-v4l-utils" - ] - ); + mesonFlags = [ + (lib.mesonBool "v4l-utils" withUtils) + (lib.mesonEnable "qv4l2" withQt) + (lib.mesonEnable "qvidcap" withQt) + (lib.mesonOption "gconvsysdir" "${glibc.out}/lib/gconv") + (lib.mesonOption "udevdir" "${placeholder "out"}/lib/udev") + ]; postFixup = '' # Create symlink for V4l1 compatibility @@ -53,25 +63,45 @@ stdenv.mkDerivation rec { ''; nativeBuildInputs = [ + clang + doxygen + meson + ninja pkg-config perl udevCheckHook ] ++ lib.optional withQt wrapQtAppsHook; buildInputs = - [ udev ] + [ + json_c + libbpf + libelf + udev + ] ++ lib.optional (!stdenv.hostPlatform.isGnu) argp-standalone ++ lib.optionals withQt [ alsa-lib - libX11 + qt5compat qtbase libGLU ]; + hardeningDisable = [ "zerocallusedregs" ]; + propagatedBuildInputs = [ libjpeg ]; + # these two `substituteInPlace` have been sent upstream as patches + # https://lore.kernel.org/linux-media/867c4d2e-7871-4280-8c89-d4b654597f32@public-files.de/T/ + # they might fail and have to be removed once the patches get accepted postPatch = '' patchShebangs utils/ + substituteInPlace \ + lib/libdvbv5/meson.build \ + --replace-fail "install_dir: 'include/libdvbv5'" "install_dir: get_option('includedir') / 'libdvbv5'" + substituteInPlace \ + meson.build \ + --replace-fail "get_option('datadir') / 'locale'" "get_option('localedir')" ''; enableParallelBuilding = true; @@ -81,12 +111,15 @@ stdenv.mkDerivation rec { meta = with lib; { description = "V4L utils and libv4l, provide common image formats regardless of the v4l device"; homepage = "https://linuxtv.org/projects.php"; - changelog = "https://git.linuxtv.org/v4l-utils.git/plain/ChangeLog?h=v4l-utils-${version}"; + changelog = "https://git.linuxtv.org/v4l-utils.git/plain/ChangeLog?h=v4l-utils-${finalAttrs.version}"; license = with licenses; [ lgpl21Plus gpl2Plus ]; - maintainers = with maintainers; [ codyopel ]; + maintainers = with maintainers; [ + codyopel + yarny + ]; platforms = platforms.linux; }; -} +}) diff --git a/pkgs/tools/system/hw-probe/default.nix b/pkgs/tools/system/hw-probe/default.nix index e0f2b28c4dee6..5dd06cf7fbb8d 100644 --- a/pkgs/tools/system/hw-probe/default.nix +++ b/pkgs/tools/system/hw-probe/default.nix @@ -17,7 +17,6 @@ coreutils, curl, # Preferred to using the Perl HTTP libs - according to hw-probe. dmidecode, - edid-decode, gnugrep, gnutar, hwinfo, @@ -27,6 +26,7 @@ perl, smartmontools, usbutils, + v4l-utils, xz, # Conditionally recommended @@ -83,12 +83,12 @@ stdenv.mkDerivation rec { smartmontools pciutils usbutils - edid-decode iproute2 # (ip) coreutils # (sort) gnugrep curl gnutar + v4l-utils xz kmod # (lsmod) ]; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index f413ccf8a2e2e..de581c0431efc 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -592,6 +592,7 @@ mapAliases { edUnstable = throw "edUnstable was removed; use ed instead"; # Added 2024-07-01 edgedb = throw "edgedb replaced to gel because of change of upstream"; # Added 2025-02-24 edge-runtime = throw "'edge-runtime' was removed as it was unused, unmaintained, likely insecure and failed to build"; # Added 2025-05-18 + edid-decode = v4l-utils; # Added 2025-06-20 eidolon = throw "eidolon was removed as it is unmaintained upstream."; # Added 2025-05-28 eintopf = lauti; # Project was renamed, added 2025-05-01 elasticsearch7Plugins = elasticsearchPlugins; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 741975335fcfa..74a167c932bd9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11515,7 +11515,7 @@ with pkgs; translateManpages = false; }; - v4l-utils = qt5.callPackage ../os-specific/linux/v4l-utils { }; + v4l-utils = qt6.callPackage ../os-specific/linux/v4l-utils { }; windows = callPackages ../os-specific/windows { };