Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 79 lines 2.8 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 kconfig, 7 kcoreaddons, 8 kwidgetsaddons, 9 wrapQtAppsHook, 10 kdbusaddons, 11 kde-cli-tools, 12 plasma-workspace, 13 qtstyleplugin-kvantum, 14}: 15stdenv.mkDerivation (finalAttrs: { 16 pname = "koi"; 17 version = "0.5.1"; 18 19 src = fetchFromGitHub { 20 owner = "baduhai"; 21 repo = "Koi"; 22 tag = finalAttrs.version; 23 hash = "sha256-fXLGlq41Qwdp0cYJcNqPlYnlpVXsZk0imYxP7Bgdcvw="; 24 }; 25 26 patches = [ 27 # koi tries to access KDE utility binaries at their absolute paths or by using `whereis`. 28 # We patch the absolute paths below in `postPatch` and replace the `whereis` invocations 29 # here with a placeholder that is also substituted in `postPatch`. 30 ./0001-locate-plasma-tools.patch 31 ]; 32 33 postPatch = '' 34 substituteInPlace src/utils.cpp \ 35 --replace-fail /usr/bin/kquitapp6 ${lib.getExe' kdbusaddons "kquitapp6"} \ 36 --replace-fail /usr/bin/kstart ${lib.getExe' kde-cli-tools "kstart"} 37 substituteInPlace src/plugins/plasmastyle.cpp \ 38 --replace-fail /usr/bin/plasma-apply-desktoptheme ${lib.getExe' plasma-workspace "plasma-apply-desktoptheme"} 39 substituteInPlace src/plugins/colorscheme.cpp \ 40 --replace-fail '@plasma-apply-colorscheme@' ${lib.getExe' plasma-workspace "plasma-apply-colorscheme"} 41 substituteInPlace src/plugins/icons.cpp \ 42 --replace-fail '@plasma-changeicons@' ${plasma-workspace}/libexec/plasma-changeicons 43 substituteInPlace src/plugins/kvantumstyle.cpp \ 44 --replace-fail /usr/bin/kvantummanager ${lib.getExe' qtstyleplugin-kvantum "kvantummanager"} 45 ''; 46 47 nativeBuildInputs = [ 48 cmake 49 wrapQtAppsHook 50 ]; 51 buildInputs = [ 52 kconfig 53 kcoreaddons 54 kwidgetsaddons 55 ]; 56 57 meta = { 58 description = "Scheduling LIGHT/DARK Theme Converter for the KDE Plasma Desktop"; 59 longDescription = '' 60 Koi is a program designed to provide the KDE Plasma Desktop functionality to automatically switch between light and dark themes. Koi is under semi-active development, and while it is stable enough to use daily, expect bugs. Koi is designed to be used with Plasma, and while some features may function under different desktop environments, they are unlikely to work and untested. 61 62 Features: 63 64 - Toggle between light and dark presets based on time 65 - Change Plasma style 66 - Change Qt colour scheme 67 - Change Icon theme 68 - Change GTK theme 69 - Change wallpaper 70 - Hide application to system tray 71 - Toggle between LIGHT/DARK themes by clicking mouse wheel 72 ''; 73 license = lib.licenses.lgpl3; 74 platforms = lib.platforms.linux; 75 changelog = "https://github.com/baduhai/Koi/releases/tag/${finalAttrs.version}"; 76 homepage = "https://github.com/baduhai/Koi"; 77 maintainers = with lib.maintainers; [ fnune ]; 78 }; 79})