feat(build): add avcpp deps
This commit is contained in:
31
nix/avcpp.nix
Normal file
31
nix/avcpp.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
cmake,
|
||||
lib,
|
||||
stdenv,
|
||||
pkg-config,
|
||||
ffmpeg_7,
|
||||
fetchFromGitHub,
|
||||
}: let
|
||||
version = "2.7.1";
|
||||
sha256 = "sha256-Vf5DkAX2zXlNd7zsQc5SQfNiKHpasRZpt7ppoLzlig0=";
|
||||
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];
|
||||
buildInputs = [ffmpeg_7];
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "BUILD_TESTING" finalAttrs.doCheck)
|
||||
(lib.cmakeBool "AVCPP_NOT_SUBPROJECT" true)
|
||||
];
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
})
|
||||
Reference in New Issue
Block a user