From ab926c541b67726cd94b13118db8a6152ecaa6c3 Mon Sep 17 00:00:00 2001 From: materus Date: Fri, 23 Aug 2024 17:48:23 +0200 Subject: [PATCH] svt-av1-psy: init package --- pkgs/default.nix | 2 +- pkgs/libs/svt-av1-psy.nix | 41 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 pkgs/libs/svt-av1-psy.nix diff --git a/pkgs/default.nix b/pkgs/default.nix index f66042f..08bc339 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -7,7 +7,7 @@ rec { prefixes = callPackage ./libs/amdgpu-pro-libs/prefixes.nix { }; firmware = callPackage ./libs/amdgpu-pro-libs/firmware.nix { }; }; - + svt-av1-psy = callPackage ./libs/svt-av1-psy.nix { }; ffmpeg_7-amf-full = (pkgs.ffmpeg_7-full.overrideAttrs (finalAttrs: previousAttrs: { configureFlags = previousAttrs.configureFlags ++ [ "--enable-amf" ]; buildInputs = previousAttrs.buildInputs ++ [ pkgs.amf-headers ]; })); diff --git a/pkgs/libs/svt-av1-psy.nix b/pkgs/libs/svt-av1-psy.nix new file mode 100644 index 0000000..0d2625b --- /dev/null +++ b/pkgs/libs/svt-av1-psy.nix @@ -0,0 +1,41 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, nasm + +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "svt-av1-psy"; + version = "2.2.0"; + + src = fetchFromGitHub { + owner = "gianni-rosato"; + repo = "svt-av1-psy"; + rev = "v${finalAttrs.version}"; + hash = "sha256-NWEX7KyQbpUrMbDBQaJWindod85cLUeNqwEpaDPtWUw="; + }; + + nativeBuildInputs = [ + cmake + nasm + ]; + + cmakeFlags = [ + "-DSVT_AV1_LTO=ON" + ]; + + meta = with lib; { + homepage = "https://github.com/gianni-rosato/svt-av1-psy"; + description = "The Scalable Video Technology for AV1 (SVT-AV1 Encoder and Decoder) with perceptual enhancements for psychovisually optimal AV1 encoding"; + + longDescription = '' + SVT-AV1-PSY is the Scalable Video Technology for AV1 (SVT-AV1 Encoder and Decoder) with perceptual enhancements for psychovisually optimal AV1 encoding. + The goal is to create the best encoding implementation for perceptual quality with AV1. + ''; + + license = with licenses; [ aom bsd3 ]; + platforms = platforms.unix; + }; +})