32 lines
753 B
Nix
32 lines
753 B
Nix
{
|
|
cmake,
|
|
lib,
|
|
stdenv,
|
|
pkg-config,
|
|
ffmpeg_7,
|
|
fetchFromGitHub,
|
|
}: let
|
|
version = "2.7.1";
|
|
sha256 = "sha256-PAM+q411VoHK+S6sd+/E2m0ZaJ/+Vi/hG/A+sAgBNA8=";
|
|
in
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "avcpp";
|
|
inherit version;
|
|
src = fetchFromGitHub {
|
|
owner = "h4tr3d";
|
|
repo = "avcpp";
|
|
tag = "v${version}";
|
|
inherit sha256;
|
|
};
|
|
patches = [
|
|
./0001-fix-build-use-absolute-install-directories.patch
|
|
];
|
|
nativeBuildInputs = [cmake pkg-config];
|
|
propagatedBuildInputs = [ffmpeg_7];
|
|
cmakeFlags = [
|
|
(lib.cmakeBool "BUILD_TESTING" finalAttrs.doCheck)
|
|
(lib.cmakeBool "AVCPP_NOT_SUBPROJECT" true)
|
|
];
|
|
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
|
})
|