===
-+ *
-+ * SPDX-FileCopyrightText: 2021 Anke Boersma
-+ * SPDX-License-Identifier: GPL-3.0-or-later
-+ *
-+ * Calamares is Free Software: see the License-Identifier above.
-+ *
-+ */
-+
-+import io.calamares.core 1.0
-+import io.calamares.ui 1.0
-+
-+import QtQuick 2.15
-+import QtQuick.Controls 2.15
-+import QtQuick.Layouts 1.3
-+
-+Item {
-+
-+ SystemPalette {
-+ id: palette
-+ colorGroup: SystemPalette.Active
-+ }
-+
-+ width: parent.width
-+ height: parent.height
-+
-+ Rectangle {
-+ anchors.fill: parent
-+ color: palette.window
-+
-+ ButtonGroup {
-+ id: switchGroup
-+ }
-+
-+ Column {
-+ id: column
-+ anchors.centerIn: parent
-+ spacing: 5
-+
-+ Rectangle {
-+ width: 700
-+ height: 250
-+ color: palette.base
-+ radius: 10
-+ border.width: 0
-+ Text {
-+ color: palette.text
-+ width: 600
-+ height: 200
-+ anchors.centerIn: parent
-+ text: qsTr("NixOS is fully open source, but it also provides optional software packages that do not respect users' freedom to run, copy, distribute, study, change and improve the software, and are commonly not open source. By default such \"unfree\" packages are not allowed, but you can enable it here. If you check this box, you agree that unfree software may be installed which might have additional End User License Agreements (EULAs) that you need to agree to. If not enabled, some hardware (notably Nvidia GPUs and some WiFi chips) might not work or not work optimally.
")
-+ font.pointSize: 12
-+ wrapMode: Text.WordWrap
-+ }
-+
-+ CheckBox {
-+ id: element2
-+ anchors.horizontalCenter: parent.horizontalCenter
-+ y: 190
-+ text: qsTr("Allow unfree software")
-+ checked: false
-+
-+ onCheckedChanged: {
-+ if ( checked ) {
-+ config.packageChoice = "unfree"
-+ } else {
-+ config.packageChoice = "free"
-+ }
-+ }
-+ }
-+ }
-+ }
-+ }
-+
-+}
-diff --git a/src/modules/packagechooserq/unfree.conf b/src/modules/packagechooserq/unfree.conf
-new file mode 100644
-index 000000000..da79a8eac
---- /dev/null
-+++ b/src/modules/packagechooserq/unfree.conf
-@@ -0,0 +1,11 @@
-+# SPDX-FileCopyrightText: no
-+# SPDX-License-Identifier: CC0-1.0
-+#
-+---
-+qmlLabel:
-+ label: "Unfree Software"
-+method: legacy
-+mode: required
-+labels:
-+ step: "Unfree Software"
-+packageChoice: free
diff --git a/pkgs/tools/misc/calamares/0005-Modifies-finished-module-to-add-some-NixOS-resources.patch b/pkgs/tools/misc/calamares/0005-Modifies-finished-module-to-add-some-NixOS-resources.patch
deleted file mode 100644
index 7155f0b7870d..000000000000
--- a/pkgs/tools/misc/calamares/0005-Modifies-finished-module-to-add-some-NixOS-resources.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Victor Fuentes
-Date: Thu, 1 Aug 2024 16:01:53 -0400
-Subject: [PATCH] Modifies finished module to add some NixOS resources.
-
-Modifies packagechooser module to change the UI.
----
- src/modules/finished/FinishedPage.cpp | 12 +++++---
- .../packagechooser/PackageChooserPage.cpp | 1 +
- src/modules/packagechooser/page_package.ui | 28 +++++++++----------
- 3 files changed, 23 insertions(+), 18 deletions(-)
-
-diff --git a/src/modules/finished/FinishedPage.cpp b/src/modules/finished/FinishedPage.cpp
-index 51be52678..307607232 100644
---- a/src/modules/finished/FinishedPage.cpp
-+++ b/src/modules/finished/FinishedPage.cpp
-@@ -74,8 +74,10 @@ FinishedPage::retranslate()
- {
- ui->mainText->setText( tr( "All done.
"
- "%1 has been set up on your computer.
"
-- "You may now start using your new system.",
-- "@info" )
-+ "You may now start using your new system.
"
-+ "You can change every setting later except the bootloader.
"
-+ "Check the manual for instructions on how to install software, upgrade the system or enable services.
"
-+ "You can find ways to get in touch with the community on the website!", "@info" )
- .arg( branding->versionedName() ) );
- ui->restartCheckBox->setToolTip( tr( ""
- "When this box is checked, your system will "
-@@ -89,8 +91,10 @@ FinishedPage::retranslate()
- ui->mainText->setText( tr( "
All done.
"
- "%1 has been installed on your computer.
"
- "You may now restart into your new system, or continue "
-- "using the %2 Live environment.",
-- "@info" )
-+ "using the %2 Live environment.
"
-+ "You can change every setting later except the bootloader.
"
-+ "Check the manual for instructions on how to install software, upgrade the system or enable services.
"
-+ "You can find ways to get in touch with the community on the website!", "@info" )
- .arg( branding->versionedName(), branding->productName() ) );
- ui->restartCheckBox->setToolTip( tr( ""
- "When this box is checked, your system will "
-diff --git a/src/modules/packagechooser/PackageChooserPage.cpp b/src/modules/packagechooser/PackageChooserPage.cpp
-index 44a570d2f..4dc931bf3 100644
---- a/src/modules/packagechooser/PackageChooserPage.cpp
-+++ b/src/modules/packagechooser/PackageChooserPage.cpp
-@@ -52,6 +52,7 @@ PackageChooserPage::currentChanged( const QModelIndex& index )
- if ( !index.isValid() || !ui->products->selectionModel()->hasSelection() )
- {
- ui->productName->setText( m_introduction.name.get() );
-+ ui->productName->setStyleSheet("font-weight: bold");
- ui->productScreenshot->setPixmap( m_introduction.screenshot );
- ui->productDescription->setText( m_introduction.description.get() );
- }
-diff --git a/src/modules/packagechooser/page_package.ui b/src/modules/packagechooser/page_package.ui
-index 2ab5b7f13..bed462069 100644
---- a/src/modules/packagechooser/page_package.ui
-+++ b/src/modules/packagechooser/page_package.ui
-@@ -37,20 +37,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
-
-
- -
--
--
-
--
--
--
-- 0
-- 0
--
--
--
-- Product Name
--
--
--
-+
- -
-
-
-@@ -67,6 +54,19 @@ SPDX-License-Identifier: GPL-3.0-or-later
-
-
-
-+ -
-+
-+
-+
-+ 0
-+ 0
-+
-+
-+
-+ Product Name
-+
-+
-+
- -
-
-
diff --git a/pkgs/tools/misc/calamares/0007-Fix-setting-the-kayboard-layout-on-GNOME-wayland.patch b/pkgs/tools/misc/calamares/0007-Fix-setting-the-kayboard-layout-on-GNOME-wayland.patch
deleted file mode 100644
index 9c65859e0fc4..000000000000
--- a/pkgs/tools/misc/calamares/0007-Fix-setting-the-kayboard-layout-on-GNOME-wayland.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Victor Fuentes
-Date: Thu, 31 Oct 2024 10:34:25 -0700
-Subject: [PATCH] Fix setting the kayboard layout on GNOME wayland.
-
-By default the module uses the setxkbmap, which will not change the
-keyboard
----
- src/modules/keyboard/Config.cpp | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp
-index 54ee7649c..60fe2d7d0 100644
---- a/src/modules/keyboard/Config.cpp
-+++ b/src/modules/keyboard/Config.cpp
-@@ -306,6 +306,10 @@ Config::applyXkb()
- m_additionalLayoutInfo.groupSwitcher ) );
- QProcess::execute( "setxkbmap", basicArguments );
-
-+ QString xkbmap = QString( "[('xkb','%1\%2'),('xkb','%3\%4')]").arg(
-+ m_selectedLayout, ((!m_selectedVariant.isEmpty()) ? "+" + m_selectedVariant : ""),
-+ m_additionalLayoutInfo.additionalLayout, ((!m_additionalLayoutInfo.additionalVariant.isEmpty()) ? "+" + m_additionalLayoutInfo.additionalVariant : ""));
-+ QProcess::execute( "sh", { "-c", "if command -v gsettings; then gsettings set org.gnome.desktop.input-sources sources \"$0\"; fi", xkbmap });
- cDebug() << "xkbmap selection changed to: " << m_selectedLayout << '-' << m_selectedVariant << "(added "
- << m_additionalLayoutInfo.additionalLayout << "-" << m_additionalLayoutInfo.additionalVariant
- << " since current layout is not ASCII-capable)";
-@@ -314,6 +318,8 @@ Config::applyXkb()
- {
- basicArguments.append( xkbmap_layout_args( m_selectedLayout, m_selectedVariant ) );
- QProcess::execute( "setxkbmap", basicArguments );
-+ QString xkbmap = QString( "[('xkb','%1\%2')]").arg( m_selectedLayout, ((!m_selectedVariant.isEmpty()) ? "+" + m_selectedVariant : "") );
-+ QProcess::execute( "sh", { "-c", "if command -v gsettings; then gsettings set org.gnome.desktop.input-sources sources \"$0\"; fi", xkbmap });
- cDebug() << "xkbmap selection changed to: " << m_selectedLayout << '-' << m_selectedVariant;
- }
- m_applyTimer.stop();
\ No newline at end of file
diff --git a/pkgs/tools/misc/calamares/0008-Change-default-location-where-calamares-searches-for.patch b/pkgs/tools/misc/calamares/0008-Change-default-location-where-calamares-searches-for.patch
deleted file mode 100644
index 58b53758609f..000000000000
--- a/pkgs/tools/misc/calamares/0008-Change-default-location-where-calamares-searches-for.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Victor Fuentes
-Date: Thu, 1 Aug 2024 16:03:53 -0400
-Subject: [PATCH] Change default location where calamares searches for locales
-
----
- src/modules/locale/Config.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/modules/locale/Config.cpp b/src/modules/locale/Config.cpp
-index 8fa17a768..79b5419b6 100644
---- a/src/modules/locale/Config.cpp
-+++ b/src/modules/locale/Config.cpp
-@@ -48,7 +48,7 @@ loadLocales( const QString& localeGenPath )
- // supported locales. We first try that one, and if it doesn't exist, we fall back
- // to parsing the lines from locale.gen
- localeGenLines.clear();
-- QFile supported( "/usr/share/i18n/SUPPORTED" );
-+ QFile supported( "/run/current-system/sw/share/i18n/SUPPORTED" );
- QByteArray ba;
-
- if ( supported.exists() && supported.open( QIODevice::ReadOnly | QIODevice::Text ) )
diff --git a/pkgs/tools/misc/calamares/default.nix b/pkgs/tools/misc/calamares/default.nix
deleted file mode 100644
index ecab0d9c0fab..000000000000
--- a/pkgs/tools/misc/calamares/default.nix
+++ /dev/null
@@ -1,144 +0,0 @@
-{
- lib,
- fetchurl,
- boost,
- cmake,
- extra-cmake-modules,
- kparts,
- kpmcore,
- kirigami2,
- kservice,
- libatasmart,
- libxcb,
- yaml-cpp,
- libpwquality,
- parted,
- polkit-qt,
- python3,
- qtbase,
- qtquickcontrols,
- qtsvg,
- qttools,
- qtwebengine,
- util-linux,
- tzdata,
- ckbcomp,
- xkeyboard_config,
- mkDerivation,
- nixos-extensions ? false,
- # passthru.tests
- calamares-nixos,
-}:
-
-mkDerivation rec {
- pname = "calamares";
- version = "3.3.13";
-
- # release including submodule
- src = fetchurl {
- url = "https://github.com/calamares/calamares/releases/download/v${version}/calamares-${version}.tar.gz";
- sha256 = "sha256-5Jz32JTgK6BImM0HcMtXi04k39CAirdmC/lbskVmSNQ=";
- };
-
- # On major changes, or when otherwise required, you *must* :
- # 1. reformat the patches,
- # 2. `git am path/to/00*.patch` them into a calamares worktree,
- # 3. rebase to the more recent calamares version,
- # 4. and export the patches again via
- # `git -c format.signoff=false format-patch v${version} --no-numbered --zero-commit --no-signature`.
- patches = lib.optionals nixos-extensions [
- ./0001-Modifies-the-users-module-to-only-set-passwords-of-u.patch
- ./0002-Makes-calamares-search-run-current-system-sw-share-c.patch
- ./0003-Uses-pkexec-within-modules-in-order-to-run-calamares.patch
- ./0004-Adds-unfree-qml-to-packagechooserq.patch
- ./0005-Modifies-finished-module-to-add-some-NixOS-resources.patch
- ./0006-Remove-options-for-unsupported-partition-types.patch
- ./0007-Fix-setting-the-kayboard-layout-on-GNOME-wayland.patch
- ./0008-Change-default-location-where-calamares-searches-for.patch
- ];
-
- nativeBuildInputs = [
- cmake
- extra-cmake-modules
- ];
- buildInputs = [
- boost
- kparts.dev
- kpmcore.out
- kservice.dev
- kirigami2
- libatasmart
- libxcb
- yaml-cpp
- libpwquality
- parted
- polkit-qt
- python3
- qtbase
- qtquickcontrols
- qtsvg
- qttools
- qtwebengine.dev
- util-linux
- ];
-
- cmakeFlags = [
- "-DPYTHON_LIBRARY=${python3}/lib/lib${python3.libPrefix}.so"
- "-DPYTHON_INCLUDE_DIR=${python3}/include/${python3.libPrefix}"
- "-DCMAKE_VERBOSE_MAKEFILE=True"
- "-DWITH_PYTHONQT:BOOL=ON"
- ];
-
- POLKITQT-1_POLICY_FILES_INSTALL_DIR = "$(out)/share/polkit-1/actions";
-
- postPatch = ''
- # Run calamares without root. Other patches make it functional as a normal user
- sed -e "s,pkexec calamares,calamares -D6," \
- -i calamares.desktop
-
- sed -e "s,X-AppStream-Ignore=true,&\nStartupWMClass=calamares," \
- -i calamares.desktop
-
- # Fix desktop reference with wayland
- mv calamares.desktop io.calamares.calamares.desktop
-
- sed -e "s,calamares.desktop,io.calamares.calamares.desktop," \
- -i CMakeLists.txt
-
- sed -e "s,/usr/bin/calamares,$out/bin/calamares," \
- -i com.github.calamares.calamares.policy
-
- sed -e 's,/usr/share/zoneinfo,${tzdata}/share/zoneinfo,' \
- -i src/modules/locale/SetTimezoneJob.cpp \
- -i src/libcalamares/locale/TimeZone.cpp
-
- sed -e 's,/usr/share/X11/xkb/rules/base.lst,${xkeyboard_config}/share/X11/xkb/rules/base.lst,' \
- -i src/modules/keyboard/keyboardwidget/keyboardglobal.cpp
-
- sed -e 's,"ckbcomp","${ckbcomp}/bin/ckbcomp",' \
- -i src/modules/keyboard/keyboardwidget/keyboardpreview.cpp
-
- sed "s,\''${POLKITQT-1_POLICY_FILES_INSTALL_DIR},''${out}/share/polkit-1/actions," \
- -i CMakeLists.txt
- '';
-
- passthru.tests = {
- inherit calamares-nixos;
- };
-
- meta = with lib; {
- description = "Distribution-independent installer framework";
- homepage = "https://calamares.io/";
- license = with licenses; [
- gpl3Plus
- bsd2
- cc0
- ];
- maintainers = with maintainers; [
- manveru
- vlinkz
- ];
- platforms = platforms.linux;
- mainProgram = "calamares";
- };
-}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index a03e666f766c..3fcdeff4544c 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1904,13 +1904,6 @@ with pkgs;
'';
});
- calamares = libsForQt5.callPackage ../tools/misc/calamares {
- boost = boost.override {
- enablePython = true;
- python = python3;
- };
- };
- calamares-nixos = lowPrio (calamares.override { nixos-extensions = true; });
candle = libsForQt5.callPackage ../applications/misc/candle { };
capstone = callPackage ../development/libraries/capstone { };