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