2017-05-17 19:26:11 +00:00
|
|
|
{
|
|
|
|
mkDerivation,
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
cmake,
|
|
|
|
extra-cmake-modules,
|
|
|
|
makeWrapper,
|
2019-09-22 07:38:09 +00:00
|
|
|
boost,
|
|
|
|
doxygen,
|
|
|
|
openssl,
|
|
|
|
libmysqlclient,
|
|
|
|
postgresql,
|
|
|
|
graphviz,
|
|
|
|
loki,
|
2019-08-19 14:30:32 +00:00
|
|
|
qscintilla,
|
|
|
|
qtbase,
|
|
|
|
qttools,
|
|
|
|
}:
|
2017-01-04 08:37:45 +00:00
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
mkDerivation {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "tora";
|
2019-08-19 14:30:32 +00:00
|
|
|
version = "3.2.176";
|
2017-01-04 08:37:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tora-tool";
|
|
|
|
repo = "tora";
|
2019-08-19 14:30:32 +00:00
|
|
|
rev = "39bf2837779bf458fc72a9f0e49271152e57829f";
|
|
|
|
sha256 = "0fr9b542i8r6shgnz33lc3cz333fnxgmac033yxfrdjfglzk0j2k";
|
2017-01-04 08:37:45 +00:00
|
|
|
};
|
|
|
|
|
2019-08-19 14:30:32 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
extra-cmake-modules
|
|
|
|
makeWrapper
|
|
|
|
qttools
|
|
|
|
];
|
|
|
|
|
2017-01-04 08:37:45 +00:00
|
|
|
buildInputs = [
|
2019-09-22 07:38:09 +00:00
|
|
|
boost
|
|
|
|
doxygen
|
|
|
|
graphviz
|
|
|
|
loki
|
|
|
|
libmysqlclient
|
|
|
|
openssl
|
|
|
|
postgresql
|
|
|
|
qscintilla
|
|
|
|
qtbase
|
2017-01-04 08:37:45 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
2019-08-19 14:30:32 +00:00
|
|
|
substituteInPlace src/widgets/toglobalsetting.cpp \
|
|
|
|
--replace 'defaultGvHome = "/usr/bin"' 'defaultGvHome = "${lib.getBin graphviz}/bin"'
|
|
|
|
substituteInPlace extlibs/libermodel/dotgraph.cpp \
|
|
|
|
--replace /usr/bin/dot ${lib.getBin graphviz}/bin/dot
|
2017-01-04 08:37:45 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DWANT_INTERNAL_LOKI=0"
|
|
|
|
"-DWANT_INTERNAL_QSCINTILLA=0"
|
|
|
|
# cmake/modules/FindQScintilla.cmake looks in qtbase and for the wrong library name
|
2019-08-19 14:30:32 +00:00
|
|
|
"-DQSCINTILLA_INCLUDE_DIR=${qscintilla}/include"
|
|
|
|
"-DQSCINTILLA_LIBRARY=${qscintilla}/lib/libqscintilla2.so"
|
2017-01-04 08:37:45 +00:00
|
|
|
"-DENABLE_DB2=0"
|
|
|
|
"-DENABLE_ORACLE=0"
|
|
|
|
"-DENABLE_TERADATA=0"
|
|
|
|
"-DQT5_BUILD=1"
|
|
|
|
"-Wno-dev"
|
|
|
|
];
|
|
|
|
|
|
|
|
# these libraries are only searched for at runtime so we need to force-link them
|
2023-06-10 10:30:43 +00:00
|
|
|
NIX_LDFLAGS = "-lgvc -lmysqlclient -lecpg -lssl -L${libmysqlclient}/lib/mariadb";
|
2017-12-28 13:06:45 +00:00
|
|
|
|
2019-07-05 15:42:08 +00:00
|
|
|
qtWrapperArgs = [
|
|
|
|
''--prefix PATH : ${lib.getBin graphviz}/bin''
|
|
|
|
];
|
2017-01-04 08:37:45 +00:00
|
|
|
|
2017-05-17 19:26:11 +00:00
|
|
|
meta = with lib; {
|
2017-01-04 08:37:45 +00:00
|
|
|
description = "Tora SQL tool";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "tora";
|
2017-01-04 08:37:45 +00:00
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|