2017-03-02 15:03:08 +00:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, python }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-08-13 16:07:27 +00:00
|
|
|
version = "0.6.3";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "docopt.cpp";
|
2017-03-02 15:03:08 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "docopt";
|
|
|
|
repo = "docopt.cpp";
|
|
|
|
rev = "v${version}";
|
2020-08-13 16:07:27 +00:00
|
|
|
sha256 = "0cz3vv7g5snfbsqcf3q8bmd6kv5qp84gj3avwkn4vl00krw13bl7";
|
2017-03-02 15:03:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake python ];
|
|
|
|
|
|
|
|
cmakeFlags = ["-DWITH_TESTS=ON"];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2020-08-13 16:07:27 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace docopt.pc.in \
|
|
|
|
--replace "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@" \
|
|
|
|
"@CMAKE_INSTALL_LIBDIR@"
|
|
|
|
'';
|
|
|
|
|
2017-03-02 15:03:08 +00:00
|
|
|
checkPhase = "LD_LIBRARY_PATH=$(pwd) python ./run_tests";
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "C++11 port of docopt";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/docopt/docopt.cpp";
|
2017-03-02 15:03:08 +00:00
|
|
|
license = with licenses; [ mit boost ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ knedlsepp ];
|
|
|
|
};
|
|
|
|
}
|