From 0e4af0e816cd7ce0b4165616662972bcc472680a Mon Sep 17 00:00:00 2001 From: Victor Fuentes Date: Sat, 30 Jul 2022 18:58:44 -0700 Subject: [PATCH 1/4] calamares: add locale path patch --- pkgs/tools/misc/calamares/default.nix | 2 ++ pkgs/tools/misc/calamares/supportedlocale.patch | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 pkgs/tools/misc/calamares/supportedlocale.patch diff --git a/pkgs/tools/misc/calamares/default.nix b/pkgs/tools/misc/calamares/default.nix index 22b5cde7f451..34d05852a7e8 100644 --- a/pkgs/tools/misc/calamares/default.nix +++ b/pkgs/tools/misc/calamares/default.nix @@ -36,6 +36,8 @@ mkDerivation rec { # Fix setting the kayboard layout on GNOME wayland # By default the module uses the setxkbmap, which will not change the keyboard ./waylandkbd.patch + # Change default location where calamares searches for locales + ./supportedlocale.patch ]; nativeBuildInputs = [ cmake extra-cmake-modules ]; diff --git a/pkgs/tools/misc/calamares/supportedlocale.patch b/pkgs/tools/misc/calamares/supportedlocale.patch new file mode 100644 index 000000000000..ab161ffdee7c --- /dev/null +++ b/pkgs/tools/misc/calamares/supportedlocale.patch @@ -0,0 +1,13 @@ +diff --git a/src/modules/locale/Config.cpp b/src/modules/locale/Config.cpp +index 2357019a7..75b547430 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 ) ) From 40ade45200726769ce94a4f73a2a553f5373874d Mon Sep 17 00:00:00 2001 From: Victor Fuentes Date: Sat, 30 Jul 2022 18:59:17 -0700 Subject: [PATCH 2/4] glib-locales: store SUPPORTED locales file --- pkgs/development/libraries/glibc/locales.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/glibc/locales.nix b/pkgs/development/libraries/glibc/locales.nix index d2cf0f89cb07..ed6f0a5b32ca 100644 --- a/pkgs/development/libraries/glibc/locales.nix +++ b/pkgs/development/libraries/glibc/locales.nix @@ -64,8 +64,9 @@ callPackage ./common.nix { inherit stdenv; } { installPhase = '' - mkdir -p "$out/lib/locale" + mkdir -p "$out/lib/locale" "$out/share/i18n" cp -v "$TMPDIR/$NIX_STORE/"*"/lib/locale/locale-archive" "$out/lib/locale" + cp -v ../glibc-2*/localedata/SUPPORTED "$out/share/i18n/SUPPORTED" ''; setupHook = writeText "locales-setup-hook.sh" From f4e541427e33c16c7e574c3b5606d214e7a981c9 Mon Sep 17 00:00:00 2001 From: Victor Fuentes Date: Sat, 30 Jul 2022 18:59:52 -0700 Subject: [PATCH 3/4] calamares-cd: default supporting all locales --- .../installer/cd-dvd/installation-cd-graphical-calamares.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares.nix b/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares.nix index 8a6d30d1801a..288cbc94a321 100644 --- a/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares.nix +++ b/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares.nix @@ -16,5 +16,10 @@ in calamares-nixos-extensions # Needed for calamares QML module packagechooserq libsForQt5.full + # Get list of locales + glibcLocales ]; + + # Support choosing from any locale + i18n.supportedLocales = [ "all" ]; } From 57abb43cfccac8cc2eef14129201f977a162e6b2 Mon Sep 17 00:00:00 2001 From: Victor Fuentes Date: Sat, 30 Jul 2022 19:02:59 -0700 Subject: [PATCH 4/4] calamares-nixos-extensions: 0.3.10 -> 0.3.11 --- pkgs/tools/misc/calamares-nixos-extensions/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/calamares-nixos-extensions/default.nix b/pkgs/tools/misc/calamares-nixos-extensions/default.nix index a587cd585e1a..ad21c398fe9f 100644 --- a/pkgs/tools/misc/calamares-nixos-extensions/default.nix +++ b/pkgs/tools/misc/calamares-nixos-extensions/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "calamares-nixos-extensions"; - version = "0.3.10"; + version = "0.3.11"; src = fetchFromGitHub { owner = "NixOS"; repo = "calamares-nixos-extensions"; rev = version; - sha256 = "YJyK0rsrftrCwYD+aCAkPe/kAqUXsP/4WBAGtNKIGj8="; + sha256 = "NAHUU0tQLu8c2dke1V0aM3mHrNgM8ekHSB2Fo9dQUk8="; }; installPhase = ''