nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 62 lines 1.5 kB view raw
1{ 2 fetchurl, 3 lib, 4 squashfsTools, 5 stdenv, 6}: 7 8# This derivation roughly follows the update-ffmpeg script that ships with the official Vivaldi 9# downloads at https://vivaldi.com/download/ 10 11let 12 sources = { 13 x86_64-linux = fetchurl { 14 url = "https://api.snapcraft.io/api/v1/snaps/download/XXzVIXswXKHqlUATPqGCj2w2l7BxosS8_73.snap"; 15 hash = "sha256-YsAYQ/fKlrvu7IbIxLO0oVhWOtZZzUmA00lrU+z/0+s="; 16 }; 17 aarch64-linux = fetchurl { 18 url = "https://api.snapcraft.io/api/v1/snaps/download/XXzVIXswXKHqlUATPqGCj2w2l7BxosS8_74.snap"; 19 hash = "sha256-zwCbaFeVmeHQLEp7nmD8VlEjSY9PqSVt6CdW4wPtw9o="; 20 }; 21 }; 22in 23stdenv.mkDerivation rec { 24 25 pname = "chromium-codecs-ffmpeg-extra"; 26 27 version = "119293"; 28 29 src = sources."${stdenv.hostPlatform.system}"; 30 31 buildInputs = [ squashfsTools ]; 32 33 unpackPhase = '' 34 unsquashfs -dest . $src 35 ''; 36 37 installPhase = '' 38 install -vD chromium-ffmpeg-${version}/chromium-ffmpeg/libffmpeg.so $out/lib/libffmpeg.so 39 ''; 40 41 passthru = { 42 inherit sources; 43 updateScript = ./update.sh; 44 }; 45 46 meta = with lib; { 47 description = "Additional support for proprietary codecs for Vivaldi and other chromium based tools"; 48 homepage = "https://ffmpeg.org/"; 49 sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 50 license = licenses.lgpl21; 51 maintainers = with maintainers; [ 52 betaboon 53 cawilliamson 54 fptje 55 sarahec 56 ]; 57 platforms = [ 58 "x86_64-linux" 59 "aarch64-linux" 60 ]; 61 }; 62}