@@ -0,0 +1,69 @@
1+{ stdenv, fetchFromGitHub, fluxbox, xscreensaver, desktop_file_utils,
2+ numlockx, xorg, qt5, kde5
3+}:
4+
5+stdenv.mkDerivation rec {
6+ name = "lumina-${version}";
7+ version = "1.1.0-p1";
8+
9+ src = fetchFromGitHub {
10+ owner = "trueos";
11+ repo = "lumina";
12+ rev = "v${version}";
13+ sha256 = "1kkb6v6p6w5mx1qdmcrq3r674k9ahpc6wlsb9pi2lq8qk9yaid0m";
14+ };
15+
16+ nativeBuildInputs = [
17+ qt5.qmakeHook
18+ qt5.qttools
19+ ];
20+
21+ buildInputs = [
22+ xorg.libxcb
23+ xorg.xcbutilwm
24+ xorg.xcbutilimage
25+ qt5.qtbase
26+ qt5.qtsvg
27+ qt5.qtmultimedia
28+ qt5.qtx11extras
29+ kde5.oxygen-icons5
30+ fluxbox
31+ xscreensaver
32+ desktop_file_utils
33+ numlockx
34+ ];
35+
36+ patches = [
37+ ./avoid-absolute-path-on-sessdir.patch
38+ ./LuminaOS-NixOS.cpp.patch
39+ ];
40+
41+ prePatch = ''
42+ # Copy Gentoo setup as NixOS setup and then patch it
43+ # TODO: write a complete NixOS setup?
44+ cp -a src-qt5/core/libLumina/LuminaOS-Gentoo.cpp src-qt5/core/libLumina/LuminaOS-NixOS.cpp
45+ '';
46+
47+ postPatch = ''
48+ # Fix location of fluxbox styles
49+ substituteInPlace src-qt5/core-utils/lumina-config/pages/page_fluxbox_settings.cpp \
50+ --replace 'LOS::AppPrefix()+"share/fluxbox' "\"${fluxbox}/share/fluxbox"
51+ '';
52+
53+ qmakeFlags = [ "LINUX_DISTRO=NixOS" ];
54+
55+ enableParallelBuilding = true;
56+
57+ meta = with stdenv.lib; {
58+ description = "A lightweight, portable desktop environment";
59+ longDescription = ''
60+ The Lumina Desktop Environment is a lightweight system interface
61+ that is designed for use on any Unix-like operating system. It
62+ is based on QT5.
63+ '';
64+ homepage = https://lumina-desktop.org;
65+ license = licenses.bsd3;
66+ platforms = platforms.unix;
67+ maintainers = [ maintainers.romildo ];
68+ };
69+}