2018-06-26 00:03:56 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig, makeWrapper
|
2019-01-04 12:52:47 +00:00
|
|
|
, qtbase, libuuid, libcap, uwsgi, grantlee, pcre
|
|
|
|
}:
|
2018-06-26 00:03:56 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "cutelyst-${version}";
|
2019-03-02 02:34:10 +00:00
|
|
|
version = "2.7.0";
|
2018-06-26 00:03:56 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cutelyst";
|
|
|
|
repo = "cutelyst";
|
|
|
|
rev = "v${version}";
|
2019-03-02 02:34:10 +00:00
|
|
|
sha256 = "09cgfpr2k1jp98h1ahxqm5lmv3qbk0bcxpqpill6n5wmq2c8kl8b";
|
2018-06-26 00:03:56 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
|
2019-01-04 12:52:47 +00:00
|
|
|
buildInputs = [ qtbase libuuid libcap uwsgi grantlee pcre ];
|
2018-06-26 00:03:56 +01:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DPLUGIN_UWSGI=ON"
|
|
|
|
"-DPLUGIN_STATICCOMPRESSED=ON"
|
|
|
|
"-DPLUGIN_CSRFPROTECTION=ON"
|
|
|
|
"-DPLUGIN_VIEW_GRANTLEE=ON"
|
|
|
|
];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:`pwd`/Cutelyst:`pwd`/EventLoopEPoll"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
unset LD_LIBRARY_PATH
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for prog in $out/bin/*; do
|
|
|
|
wrapProgram "$prog" --set QT_PLUGIN_PATH '${qtbase}/${qtbase.qtPluginPrefix}'
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "C++ Web Framework built on top of Qt";
|
|
|
|
homepage = https://cutelyst.org/;
|
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
maintainers = with maintainers; [ fpletz ];
|
|
|
|
};
|
|
|
|
}
|