From fa09b64bc0baaea63ca07a3b4445527d49a493a3 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Sat, 14 Dec 2019 19:18:31 +0100 Subject: [PATCH] rav1e: init at 0.2.0 --- pkgs/tools/video/rav1e/default.nix | 48 ++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 50 insertions(+) create mode 100644 pkgs/tools/video/rav1e/default.nix diff --git a/pkgs/tools/video/rav1e/default.nix b/pkgs/tools/video/rav1e/default.nix new file mode 100644 index 000000000000..1b0fa9f551b8 --- /dev/null +++ b/pkgs/tools/video/rav1e/default.nix @@ -0,0 +1,48 @@ +{ rustPlatform, fetchFromGitHub, fetchurl, stdenv, lib, unzip, nasm }: + +rustPlatform.buildRustPackage rec { + pname = "rav1e"; + version = "0.2.0"; + + src = stdenv.mkDerivation rec { + name = "${pname}-${version}-source"; + + src = fetchFromGitHub { + owner = "xiph"; + repo = "rav1e"; + rev = "v${version}"; + sha256 = "0sij9hwnar27gcwvfcjbhgyrhw99zjv8gr9s9gshqi766p5dy51a"; + }; + cargoLock = fetchurl { + url = "https://github.com/xiph/rav1e/releases/download/v${version}/rav1e-${version}.zip"; + sha256 = "1i48c7mvc9q20d76p2rpxva551249m3p52q2z1g9sj4xzpyyk41m"; + }; + + nativeBuildInputs = [ unzip ]; + + installPhase = '' + mkdir -p $out + cp -R ./* $out/ + unzip ${cargoLock} + cp ./Cargo.lock $out/Cargo.lock + ''; + }; + + cargoSha256 = "1z0xrcq4mx6gpjyqh1csa424sxmx54z3x7ij3w2063h6s2fv9jy3"; + + nativeBuildInputs = [ nasm ]; + + meta = with lib; { + description = "The fastest and safest AV1 encoder"; + longDescription = '' + rav1e is an AV1 video encoder. It is designed to eventually cover all use + cases, though in its current form it is most suitable for cases where + libaom (the reference encoder) is too slow. + Features: https://github.com/xiph/rav1e#features + ''; + inherit (src.src.meta) homepage; + license = licenses.bsd2; + maintainers = [ maintainers.primeos ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b2508dc7214c..1e27b2be2adc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2041,6 +2041,8 @@ in rainloop-community rainloop-standard; + rav1e = callPackage ../tools/video/rav1e { }; + ring-daemon = callPackage ../applications/networking/instant-messengers/ring-daemon { }; riot-desktop = callPackage ../applications/networking/instant-messengers/riot/riot-desktop.nix { };