2022-02-10 20:34:41 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, nasm, windows }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "openh264";
|
2020-06-18 07:06:33 +00:00
|
|
|
version = "2.1.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cisco";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-06-18 07:06:33 +00:00
|
|
|
sha256 = "0ffav46pz3sbj92nipd62z03fibyqgclfq9w8lgr80s6za6zdk5s";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ nasm ];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
buildInputs = lib.optional stdenv.hostPlatform.isWindows windows.pthreads;
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
"ARCH=${stdenv.hostPlatform.linuxArch}"
|
2022-02-10 20:34:41 +00:00
|
|
|
] ++ lib.optional stdenv.hostPlatform.isWindows "OS=mingw_nt";
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
hardeningDisable = lib.optional stdenv.hostPlatform.isWindows "stackprotector";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A codec library which supports H.264 encoding and decoding";
|
|
|
|
homepage = "https://www.openh264.org";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|