23 stdenv.mkDerivation (finalAttrs: {
24 pname = "shaka-packager";
27 src = fetchFromGitHub {
28 owner = "shaka-project";
29 repo = "shaka-packager";
30 rev = "refs/tags/v${finalAttrs.version}";
31 hash = "sha256-4ZxBE1jpFR93OigAd7xOpUHXSZ5o9keNBJXuS2pNjpo=";
35 # By default, the git commit hash and tag are used as version
36 # and shaka-packager fails to build if these are not available.
37 # This patch makes it possible to pass an external value as version.
38 # The value itself is declared further below in `cmakeFlags`.
39 ./0001-Allow-external-declaration-of-packager-version.patch
40 # Dependencies are vendored as git submodules inside shaka-packager.
41 # We want to reuse the dependencies from nixpkgs instead to avoid unnecessary
42 # build overhead and to ensure they are up to date.
43 # This patch disables the vendored dependencies (by excluding `third-party`),
44 # finds them inside the build environment and aliases them so they can be accessed
45 # without prefixing namespaces.
46 # The last step is necessary to keep the patch size to a minimum, otherwise we'd have
47 # to add the namespace identifiers everywhere a dependency is used.
48 ./0002-Unvendor-dependencies.patch
57 (python3.withPackages (ps: [
58 # As we remove the vendored protobuf in our patch,
59 # we must re-add it to the python package used for
73 # must be the same version as for shaka-packager
80 "-DPACKAGER_VERSION=v${finalAttrs.version}-nixpkgs"
81 # Targets are selected below in ninjaFlags
82 "-DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON"
92 updateScript = nix-update-script { };
93 tests.version = testers.testVersion {
94 package = finalAttrs.finalPackage;
95 version = "v${finalAttrs.version}-nixpkgs-release";
100 description = "Media packaging framework for VOD and Live DASH and HLS applications";
101 homepage = "https://shaka-project.github.io/shaka-packager/html/";
102 changelog = "https://github.com/shaka-project/shaka-packager/releases/tag/v${finalAttrs.version}";
103 license = lib.licenses.bsd3;
104 mainProgram = "packager";
105 maintainers = with lib.maintainers; [ niklaskorz ];
106 platforms = lib.platforms.all;