From 8f3f47dd5f2bc0f50983eb02fc5b52944b3fd28a Mon Sep 17 00:00:00 2001 From: Clara Rostock Date: Fri, 19 Jun 2026 00:48:34 +0200 Subject: [PATCH] svt-av1-hdr: init at 4.1.0 --- pkgs/by-name/sv/svt-av1-hdr/package.nix | 82 +++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 pkgs/by-name/sv/svt-av1-hdr/package.nix diff --git a/pkgs/by-name/sv/svt-av1-hdr/package.nix b/pkgs/by-name/sv/svt-av1-hdr/package.nix new file mode 100644 index 000000000000..a644b96da539 --- /dev/null +++ b/pkgs/by-name/sv/svt-av1-hdr/package.nix @@ -0,0 +1,82 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + pkg-config, + yasm, + cpuinfo, + libdovi, + hdr10plus, + nix-update-script, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "svt-av1-hdr"; + version = "4.1.0"; + + src = fetchFromGitHub { + owner = "juliobbv-p"; + repo = "svt-av1-hdr"; + tag = "v${finalAttrs.version}"; + hash = "sha256-n66RPDTfBsPCR/4y8dpU3Au1WZHpkpln899e2+LKxto="; + }; + + cmakeBuildType = "Release"; + + cmakeFlags = + lib.mapAttrsToList + ( + n: v: + lib.cmakeOptionType (builtins.typeOf v) n ( + if builtins.isBool v then lib.boolToString v else toString v + ) + ) + { + LIBDOVI_FOUND = true; + LIBHDR10PLUS_RS_FOUND = true; + }; + + nativeBuildInputs = [ + cmake + pkg-config + ] + ++ lib.optionals stdenv.hostPlatform.isx86_64 [ + yasm + ]; + + buildInputs = [ + libdovi + hdr10plus + ] + ++ lib.optionals stdenv.hostPlatform.isx86_64 [ + cpuinfo + ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + homepage = "https://github.com/juliobbv-p/svt-av1-hdr"; + description = "Scalable Video Technology AV1 Encoder and Decoder"; + + longDescription = '' + SVT-AV1-HDR is the Scalable Video Technology for AV1 (SVT-AV1 Encoder) + with perceptual enhancements for psychovisually optimal SDR and HDR AV1 encoding. + The goal is to create the best encoding implementation for perceptual quality with AV1, + with additional optimizations for HDR encoding and content with film grain. + ''; + + license = with lib.licenses; [ + aom + bsd3 + ]; + platforms = lib.platforms.unix; + maintainers = with lib.maintainers; [ + claraphyll + ]; + mainProgram = "SvtAv1EncApp"; + }; + + strictDeps = true; + __structuredAttrs = true; +})