about summary refs log tree commit diff
path: root/pkgs/applications/display-managers/sddm/default.nix
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2023-06-23 17:41:57 +0300
committerK900 <me@0upti.me>2023-07-07 12:46:59 +0300
commitc0132f22e935dbce8476fff255b3daf9f6e24ec3 (patch)
tree85418238b056d414384db974574dacb421803b69 /pkgs/applications/display-managers/sddm/default.nix
parent4f91766e8c58501176aa67e34a460e588f9a56fb (diff)
sddm: 0.19.0 -> 0.20.0
Diffstat (limited to 'pkgs/applications/display-managers/sddm/default.nix')
-rw-r--r--pkgs/applications/display-managers/sddm/default.nix59
1 files changed, 25 insertions, 34 deletions
diff --git a/pkgs/applications/display-managers/sddm/default.nix b/pkgs/applications/display-managers/sddm/default.nix
index 7a8f16ef1b143..04826274bb695 100644
--- a/pkgs/applications/display-managers/sddm/default.nix
+++ b/pkgs/applications/display-managers/sddm/default.nix
@@ -1,59 +1,44 @@
-{ mkDerivation, lib, fetchFromGitHub, fetchpatch
-, cmake, extra-cmake-modules, pkg-config, libxcb, libpthreadstubs
-, libXdmcp, libXau, qtbase, qtdeclarative, qtquickcontrols2, qttools, pam, systemd
+{ mkDerivation, lib, fetchFromGitHub
+, cmake, extra-cmake-modules, pkg-config, qttools
+, libxcb, libXau, pam, qtbase, qtdeclarative, qtquickcontrols2, systemd, xkeyboardconfig
 }:
-
-let
-  version = "0.19.0";
-
-in mkDerivation {
+mkDerivation rec {
   pname = "sddm";
-  inherit version;
+  version = "0.20.0";
 
   src = fetchFromGitHub {
     owner = "sddm";
     repo = "sddm";
     rev = "v${version}";
-    sha256 = "1s6icb5r1n6grfs137gdzfrcvwsb3hvlhib2zh6931x8pkl1qvxa";
+    hash = "sha256-ctZln1yQov+p/outkQhcWZp46IKITC04e22RfePwEM4=";
   };
 
   patches = [
     ./sddm-ignore-config-mtime.patch
     ./sddm-default-session.patch
-    # Load `/etc/profile` for `environment.variables` with zsh default shell.
-    # See: https://github.com/sddm/sddm/pull/1382
-    (fetchpatch {
-      url = "https://github.com/sddm/sddm/commit/e1dedeeab6de565e043f26ac16033e613c222ef9.patch";
-      sha256 = "sha256-OPyrUI3bbH+PGDBfoL4Ohb4wIvmy9TeYZhE0JxR/D58=";
-    })
-    # Fix build with Qt 5.15.3
-    # See: https://github.com/sddm/sddm/pull/1325
-    (fetchpatch {
-      url = "https://github.com/sddm/sddm/commit/e93bf95c54ad8c2a1604f8d7be05339164b19308.patch";
-      sha256 = "sha256:1rh6sdvzivjcl5b05fczarvxhgpjhi7019hvf2gadnwgwdg104r4";
-    })
-    # Fix fails to start while starting X server
-    # See: https://github.com/sddm/sddm/pull/1324
-    (fetchpatch {
-      url = "https://github.com/sddm/sddm/commit/adfaa222fdfa6115ea2b320b0bbc2126db9270a5.patch";
-      sha256 = "sha256-q/YLlAjxluzHMKUUQglLo3RyyhERQGPHXGr56+4R9VU=";
-    })
   ];
 
-  postPatch =
-    # Fix missing include for gettimeofday()
-    ''
-      sed -e '1i#include <sys/time.h>' -i src/helper/HelperApp.cpp
-    '';
+  postPatch = ''
+    substituteInPlace src/greeter/waylandkeyboardbackend.cpp \
+      --replace "/usr/share/X11/xkb/rules/evdev.xml" "${xkeyboardconfig}/share/X11/xkb/rules/evdev.xml"
+  '';
 
   nativeBuildInputs = [ cmake extra-cmake-modules pkg-config qttools ];
 
   buildInputs = [
-    libxcb libpthreadstubs libXdmcp libXau pam qtbase qtdeclarative qtquickcontrols2 systemd
+    libxcb
+    libXau
+    pam
+    qtbase
+    qtdeclarative
+    qtquickcontrols2
+    systemd
   ];
 
   cmakeFlags = [
     "-DCONFIG_FILE=/etc/sddm.conf"
+    "-DCONFIG_DIR=/etc/sddm.conf.d"
+
     # Set UID_MIN and UID_MAX so that the build script won't try
     # to read them from /etc/login.defs (fails in chroot).
     # The values come from NixOS; they may not be appropriate
@@ -62,9 +47,15 @@ in mkDerivation {
     "-DUID_MIN=1000"
     "-DUID_MAX=29999"
 
+    # we still want to run the DM on VT 7 for the time being, as 1-6 are
+    # occupied by getties by default
+    "-DSDDM_INITIAL_VT=7"
+
     "-DQT_IMPORTS_DIR=${placeholder "out"}/${qtbase.qtQmlPrefix}"
     "-DCMAKE_INSTALL_SYSCONFDIR=${placeholder "out"}/etc"
     "-DSYSTEMD_SYSTEM_UNIT_DIR=${placeholder "out"}/lib/systemd/system"
+    "-DSYSTEMD_SYSUSERS_DIR=${placeholder "out"}/lib/sysusers.d"
+    "-DSYSTEMD_TMPFILES_DIR=${placeholder "out"}/lib/tmpfiles.d"
     "-DDBUS_CONFIG_DIR=${placeholder "out"}/share/dbus-1/system.d"
   ];