depot/third_party/nixpkgs/pkgs/by-name/op/openh264/package.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

51 lines
1.1 KiB
Nix

{ lib
, fetchFromGitHub
, gtest
, meson
, nasm
, ninja
, pkg-config
, stdenv
, windows
}:
stdenv.mkDerivation (finalAttrs: {
pname = "openh264";
version = "2.4.1";
src = fetchFromGitHub {
owner = "cisco";
repo = "openh264";
rev = "v${finalAttrs.version}";
hash = "sha256-ai7lcGcQQqpsLGSwHkSs7YAoEfGCIbxdClO6JpGA+MI=";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [
meson
nasm
ninja
pkg-config
];
buildInputs = [
gtest
] ++ lib.optionals stdenv.hostPlatform.isWindows [
windows.pthreads
];
strictDeps = true;
meta = {
homepage = "https://www.openh264.org";
description = "Codec library which supports H.264 encoding and decoding";
changelog = "https://github.com/cisco/openh264/releases/tag/${finalAttrs.src.rev}";
license = with lib.licenses; [ bsd2 ];
maintainers = with lib.maintainers; [ AndersonTorres ];
# See meson.build
platforms = lib.platforms.windows ++ lib.intersectLists
(lib.platforms.x86 ++ lib.platforms.arm ++ lib.platforms.aarch64 ++ lib.platforms.loongarch64)
(lib.platforms.linux ++ lib.platforms.darwin);
};
})