Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 62 lines 1.4 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 cmake, 6 pkg-config, 7 libsForQt5, 8 glibmm, 9 doxygen, 10 buildDocs ? true, 11}: 12 13stdenv.mkDerivation rec { 14 pname = "gio-qt"; 15 version = "0.0.14"; 16 17 src = fetchFromGitHub { 18 owner = "linuxdeepin"; 19 repo = pname; 20 rev = version; 21 hash = "sha256-qDkkLqGsrw+otUy3/iZJJZ2RtpNYPGc/wktdVpw2weg="; 22 }; 23 24 # Upstream compiles both qt5 and qt6 versions, which is not possible in nixpkgs 25 # because of the conflict between qt5 hooks and qt6 hooks 26 postPatch = '' 27 substituteInPlace {gio-qt,qgio-tools}/CMakeLists.txt \ 28 --replace "include(qt6.cmake)" " " 29 ''; 30 31 nativeBuildInputs = [ 32 cmake 33 pkg-config 34 libsForQt5.wrapQtAppsHook 35 ] 36 ++ lib.optionals buildDocs [ 37 doxygen 38 libsForQt5.qttools 39 ]; 40 41 cmakeFlags = [ 42 "-DCMAKE_INSTALL_LIBDIR=lib" 43 "-DPROJECT_VERSION=${version}" 44 ] 45 ++ lib.optionals (!buildDocs) [ "-DBUILD_DOCS=OFF" ]; 46 47 propagatedBuildInputs = [ glibmm ]; 48 49 preConfigure = '' 50 # qt.qpa.plugin: Could not find the Qt platform plugin "minimal" 51 # A workaround is to set QT_PLUGIN_PATH explicitly 52 export QT_PLUGIN_PATH=${libsForQt5.qtbase.bin}/${libsForQt5.qtbase.qtPluginPrefix} 53 ''; 54 55 meta = with lib; { 56 description = "Gio wrapper for Qt applications"; 57 homepage = "https://github.com/linuxdeepin/gio-qt"; 58 license = licenses.lgpl3Plus; 59 platforms = platforms.linux; 60 teams = [ teams.deepin ]; 61 }; 62}