2021-09-29 11:51:54 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, fetchpatch }:
|
2013-07-02 20:42:47 +00:00
|
|
|
|
2016-06-20 12:45:56 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "libyaml-cpp";
|
2021-08-14 08:41:12 +00:00
|
|
|
version = "0.7.0";
|
2013-07-02 20:42:47 +00:00
|
|
|
|
2016-06-20 12:45:56 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jbeder";
|
|
|
|
repo = "yaml-cpp";
|
2018-01-30 16:06:15 +00:00
|
|
|
rev = "yaml-cpp-${version}";
|
2021-08-14 08:41:12 +00:00
|
|
|
sha256 = "sha256-2tFWccifn0c2lU/U1WNg2FHrBohjx8CXMllPJCevaNk=";
|
2013-07-02 20:42:47 +00:00
|
|
|
};
|
|
|
|
|
2021-09-29 11:51:54 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/jbeder/yaml-cpp/issues/774
|
|
|
|
# https://github.com/jbeder/yaml-cpp/pull/1037
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/jbeder/yaml-cpp/commit/4f48727b365962e31451cd91027bd797bc7d2ee7.patch";
|
|
|
|
sha256 = "sha256-jarZAh7NgwL3xXzxijDiAQmC/EC2WYfNMkYHEIQBPhM=";
|
|
|
|
})
|
2021-11-02 00:26:12 +00:00
|
|
|
# TODO: Remove with the next release, when https://github.com/jbeder/yaml-cpp/pull/1058 is available
|
|
|
|
(fetchpatch {
|
|
|
|
name = "libyaml-cpp-Fix-pc-paths-for-absolute-GNUInstallDirs.patchj";
|
|
|
|
url = "https://github.com/jbeder/yaml-cpp/commit/328d2d85e833be7cb5a0ab246cc3f5d7e16fc67a.patch";
|
|
|
|
sha256 = "12g5h7lxzd5v16ykay03zww5g28j3k69k228yr3v8fnmyv2spkfl";
|
|
|
|
})
|
2021-09-29 11:51:54 +00:00
|
|
|
];
|
2020-02-29 20:26:43 +00:00
|
|
|
|
2018-01-30 16:06:15 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2013-07-02 20:42:47 +00:00
|
|
|
|
2019-10-27 13:03:25 +00:00
|
|
|
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DYAML_CPP_BUILD_TESTS=OFF" ];
|
2016-09-01 12:12:17 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2016-06-20 12:45:56 +00:00
|
|
|
inherit (src.meta) homepage;
|
2013-07-02 20:42:47 +00:00
|
|
|
description = "A YAML parser and emitter for C++";
|
2014-09-14 23:01:38 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
2022-01-19 23:24:52 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2013-07-02 20:42:47 +00:00
|
|
|
};
|
|
|
|
}
|