Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6}: 7 8stdenv.mkDerivation rec { 9 pname = "yaml-cpp"; 10 version = "0.3.0"; 11 12 src = fetchFromGitHub { 13 owner = "jbeder"; 14 repo = "yaml-cpp"; 15 rev = "release-${version}"; 16 hash = "sha256-pmgcULTXhl83+Wc8ZsGebnJ1t0XybHhUEJxDnEZE5x8="; 17 }; 18 19 strictDeps = true; 20 21 nativeBuildInputs = [ 22 cmake 23 ]; 24 25 cmakeFlags = [ 26 "-DYAML_CPP_BUILD_TOOLS=${lib.boolToString doCheck}" 27 "-DBUILD_SHARED_LIBS=${lib.boolToString (!stdenv.hostPlatform.isStatic)}" 28 ]; 29 30 doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; 31 32 meta = with lib; { 33 description = "YAML parser and emitter for C++"; 34 homepage = "https://github.com/jbeder/yaml-cpp"; 35 license = licenses.mit; 36 platforms = platforms.all; 37 maintainers = with maintainers; [ OPNA2608 ]; 38 }; 39}