1 { lib, stdenv, fetchFromGitHub, cmake }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
10 rev = "yaml-cpp-${version}";
11 sha256 = "0ykkxzxcwwiv8l8r697gyqh1nl582krpvi7m7l6b40ijnk4pw30s";
14 # implement https://github.com/jbeder/yaml-cpp/commit/52a1378e48e15d42a0b755af7146394c6eff998c
16 substituteInPlace CMakeLists.txt \
17 --replace 'option(YAML_BUILD_SHARED_LIBS "Build Shared Libraries" OFF)' \
18 'option(YAML_BUILD_SHARED_LIBS "Build yaml-cpp shared library" ''${BUILD_SHARED_LIBS})'
21 nativeBuildInputs = [ cmake ];
23 cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DYAML_CPP_BUILD_TESTS=OFF" ];
26 inherit (src.meta) homepage;
27 description = "A YAML parser and emitter for C++";
28 license = licenses.mit;
29 platforms = platforms.unix;
30 maintainers = with maintainers; [ andir ];