2018-02-25 02:23:58 +00:00
|
|
|
{ stdenv, fetchFromGitHub, fluxbox, xscreensaver, desktop-file-utils,
|
2017-11-24 20:04:26 +00:00
|
|
|
numlockx, xorg, qtbase, qtsvg, qtmultimedia, qtx11extras, qmake,
|
2018-07-17 21:11:16 +01:00
|
|
|
qttools, poppler, wrapGAppsHook
|
2016-11-01 19:06:39 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "lumina-${version}";
|
2017-11-24 20:04:26 +00:00
|
|
|
version = "1.4.0-p1";
|
2016-11-01 19:06:39 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "trueos";
|
|
|
|
repo = "lumina";
|
|
|
|
rev = "v${version}";
|
2017-11-24 20:04:26 +00:00
|
|
|
sha256 = "0jin0a2s6pjbpw7w1bz67dgqp0xlpw1a7nh8zv0qwdf954zczanp";
|
2016-11-01 19:06:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2017-06-02 16:40:19 +01:00
|
|
|
qmake
|
2017-02-25 13:15:21 +00:00
|
|
|
qttools
|
2017-11-24 20:04:26 +00:00
|
|
|
wrapGAppsHook
|
2016-11-01 19:06:39 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
xorg.libxcb
|
2018-03-28 14:23:48 +01:00
|
|
|
xorg.libXdamage
|
2016-11-01 19:06:39 +00:00
|
|
|
xorg.xcbutilwm
|
|
|
|
xorg.xcbutilimage
|
2017-02-25 13:15:21 +00:00
|
|
|
qtbase
|
|
|
|
qtsvg
|
|
|
|
qtmultimedia
|
|
|
|
qtx11extras
|
2018-07-17 21:11:16 +01:00
|
|
|
poppler
|
2016-11-01 19:06:39 +00:00
|
|
|
fluxbox
|
|
|
|
xscreensaver
|
2018-02-25 02:23:58 +00:00
|
|
|
desktop-file-utils
|
2016-11-01 19:06:39 +00:00
|
|
|
numlockx
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./avoid-absolute-path-on-sessdir.patch
|
|
|
|
./LuminaOS-NixOS.cpp.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
# Copy Gentoo setup as NixOS setup and then patch it
|
|
|
|
# TODO: write a complete NixOS setup?
|
|
|
|
cp -a src-qt5/core/libLumina/LuminaOS-Gentoo.cpp src-qt5/core/libLumina/LuminaOS-NixOS.cpp
|
|
|
|
'';
|
|
|
|
|
|
|
|
postPatch = ''
|
2017-11-24 20:04:26 +00:00
|
|
|
# Fix location of poppler-qt5.h
|
|
|
|
substituteInPlace src-qt5/desktop-utils/lumina-pdf/mainUI.h \
|
|
|
|
--replace '#include <poppler-qt5.h>' '#include <poppler/qt5/poppler-qt5.h>'
|
|
|
|
|
|
|
|
# Fix plugin dir
|
|
|
|
substituteInPlace src-qt5/core/lumina-theme-engine/lthemeengine.pri \
|
|
|
|
--replace "\$\$[QT_INSTALL_PLUGINS]" "$out/$qtPluginPrefix"
|
|
|
|
|
2016-11-01 19:06:39 +00:00
|
|
|
# Fix location of fluxbox styles
|
|
|
|
substituteInPlace src-qt5/core-utils/lumina-config/pages/page_fluxbox_settings.cpp \
|
|
|
|
--replace 'LOS::AppPrefix()+"share/fluxbox' "\"${fluxbox}/share/fluxbox"
|
|
|
|
'';
|
|
|
|
|
2017-11-24 20:04:26 +00:00
|
|
|
qmakeFlags = [
|
|
|
|
"LINUX_DISTRO=NixOS"
|
|
|
|
"CONFIG+=WITH_I18N"
|
|
|
|
"LRELEASE=${stdenv.lib.getDev qttools}/bin/lrelease"
|
|
|
|
];
|
2016-11-01 19:06:39 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A lightweight, portable desktop environment";
|
|
|
|
longDescription = ''
|
|
|
|
The Lumina Desktop Environment is a lightweight system interface
|
|
|
|
that is designed for use on any Unix-like operating system. It
|
|
|
|
is based on QT5.
|
|
|
|
'';
|
|
|
|
homepage = https://lumina-desktop.org;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.romildo ];
|
|
|
|
};
|
|
|
|
}
|