My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nomicon/pkgs/tools/misc/calamares/default.nix

59 lines
2.0 KiB

{ lib, fetchurl, boost, cmake, extra-cmake-modules, kparts, kpmcore
7 years ago
, kservice, libatasmart, libxcb, libyamlcpp, parted, polkit-qt, python, qtbase
, qtquickcontrols, qtsvg, qttools, qtwebengine, util-linux, tzdata
, ckbcomp, xkeyboard_config, mkDerivation
7 years ago
}:
mkDerivation rec {
pname = "calamares";
version = "3.2.55";
# release including submodule
src = fetchurl {
url = "https://github.com/${pname}/${pname}/releases/download/v${version}/${pname}-${version}.tar.gz";
sha256 = "sha256-1xf02rjy6+83zbU2yxGUGjcIGJfYS8ryqi4CBzrh7kI=";
};
nativeBuildInputs = [ cmake extra-cmake-modules ];
buildInputs = [
boost kparts.dev kpmcore.out kservice.dev
7 years ago
libatasmart libxcb libyamlcpp parted polkit-qt python qtbase
qtquickcontrols qtsvg qttools qtwebengine.dev util-linux
];
cmakeFlags = [
"-DPYTHON_LIBRARY=${python}/lib/lib${python.libPrefix}.so"
"-DPYTHON_INCLUDE_DIR=${python}/include/${python.libPrefix}"
7 years ago
"-DCMAKE_VERBOSE_MAKEFILE=True"
"-DCMAKE_BUILD_TYPE=Release"
"-DWITH_PYTHONQT:BOOL=ON"
];
7 years ago
POLKITQT-1_POLICY_FILES_INSTALL_DIR = "$(out)/share/polkit-1/actions";
postPatch = ''
7 years ago
sed -e "s,/usr/bin/calamares,$out/bin/calamares," \
-i calamares.desktop \
-i com.github.calamares.calamares.policy
7 years ago
sed -e 's,/usr/share/zoneinfo,${tzdata}/share/zoneinfo,' \
-i src/modules/locale/SetTimezoneJob.cpp
7 years ago
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
7 years ago
sed -e 's,"ckbcomp","${ckbcomp}/bin/ckbcomp",' \
-i src/modules/keyboard/keyboardwidget/keyboardpreview.cpp
7 years ago
sed "s,\''${POLKITQT-1_POLICY_FILES_INSTALL_DIR},''${out}/share/polkit-1/actions," \
-i CMakeLists.txt
'';
meta = with lib; {
description = "Distribution-independent installer framework";
license = with licenses; [ gpl3Plus bsd2 ];
maintainers = with maintainers; [ manveru ];
platforms = platforms.linux;
};
}