Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 70 lines 1.9 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 dtkwidget, 6 qt5integration, 7 qt5platform-plugins, 8 cmake, 9 libsForQt5, 10 doxygen, 11}: 12 13stdenv.mkDerivation rec { 14 pname = "dde-app-services"; 15 version = "1.0.25"; 16 17 src = fetchFromGitHub { 18 owner = "linuxdeepin"; 19 repo = pname; 20 rev = version; 21 hash = "sha256-/lHiSUOTD8nC0WDLAHAFzm1YC0WjSS5W5JNC0cjeVEo="; 22 }; 23 24 postPatch = '' 25 substituteInPlace dconfig-center/dde-dconfig-daemon/services/org.desktopspec.ConfigManager.service \ 26 --replace "/usr/bin/dde-dconfig-daemon" "$out/bin/dde-dconfig-daemon" 27 substituteInPlace dconfig-center/dde-dconfig/main.cpp \ 28 --replace "/bin/dde-dconfig-editor" "dde-dconfig-editor" 29 substituteInPlace dconfig-center/CMakeLists.txt \ 30 --replace 'add_subdirectory("example")' " " \ 31 --replace 'add_subdirectory("tests")' " " 32 33 substituteInPlace dconfig-center/dde-dconfig-daemon/services/dde-dconfig-daemon.service \ 34 --replace "/usr/bin" "$out/bin" \ 35 --replace "/usr/share" "/run/current-system/sw/share" 36 ''; 37 38 nativeBuildInputs = [ 39 cmake 40 libsForQt5.qttools 41 doxygen 42 libsForQt5.wrapQtAppsHook 43 ]; 44 45 buildInputs = [ 46 dtkwidget 47 qt5integration 48 qt5platform-plugins 49 ]; 50 51 cmakeFlags = [ 52 "-DDVERSION=${version}" 53 "-DDSG_DATA_DIR=/run/current-system/sw/share/dsg" 54 "-DQCH_INSTALL_DESTINATION=${placeholder "out"}/${libsForQt5.qtbase.qtDocPrefix}" 55 ]; 56 57 preConfigure = '' 58 # qt.qpa.plugin: Could not find the Qt platform plugin "minimal" 59 # A workaround is to set QT_PLUGIN_PATH explicitly 60 export QT_PLUGIN_PATH=${libsForQt5.qtbase.bin}/${libsForQt5.qtbase.qtPluginPrefix} 61 ''; 62 63 meta = with lib; { 64 description = "Provids dbus service for reading and writing DSG configuration"; 65 homepage = "https://github.com/linuxdeepin/dde-app-services"; 66 license = licenses.lgpl3Plus; 67 platforms = platforms.linux; 68 teams = [ teams.deepin ]; 69 }; 70}