2023-01-31 15:22:48 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
}:
|
2021-09-29 11:51:54 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2023-01-31 15:22:48 +00:00
|
|
|
pname = "yaml-cpp";
|
2021-09-29 11:51:54 +00:00
|
|
|
version = "0.3.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jbeder";
|
|
|
|
repo = "yaml-cpp";
|
|
|
|
rev = "release-${version}";
|
2023-01-31 15:22:48 +00:00
|
|
|
hash = "sha256-pmgcULTXhl83+Wc8ZsGebnJ1t0XybHhUEJxDnEZE5x8=";
|
2021-09-29 11:51:54 +00:00
|
|
|
};
|
|
|
|
|
2023-01-31 15:22:48 +00:00
|
|
|
strictDeps = true;
|
2021-09-29 11:51:54 +00:00
|
|
|
|
2023-01-31 15:22:48 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
];
|
2021-09-29 11:51:54 +00:00
|
|
|
|
2023-01-31 15:22:48 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DYAML_CPP_BUILD_TOOLS=${lib.boolToString doCheck}"
|
|
|
|
"-DBUILD_SHARED_LIBS=${lib.boolToString (!stdenv.hostPlatform.isStatic)}"
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
2021-09-29 11:51:54 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A YAML parser and emitter for C++";
|
2023-01-31 15:22:48 +00:00
|
|
|
homepage = "https://github.com/jbeder/yaml-cpp";
|
2021-09-29 11:51:54 +00:00
|
|
|
license = licenses.mit;
|
2023-01-31 15:22:48 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ OPNA2608 ];
|
2021-09-29 11:51:54 +00:00
|
|
|
};
|
|
|
|
}
|