at 23.05-pre 40 lines 1.3 kB view raw
1{ lib, stdenv, fetchFromGitHub, cmake, fetchpatch }: 2 3stdenv.mkDerivation rec { 4 pname = "libyaml-cpp"; 5 version = "0.7.0"; 6 7 src = fetchFromGitHub { 8 owner = "jbeder"; 9 repo = "yaml-cpp"; 10 rev = "yaml-cpp-${version}"; 11 sha256 = "sha256-2tFWccifn0c2lU/U1WNg2FHrBohjx8CXMllPJCevaNk="; 12 }; 13 14 patches = [ 15 # https://github.com/jbeder/yaml-cpp/issues/774 16 # https://github.com/jbeder/yaml-cpp/pull/1037 17 (fetchpatch { 18 url = "https://github.com/jbeder/yaml-cpp/commit/4f48727b365962e31451cd91027bd797bc7d2ee7.patch"; 19 sha256 = "sha256-jarZAh7NgwL3xXzxijDiAQmC/EC2WYfNMkYHEIQBPhM="; 20 }) 21 # TODO: Remove with the next release, when https://github.com/jbeder/yaml-cpp/pull/1058 is available 22 (fetchpatch { 23 name = "libyaml-cpp-Fix-pc-paths-for-absolute-GNUInstallDirs.patchj"; 24 url = "https://github.com/jbeder/yaml-cpp/commit/328d2d85e833be7cb5a0ab246cc3f5d7e16fc67a.patch"; 25 sha256 = "12g5h7lxzd5v16ykay03zww5g28j3k69k228yr3v8fnmyv2spkfl"; 26 }) 27 ]; 28 29 nativeBuildInputs = [ cmake ]; 30 31 cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DYAML_CPP_BUILD_TESTS=OFF" ]; 32 33 meta = with lib; { 34 inherit (src.meta) homepage; 35 description = "A YAML parser and emitter for C++"; 36 license = licenses.mit; 37 platforms = platforms.unix; 38 maintainers = with maintainers; [ ]; 39 }; 40}