2021-10-17 02:12:59 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, fetchpatch }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libyaml-cpp";
|
2021-08-18 13:19:15 +00:00
|
|
|
version = "0.7.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jbeder";
|
|
|
|
repo = "yaml-cpp";
|
|
|
|
rev = "yaml-cpp-${version}";
|
2021-08-18 13:19:15 +00:00
|
|
|
sha256 = "sha256-2tFWccifn0c2lU/U1WNg2FHrBohjx8CXMllPJCevaNk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-10-17 02:12:59 +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=";
|
|
|
|
})
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DYAML_CPP_BUILD_TESTS=OFF" ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit (src.meta) homepage;
|
|
|
|
description = "A YAML parser and emitter for C++";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ andir ];
|
|
|
|
};
|
|
|
|
}
|