2021-01-21 09:00:13 -08:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake }:
|
2013-07-02 13:42:47 -07:00
|
|
|
|
2016-06-20 05:45:56 -07:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "libyaml-cpp";
|
2019-10-08 18:18:28 -07:00
|
|
|
version = "0.6.3";
|
2013-07-02 13:42:47 -07:00
|
|
|
|
2016-06-20 05:45:56 -07:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jbeder";
|
|
|
|
repo = "yaml-cpp";
|
2018-01-30 08:06:15 -08:00
|
|
|
rev = "yaml-cpp-${version}";
|
2019-10-08 18:18:28 -07:00
|
|
|
sha256 = "0ykkxzxcwwiv8l8r697gyqh1nl582krpvi7m7l6b40ijnk4pw30s";
|
2013-07-02 13:42:47 -07:00
|
|
|
};
|
|
|
|
|
2020-02-29 12:26:43 -08:00
|
|
|
# implement https://github.com/jbeder/yaml-cpp/commit/52a1378e48e15d42a0b755af7146394c6eff998c
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace CMakeLists.txt \
|
|
|
|
--replace 'option(YAML_BUILD_SHARED_LIBS "Build Shared Libraries" OFF)' \
|
|
|
|
'option(YAML_BUILD_SHARED_LIBS "Build yaml-cpp shared library" ''${BUILD_SHARED_LIBS})'
|
|
|
|
'';
|
|
|
|
|
2018-01-30 08:06:15 -08:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2013-07-02 13:42:47 -07:00
|
|
|
|
2019-10-27 06:03:25 -07:00
|
|
|
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DYAML_CPP_BUILD_TESTS=OFF" ];
|
2016-09-01 05:12:17 -07:00
|
|
|
|
2021-01-21 09:00:13 -08:00
|
|
|
meta = with lib; {
|
2016-06-20 05:45:56 -07:00
|
|
|
inherit (src.meta) homepage;
|
2013-07-02 13:42:47 -07:00
|
|
|
description = "A YAML parser and emitter for C++";
|
2014-09-14 16:01:38 -07:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
2018-01-30 08:06:15 -08:00
|
|
|
maintainers = with maintainers; [ andir ];
|
2013-07-02 13:42:47 -07:00
|
|
|
};
|
|
|
|
}
|