2023-02-02 18:25:31 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gitUpdater
|
|
|
|
, cmake
|
2024-09-19 14:19:46 +00:00
|
|
|
, static ? stdenv.hostPlatform.isStatic
|
2023-02-02 18:25:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "yaml-cpp";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.8.0";
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jbeder";
|
|
|
|
repo = "yaml-cpp";
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = version;
|
|
|
|
hash = "sha256-J87oS6Az1/vNdyXu3L7KmUGWzU0IAkGrGMUUha+xDXI=";
|
2023-02-02 18:25:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DYAML_CPP_BUILD_TOOLS=false"
|
2024-09-19 14:19:46 +00:00
|
|
|
(lib.cmakeBool "YAML_BUILD_SHARED_LIBS" (!static))
|
2023-02-02 18:25:31 +00:00
|
|
|
"-DINSTALL_GTEST=false"
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
passthru.updateScript = gitUpdater { };
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "YAML parser and emitter for C++";
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://github.com/jbeder/yaml-cpp";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ OPNA2608 ];
|
|
|
|
};
|
|
|
|
}
|