2015-12-20 02:52:30 +00:00
|
|
|
{ stdenv, fetchgit, cmake, polkit-qt, libyamlcpp, python, boost, parted
|
2015-06-22 17:03:12 +01:00
|
|
|
, extra-cmake-modules, kconfig, ki18n, kcoreaddons, solid, utillinux, libatasmart
|
2016-05-11 19:14:55 +01:00
|
|
|
, ckbcomp, glibc, tzdata, xkeyboard_config, qtbase, qtsvg, qttools }:
|
2015-06-08 10:18:26 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "calamares-${version}";
|
|
|
|
version = "1.0";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/calamares/calamares.git";
|
|
|
|
rev = "dabfb68a68cb012a90cd7b94a22e1ea08f7dd8ad";
|
2016-06-02 12:26:44 +01:00
|
|
|
sha256 = "12n161fmzybi20pxcjikqnckhzh175ni5da122p74bx7fzv7q41p";
|
2015-06-08 10:18:26 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2016-05-11 19:14:55 +01:00
|
|
|
cmake qtbase qtsvg qttools libyamlcpp python boost polkit-qt parted
|
2015-06-08 10:18:26 +01:00
|
|
|
extra-cmake-modules kconfig ki18n kcoreaddons solid utillinux libatasmart
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DPYTHON_LIBRARY=${python}/lib/libpython${python.majorVersion}m.so"
|
|
|
|
"-DPYTHON_INCLUDE_DIR=${python}/include/python${python.majorVersion}m"
|
|
|
|
"-DWITH_PARTITIONMANAGER=1"
|
|
|
|
];
|
|
|
|
|
2015-06-22 17:03:12 +01:00
|
|
|
patchPhase = ''
|
|
|
|
sed -e "s,/usr/bin/calamares,$out/bin/calamares," \
|
|
|
|
-i calamares.desktop \
|
|
|
|
-i com.github.calamares.calamares.policy
|
|
|
|
|
|
|
|
sed -e 's,/usr/share/zoneinfo,${tzdata}/share/zoneinfo,' \
|
|
|
|
-i src/modules/locale/timezonewidget/localeconst.h \
|
|
|
|
-i src/modules/locale/SetTimezoneJob.cpp
|
|
|
|
|
|
|
|
sed -e 's,/usr/share/i18n/locales,${glibc}/share/i18n/locales,' \
|
|
|
|
-i src/modules/locale/timezonewidget/localeconst.h
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
sed -e 's,"ckbcomp","${ckbcomp}/bin/ckbcomp",' \
|
|
|
|
-i src/modules/keyboard/keyboardwidget/keyboardpreview.cpp
|
|
|
|
'';
|
|
|
|
|
2015-06-08 10:18:26 +01:00
|
|
|
preInstall = ''
|
2015-12-20 02:52:30 +00:00
|
|
|
substituteInPlace cmake_install.cmake --replace "${polkit-qt}" "$out"
|
2015-06-08 10:18:26 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Distribution-independent installer framework";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ tstrobel ];
|
|
|
|
platforms = platforms.linux;
|
2016-03-23 13:44:05 +00:00
|
|
|
broken = true;
|
2015-06-08 10:18:26 +01:00
|
|
|
};
|
|
|
|
}
|