diff --git a/pkgs/applications/display-managers/sddm/sddm-ignore-config-mtime.patch b/pkgs/applications/display-managers/sddm/0001-ignore-config-mtime.patch similarity index 60% rename from pkgs/applications/display-managers/sddm/sddm-ignore-config-mtime.patch rename to pkgs/applications/display-managers/sddm/0001-ignore-config-mtime.patch index 9edd9a7b5382..836df2de292d 100644 --- a/pkgs/applications/display-managers/sddm/sddm-ignore-config-mtime.patch +++ b/pkgs/applications/display-managers/sddm/0001-ignore-config-mtime.patch @@ -1,8 +1,17 @@ +From e9d82bfbc49993a5be2c93f6b72a969630587f26 Mon Sep 17 00:00:00 2001 +From: Thomas Tuegel +Date: Mon, 23 Nov 2015 06:56:28 -0600 +Subject: [PATCH 1/2] ignore config mtime + +--- + src/common/ConfigReader.cpp | 5 ----- + 1 file changed, 5 deletions(-) + diff --git a/src/common/ConfigReader.cpp b/src/common/ConfigReader.cpp -index 6618455..5356e76 100644 +index cfc9940..5bf5a6a 100644 --- a/src/common/ConfigReader.cpp +++ b/src/common/ConfigReader.cpp -@@ -136,11 +136,6 @@ namespace SDDM { +@@ -138,11 +138,6 @@ namespace SDDM { QString currentSection = QStringLiteral(IMPLICIT_SECTION); QFile in(m_path); @@ -14,3 +23,6 @@ index 6618455..5356e76 100644 in.open(QIODevice::ReadOnly); while (!in.atEnd()) { +-- +2.6.3 + diff --git a/pkgs/applications/display-managers/sddm/0002-fix-ConfigReader-QStringList-corruption.patch b/pkgs/applications/display-managers/sddm/0002-fix-ConfigReader-QStringList-corruption.patch new file mode 100644 index 000000000000..ad5dcbc472db --- /dev/null +++ b/pkgs/applications/display-managers/sddm/0002-fix-ConfigReader-QStringList-corruption.patch @@ -0,0 +1,26 @@ +From 7a18f4cb77c567dec9ad924fcc76c50092de6ee7 Mon Sep 17 00:00:00 2001 +From: Thomas Tuegel +Date: Mon, 23 Nov 2015 06:57:51 -0600 +Subject: [PATCH 2/2] fix ConfigReader QStringList corruption + +--- + src/common/ConfigReader.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/common/ConfigReader.cpp b/src/common/ConfigReader.cpp +index 5bf5a6a..34182e6 100644 +--- a/src/common/ConfigReader.cpp ++++ b/src/common/ConfigReader.cpp +@@ -30,7 +30,8 @@ + + QTextStream &operator>>(QTextStream &str, QStringList &list) { + list.clear(); +- foreach(const QStringRef &s, str.readLine().splitRef(QLatin1Char(','))) ++ QString line = str.readLine(); ++ foreach(const QStringRef &s, line.splitRef(QLatin1Char(','))) + { + QStringRef trimmed = s.trimmed(); + if (!trimmed.isEmpty()) +-- +2.6.3 + diff --git a/pkgs/applications/display-managers/sddm/default.nix b/pkgs/applications/display-managers/sddm/default.nix index 5851f1af6390..dc891605d1b6 100644 --- a/pkgs/applications/display-managers/sddm/default.nix +++ b/pkgs/applications/display-managers/sddm/default.nix @@ -14,7 +14,10 @@ stdenv.mkDerivation rec { sha256 = "0c3q8lpb123m9k5x3i71mm8lmyzhknw77zxh89yfl8qmn6zd61i1"; }; - patches = [ ./sddm-ignore-config-mtime.patch ]; + patches = [ + ./0001-ignore-config-mtime.patch + ./0002-fix-ConfigReader-QStringList-corruption.patch + ]; nativeBuildInputs = [ cmake makeQtWrapper pkgconfig qttools ];