nixpkgs/pkgs/development/libraries/openh264/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
884 B
Nix
Raw Normal View History

2022-01-06 15:20:17 +00:00
{ lib, stdenv, fetchFromGitHub, nasm, windows }:
2015-08-26 15:42:13 +00:00
stdenv.mkDerivation rec {
pname = "openh264";
2022-02-12 20:34:56 +00:00
version = "2.2.0";
2015-08-26 15:42:13 +00:00
2017-08-01 00:13:33 +00:00
src = fetchFromGitHub {
owner = "cisco";
repo = pname;
2017-08-01 00:13:33 +00:00
rev = "v${version}";
2022-02-12 20:34:56 +00:00
sha256 = "sha256-l64xP39Uaislqh4D7oSxJiQGhXkklol4LgS9BVPbaGk=";
2015-08-26 15:42:13 +00:00
};
nativeBuildInputs = [ nasm ];
2015-08-26 15:42:13 +00:00
2022-01-06 15:20:17 +00:00
buildInputs = lib.optional stdenv.hostPlatform.isWindows windows.pthreads;
makeFlags = [
"PREFIX=${placeholder "out"}"
"ARCH=${stdenv.hostPlatform.linuxArch}"
2022-01-06 15:20:17 +00:00
] ++ lib.optional stdenv.hostPlatform.isWindows "OS=mingw_nt";
enableParallelBuilding = true;
hardeningDisable = lib.optional stdenv.hostPlatform.isWindows "stackprotector";
2015-08-26 15:42:13 +00:00
meta = with lib; {
2015-08-26 15:42:13 +00:00
description = "A codec library which supports H.264 encoding and decoding";
homepage = "https://www.openh264.org";
license = licenses.bsd2;
platforms = platforms.unix;
2015-08-26 15:42:13 +00:00
};
}