Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 76 lines 2.0 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 cmake, 6 pkg-config, 7 libsForQt5, 8 dtkgui, 9 gsettings-qt, 10 gtk3, 11 xorg, 12 iconv, 13}: 14 15stdenv.mkDerivation rec { 16 pname = "dde-appearance"; 17 version = "1.1.29"; 18 19 src = fetchFromGitHub { 20 owner = "linuxdeepin"; 21 repo = pname; 22 rev = version; 23 hash = "sha256-M39EugV0uGCIaXK4isTQpHd6Rh2Vl6sg3Jp8JIEFEE4="; 24 }; 25 26 postPatch = '' 27 substituteInPlace src/service/impl/appearancemanager.cpp \ 28 src/service/modules/{api/compatibleengine.cpp,subthemes/customtheme.cpp,background/backgrounds.cpp} \ 29 misc/dconfig/org.deepin.dde.appearance.json \ 30 fakewm/dbus/deepinwmfaker.cpp \ 31 --replace "/usr/share" "/run/current-system/sw/share" 32 33 for file in $(grep -rl "/usr/bin/dde-appearance"); do 34 substituteInPlace $file --replace "/usr/bin/dde-appearance" "$out/bin/dde-appearance" 35 done 36 37 substituteInPlace src/service/modules/api/themethumb.cpp \ 38 --replace "/usr/lib/deepin-api" "/run/current-system/sw/lib/deepin-api" 39 40 substituteInPlace fakewm/dbus/deepinwmfaker.cpp \ 41 --replace "/usr/lib/deepin-daemon" "/run/current-system/sw/lib/deepin-daemon" 42 43 substituteInPlace src/service/modules/api/locale.cpp \ 44 --replace "/usr/share/locale/locale.alias" "${iconv}/share/locale/locale.alias" 45 ''; 46 47 nativeBuildInputs = [ 48 cmake 49 pkg-config 50 libsForQt5.wrapQtAppsHook 51 ]; 52 53 buildInputs = [ 54 dtkgui 55 gsettings-qt 56 gtk3 57 libsForQt5.kconfig 58 libsForQt5.kwindowsystem 59 libsForQt5.kglobalaccel 60 xorg.libXcursor 61 xorg.xcbutilcursor 62 ]; 63 64 cmakeFlags = [ 65 "-DDSG_DATA_DIR=/run/current-system/sw/share/dsg" 66 "-DSYSTEMD_USER_UNIT_DIR=${placeholder "out"}/lib/systemd/user" 67 ]; 68 69 meta = with lib; { 70 description = "Program used to set the theme and appearance of deepin desktop"; 71 homepage = "https://github.com/linuxdeepin/dde-appearance"; 72 license = licenses.lgpl3Plus; 73 platforms = platforms.linux; 74 teams = [ teams.deepin ]; 75 }; 76}