at 22.05-pre 896 B view raw
1{ lib, stdenv, fetchFromGitHub, cmake, python2 }: 2 3stdenv.mkDerivation rec { 4 version = "0.6.3"; 5 pname = "docopt.cpp"; 6 7 src = fetchFromGitHub { 8 owner = "docopt"; 9 repo = "docopt.cpp"; 10 rev = "v${version}"; 11 sha256 = "0cz3vv7g5snfbsqcf3q8bmd6kv5qp84gj3avwkn4vl00krw13bl7"; 12 }; 13 14 nativeBuildInputs = [ cmake python2 ]; 15 16 cmakeFlags = ["-DWITH_TESTS=ON"]; 17 18 strictDeps = true; 19 20 doCheck = true; 21 22 postPatch = '' 23 substituteInPlace docopt.pc.in \ 24 --replace "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@" \ 25 "@CMAKE_INSTALL_LIBDIR@" 26 ''; 27 28 checkPhase = "LD_LIBRARY_PATH=$(pwd) python ./run_tests"; 29 30 meta = with lib; { 31 description = "C++11 port of docopt"; 32 homepage = "https://github.com/docopt/docopt.cpp"; 33 license = with licenses; [ mit boost ]; 34 platforms = platforms.all; 35 maintainers = with maintainers; [ knedlsepp ]; 36 }; 37}