Merge pull request #231366 from simonrw/shaka-packager

shaka-packager: init at 2.6.1

authored by Pol Dellaiera and committed by GitHub a285b00d e69ddc18

+64
+62
pkgs/applications/video/shaka-packager/default.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchurl 4 + , runCommand 5 + , shaka-packager 6 + }: 7 + 8 + let 9 + sources = { 10 + "x86_64-linux" = { 11 + filename = "packager-linux-x64"; 12 + hash = "sha256-MoMX6PEtvPmloXJwRpnC2lHlT+tozsV4dmbCqweyyI0="; 13 + }; 14 + aarch64-linux = { 15 + filename = "packager-linux-arm64"; 16 + hash = "sha256-6+7SfnwVRsqFwI7/1F7yqVtkJVIoOFUmhoGU3P6gdQ0="; 17 + }; 18 + x86_64-darwin = { 19 + filename = "packager-osx-x64"; 20 + hash = "sha256-fFBtOp/Zb37LP7TWAEB0yp0xM88cMT9QS59EwW4MrAY="; 21 + }; 22 + }; 23 + 24 + source = sources."${stdenv.hostPlatform.system}" 25 + or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); 26 + in 27 + stdenv.mkDerivation (finalAttrs: { 28 + pname = "shaka-packager"; 29 + version = "2.6.1"; 30 + 31 + src = fetchurl { 32 + url = "https://github.com/shaka-project/shaka-packager/releases/download/v${finalAttrs.version}/${source.filename}"; 33 + inherit (source) hash; 34 + }; 35 + 36 + dontUnpack = true; 37 + sourceRoot = "."; 38 + 39 + installPhase = '' 40 + runHook preInstall 41 + 42 + install -m755 -D $src $out/bin/packager 43 + 44 + runHook postInstall 45 + ''; 46 + 47 + passthru.tests = { 48 + simple = runCommand "${finalAttrs.pname}-test" { } '' 49 + ${shaka-packager}/bin/packager -version | grep ${finalAttrs.version} > $out 50 + ''; 51 + }; 52 + 53 + meta = { 54 + description = "Media packaging framework for VOD and Live DASH and HLS applications"; 55 + homepage = "https://shaka-project.github.io/shaka-packager/html/"; 56 + license = lib.licenses.bsd3; 57 + mainProgram = "packager"; 58 + maintainers = with lib.maintainers; [ ]; 59 + platforms = builtins.attrNames sources; 60 + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 61 + }; 62 + })
+2
pkgs/top-level/all-packages.nix
··· 34138 34138 inherit lua; 34139 34139 }; 34140 34140 34141 + shaka-packager = callPackage ../applications/video/shaka-packager { }; 34142 + 34141 34143 # Wraps without triggering a rebuild 34142 34144 wrapMpv = callPackage ../applications/video/mpv/wrapper.nix { }; 34143 34145 mpv = wrapMpv mpv-unwrapped { };