nixpkgs/pkgs/tools/misc/calamares/default.nix

65 lines
2.2 KiB
Nix
Raw Normal View History

2017-12-09 02:12:26 +03: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
}:
stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "calamares";
2018-03-26 18:13:46 +03:00
version = "3.1.12";
# release including submodule
src = fetchurl {
url = "https://github.com/${pname}/${pname}/releases/download/v${version}/${name}.tar.gz";
2018-03-26 18:13:46 +03:00
sha256 = "0k59wnch2gmbsr5dh5swbjp4rkf5c1ml0n4sxf196wdasraismc6";
};
buildInputs = [
2017-12-09 02:12:26 +03: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-09 02:12:26 +03:00
enableParallelBuilding = false;
cmakeFlags = [
"-DPYTHON_LIBRARY=${python}/lib/libpython${python.majorVersion}m.so"
"-DPYTHON_INCLUDE_DIR=${python}/include/python${python.majorVersion}m"
2017-12-09 02:12:26 +03:00
"-DCMAKE_VERBOSE_MAKEFILE=True"
"-DCMAKE_BUILD_TYPE=Release"
"-DWITH_PYTHONQT:BOOL=ON"
];
2017-12-09 02:12:26 +03:00
POLKITQT-1_POLICY_FILES_INSTALL_DIR = "$(out)/share/polkit-1/actions";
patchPhase = ''
2017-12-09 02:12:26 +03:00
sed -e "s,/usr/bin/calamares,$out/bin/calamares," \
-i calamares.desktop \
-i com.github.calamares.calamares.policy
2017-12-09 02:12:26 +03: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-09 02:12:26 +03:00
sed -e 's,/usr/share/i18n/locales,${glibc.out}/share/i18n/locales,' \
-i src/modules/locale/timezonewidget/localeconst.h
2017-12-09 02:12:26 +03: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-09 02:12:26 +03:00
sed -e 's,"ckbcomp","${ckbcomp}/bin/ckbcomp",' \
-i src/modules/keyboard/keyboardwidget/keyboardpreview.cpp
2017-12-09 02:12:26 +03:00
sed "s,\''${POLKITQT-1_POLICY_FILES_INSTALL_DIR},''${out}/share/polkit-1/actions," \
-i CMakeLists.txt
'';
meta = with stdenv.lib; {
description = "Distribution-independent installer framework";
license = licenses.gpl3;
2017-12-09 02:12:26 +03:00
maintainers = with stdenv.lib.maintainers; [ manveru ];
platforms = platforms.linux;
};
}