mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-17 06:06:13 +03:00
shaka-packager: init at 2.6.1
This commit is contained in:
parent
0c556fceb8
commit
6aaaf8a00c
62
pkgs/applications/video/shaka-packager/default.nix
Normal file
62
pkgs/applications/video/shaka-packager/default.nix
Normal file
@ -0,0 +1,62 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, runCommand
|
||||
, shaka-packager
|
||||
}:
|
||||
|
||||
let
|
||||
sources = {
|
||||
"x86_64-linux" = {
|
||||
filename = "packager-linux-x64";
|
||||
hash = "sha256-MoMX6PEtvPmloXJwRpnC2lHlT+tozsV4dmbCqweyyI0=";
|
||||
};
|
||||
aarch64-linux = {
|
||||
filename = "packager-linux-arm64";
|
||||
hash = "sha256-6+7SfnwVRsqFwI7/1F7yqVtkJVIoOFUmhoGU3P6gdQ0=";
|
||||
};
|
||||
x86_64-darwin = {
|
||||
filename = "packager-osx-x64";
|
||||
hash = "sha256-fFBtOp/Zb37LP7TWAEB0yp0xM88cMT9QS59EwW4MrAY=";
|
||||
};
|
||||
};
|
||||
|
||||
source = sources."${stdenv.hostPlatform.system}"
|
||||
or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "shaka-packager";
|
||||
version = "2.6.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/shaka-project/shaka-packager/releases/download/v${finalAttrs.version}/${source.filename}";
|
||||
inherit (source) hash;
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
sourceRoot = ".";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -m755 -D $src $out/bin/packager
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
simple = runCommand "${finalAttrs.pname}-test" { } ''
|
||||
${shaka-packager}/bin/packager -version | grep ${finalAttrs.version} > $out
|
||||
'';
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Media packaging framework for VOD and Live DASH and HLS applications";
|
||||
homepage = "https://shaka-project.github.io/shaka-packager/html/";
|
||||
license = lib.licenses.bsd3;
|
||||
mainProgram = "packager";
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
platforms = builtins.attrNames sources;
|
||||
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||
};
|
||||
})
|
@ -34065,6 +34065,8 @@ with pkgs;
|
||||
inherit lua;
|
||||
};
|
||||
|
||||
shaka-packager = callPackage ../applications/video/shaka-packager { };
|
||||
|
||||
# Wraps without triggering a rebuild
|
||||
wrapMpv = callPackage ../applications/video/mpv/wrapper.nix { };
|
||||
mpv = wrapMpv mpv-unwrapped { };
|
||||
|
Loading…
Reference in New Issue
Block a user