rav1d: init at 1.0.0 (#374549)

authored by

Gaétan Lepage and committed by
GitHub
0577ecba 066ed9a8

+63
+63
pkgs/by-name/ra/rav1d/package.nix
··· 1 + { 2 + lib, 3 + rustPlatform, 4 + fetchFromGitHub, 5 + nasm, 6 + meson, 7 + ninja, 8 + pkg-config, 9 + 10 + nix-update-script, 11 + }: 12 + 13 + rustPlatform.buildRustPackage (finalAttrs: { 14 + pname = "rav1d"; 15 + version = "1.0.0"; 16 + 17 + src = fetchFromGitHub { 18 + owner = "memorysafety"; 19 + repo = "rav1d"; 20 + tag = "v${finalAttrs.version}"; 21 + hash = "sha256-8Moj3v7cxPluzNPmOmGhYuz/Qh48BnBjN7Vt4f8aY2o="; 22 + }; 23 + 24 + cargoHash = "sha256-M0j0zgDqElhG3Jgetjx2sL3rxLrShK0zTMmOXwNxBEI="; 25 + 26 + nativeBuildInputs = [ 27 + nasm 28 + ]; 29 + 30 + # Tests are using meson 31 + # https://github.com/memorysafety/rav1d/tree/v1.0.0?tab=readme-ov-file#running-tests 32 + nativeCheckInputs = [ 33 + meson 34 + ninja 35 + pkg-config 36 + ]; 37 + 38 + checkPhase = 39 + let 40 + cargoTarget = rustPlatform.cargoInstallHook.targetSubdirectory; 41 + in 42 + '' 43 + runHook preCheck 44 + 45 + patchShebangs .github/workflows/test.sh 46 + .github/workflows/test.sh -r target/${cargoTarget}/release/dav1d 47 + 48 + runHook postCheck 49 + ''; 50 + 51 + passthru = { 52 + updateScript = nix-update-script { }; 53 + }; 54 + 55 + meta = { 56 + description = "AV1 cross-platform decoder, Rust port of dav1d"; 57 + homepage = "https://github.com/memorysafety/rav1d"; 58 + changelog = "https://github.com/memorysafety/rav1d/releases/tag/v${finalAttrs.version}"; 59 + license = lib.licenses.bsd2; 60 + maintainers = with lib.maintainers; [ liberodark ]; 61 + mainProgram = "dav1d"; 62 + }; 63 + })