summary refs log tree commit diff
path: root/pkgs/tools/misc/calamares
diff options
context:
space:
mode:
authorMichael Fellinger <michael.fellinger@xing.com>2017-12-08 21:08:17 +0100
committerMichael Fellinger <michael.fellinger@xing.com>2017-12-10 16:59:33 +0100
commit3abcc2c514c5b7dfb926a8e7d7967b40d2bae104 (patch)
tree3ed8399592e9b396ab78aa0749e8e3357f663c92 /pkgs/tools/misc/calamares
parentb459c8475c58f7c8d529ebeadcbebbfe00ddf6eb (diff)
downloadnixpkgs-3abcc2c514c5b7dfb926a8e7d7967b40d2bae104.tar
nixpkgs-3abcc2c514c5b7dfb926a8e7d7967b40d2bae104.tar.gz
nixpkgs-3abcc2c514c5b7dfb926a8e7d7967b40d2bae104.tar.bz2
nixpkgs-3abcc2c514c5b7dfb926a8e7d7967b40d2bae104.tar.lz
nixpkgs-3abcc2c514c5b7dfb926a8e7d7967b40d2bae104.tar.xz
nixpkgs-3abcc2c514c5b7dfb926a8e7d7967b40d2bae104.tar.zst
nixpkgs-3abcc2c514c5b7dfb926a8e7d7967b40d2bae104.zip
Revert "calamares: remove due to being broken and insecure."
This reverts commit c677c35922b06f8861bfd97e79c3e8803e55fe0c.
Diffstat (limited to 'pkgs/tools/misc/calamares')
-rw-r--r--pkgs/tools/misc/calamares/default.nix57
1 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/tools/misc/calamares/default.nix b/pkgs/tools/misc/calamares/default.nix
new file mode 100644
index 00000000000..9356eb36549
--- /dev/null
+++ b/pkgs/tools/misc/calamares/default.nix
@@ -0,0 +1,57 @@
+{ stdenv, fetchurl, cmake, polkit-qt, libyamlcpp, python, boost, parted
+, extra-cmake-modules, kconfig, ki18n, kcoreaddons, solid, utillinux, libatasmart
+, ckbcomp, glibc, tzdata, xkeyboard_config, qtbase, qtsvg, qttools }:
+
+stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+  pname = "calamares";
+  version = "1.1.4.2";
+
+  # release including submodule
+  src = fetchurl {
+    url = "https://github.com/${pname}/${pname}/releases/download/v${version}/${name}.tar.gz";
+    sha256 = "1mh0nmzc3i1aqcj79q2s3vpccn0mirlfbj26sfyb0v6gcrvf707d";
+  };
+
+  buildInputs = [
+    cmake qtbase qtsvg qttools libyamlcpp python boost polkit-qt parted
+    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"
+  ];
+
+  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.out}/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
+  '';
+
+  preInstall = ''
+    substituteInPlace cmake_install.cmake --replace "${polkit-qt}" "$out"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Distribution-independent installer framework";
+    license = licenses.gpl3;
+    maintainers = with stdenv.lib.maintainers; [ tstrobel ];
+    platforms = platforms.linux;
+    broken = true;
+  };
+}