2017-12-08 23:12:26 +00:00
|
|
|
{ stdenv, fetchurl, boost, cmake, extra-cmake-modules, kparts, kpmcore
|
|
|
|
, kservice, libatasmart, libxcb, libyamlcpp, parted, polkit-qt, python, qtbase
|
|
|
|
, qtquickcontrols, qtsvg, qttools, qtwebengine, utillinux, glibc, tzdata
|
|
|
|
, ckbcomp, xkeyboard_config
|
|
|
|
}:
|
2017-12-08 20:08:17 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
pname = "calamares";
|
2019-06-01 09:32:34 +01:00
|
|
|
version = "3.2.8";
|
2017-12-08 20:08:17 +00:00
|
|
|
|
|
|
|
# release including submodule
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/${pname}/${pname}/releases/download/v${version}/${name}.tar.gz";
|
2019-06-01 09:32:34 +01:00
|
|
|
sha256 = "1ymyl12fzxc5jjfbw4pfmgzp036w0dai76f7anilw2bnwfzq5g62";
|
2017-12-08 20:08:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2017-12-08 23:12:26 +00:00
|
|
|
boost cmake extra-cmake-modules kparts.dev kpmcore.out kservice.dev
|
|
|
|
libatasmart libxcb libyamlcpp parted polkit-qt python qtbase
|
|
|
|
qtquickcontrols qtsvg qttools qtwebengine.dev utillinux
|
2017-12-08 20:08:17 +00:00
|
|
|
];
|
|
|
|
|
2017-12-08 23:12:26 +00:00
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
2017-12-08 20:08:17 +00:00
|
|
|
cmakeFlags = [
|
2019-01-03 09:05:50 +00:00
|
|
|
"-DPYTHON_LIBRARY=${python}/lib/lib${python.libPrefix}.so"
|
|
|
|
"-DPYTHON_INCLUDE_DIR=${python}/include/${python.libPrefix}"
|
2017-12-08 23:12:26 +00:00
|
|
|
"-DCMAKE_VERBOSE_MAKEFILE=True"
|
|
|
|
"-DCMAKE_BUILD_TYPE=Release"
|
|
|
|
"-DWITH_PYTHONQT:BOOL=ON"
|
2017-12-08 20:08:17 +00:00
|
|
|
];
|
|
|
|
|
2017-12-08 23:12:26 +00:00
|
|
|
POLKITQT-1_POLICY_FILES_INSTALL_DIR = "$(out)/share/polkit-1/actions";
|
|
|
|
|
2017-12-08 20:08:17 +00:00
|
|
|
patchPhase = ''
|
2017-12-08 23:12:26 +00:00
|
|
|
sed -e "s,/usr/bin/calamares,$out/bin/calamares," \
|
|
|
|
-i calamares.desktop \
|
|
|
|
-i com.github.calamares.calamares.policy
|
2017-12-08 20:08:17 +00:00
|
|
|
|
2017-12-08 23:12:26 +00:00
|
|
|
sed -e 's,/usr/share/zoneinfo,${tzdata}/share/zoneinfo,' \
|
|
|
|
-i src/modules/locale/timezonewidget/localeconst.h \
|
|
|
|
-i src/modules/locale/SetTimezoneJob.cpp
|
2017-12-08 20:08:17 +00:00
|
|
|
|
2017-12-08 23:12:26 +00:00
|
|
|
sed -e 's,/usr/share/i18n/locales,${glibc.out}/share/i18n/locales,' \
|
|
|
|
-i src/modules/locale/timezonewidget/localeconst.h
|
2017-12-08 20:08:17 +00:00
|
|
|
|
2017-12-08 23:12:26 +00:00
|
|
|
sed -e 's,/usr/share/X11/xkb/rules/base.lst,${xkeyboard_config}/share/X11/xkb/rules/base.lst,' \
|
|
|
|
-i src/modules/keyboard/keyboardwidget/keyboardglobal.h
|
2017-12-08 20:08:17 +00:00
|
|
|
|
2017-12-08 23:12:26 +00:00
|
|
|
sed -e 's,"ckbcomp","${ckbcomp}/bin/ckbcomp",' \
|
|
|
|
-i src/modules/keyboard/keyboardwidget/keyboardpreview.cpp
|
2017-12-08 20:08:17 +00:00
|
|
|
|
2017-12-08 23:12:26 +00:00
|
|
|
sed "s,\''${POLKITQT-1_POLICY_FILES_INSTALL_DIR},''${out}/share/polkit-1/actions," \
|
|
|
|
-i CMakeLists.txt
|
2017-12-08 20:08:17 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Distribution-independent installer framework";
|
|
|
|
license = licenses.gpl3;
|
2017-12-08 23:12:26 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ manveru ];
|
2017-12-08 20:08:17 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|