nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 93 lines 2.2 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 extra-cmake-modules, 7 makeWrapper, 8 qttools, 9 wrapQtAppsHook, 10 boost, 11 doxygen, 12 openssl, 13 libmysqlclient, 14 postgresql, 15 graphviz, 16 loki, 17 qscintilla, 18 qtbase, 19}: 20 21stdenv.mkDerivation { 22 pname = "tora"; 23 version = "3.2.176"; 24 25 src = fetchFromGitHub { 26 owner = "tora-tool"; 27 repo = "tora"; 28 rev = "39bf2837779bf458fc72a9f0e49271152e57829f"; 29 sha256 = "0fr9b542i8r6shgnz33lc3cz333fnxgmac033yxfrdjfglzk0j2k"; 30 }; 31 32 nativeBuildInputs = [ 33 cmake 34 extra-cmake-modules 35 makeWrapper 36 qttools 37 wrapQtAppsHook 38 ]; 39 40 buildInputs = [ 41 boost 42 doxygen 43 graphviz 44 loki 45 libmysqlclient 46 openssl 47 postgresql # needs libecpg, which is not available in libpq package 48 qscintilla 49 qtbase 50 ]; 51 52 preConfigure = '' 53 substituteInPlace src/widgets/toglobalsetting.cpp \ 54 --replace 'defaultGvHome = "/usr/bin"' 'defaultGvHome = "${lib.getBin graphviz}/bin"' 55 substituteInPlace extlibs/libermodel/dotgraph.cpp \ 56 --replace /usr/bin/dot ${lib.getBin graphviz}/bin/dot 57 ''; 58 59 cmakeFlags = [ 60 "-DWANT_INTERNAL_LOKI=0" 61 "-DWANT_INTERNAL_QSCINTILLA=0" 62 # cmake/modules/FindQScintilla.cmake looks in qtbase and for the wrong library name 63 "-DQSCINTILLA_INCLUDE_DIR=${qscintilla}/include" 64 "-DQSCINTILLA_LIBRARY=${qscintilla}/lib/libqscintilla2.so" 65 "-DENABLE_DB2=0" 66 "-DENABLE_ORACLE=0" 67 "-DENABLE_TERADATA=0" 68 "-DQT5_BUILD=1" 69 "-Wno-dev" 70 ]; 71 72 # these libraries are only searched for at runtime so we need to force-link them 73 NIX_LDFLAGS = "-lgvc -lmysqlclient -lecpg -lssl -L${libmysqlclient}/lib/mariadb"; 74 75 qtWrapperArgs = [ 76 "--prefix PATH : ${lib.getBin graphviz}/bin" 77 ]; 78 79 postPatch = '' 80 substituteInPlace CMakeLists.txt \ 81 --replace-fail "CMAKE_MINIMUM_REQUIRED(VERSION 3.1 FATAL_ERROR)" "cmake_minimum_required(VERSION 3.10)" 82 ''; 83 84 meta = { 85 description = "Tora SQL tool"; 86 mainProgram = "tora"; 87 maintainers = with lib.maintainers; [ peterhoeg ]; 88 platforms = lib.platforms.linux; 89 license = lib.licenses.asl20; 90 # fails to build on hydra since 2024 91 broken = true; 92 }; 93}