Ensure that slim's theme applies to slimlock

+38 -46
+9 -21
nixos/modules/services/x11/display-managers/slim.nix
··· 7 dmcfg = config.services.xserver.displayManager; 8 9 cfg = dmcfg.slim; 10 - 11 - slimPackage = cfg.package; 12 13 slimConfig = pkgs.writeText "slim.cfg" 14 '' ··· 35 ln -s * default 36 ''; 37 }; 38 - in if cfg.theme == null then "${slimPackage}/share/slim/themes" else unpackedTheme; 39 40 in 41 ··· 82 the focus is placed on the password. 83 ''; 84 }; 85 - 86 - package = mkOption { 87 - type = types.package; 88 - default = pkgs.slim; 89 - description = '' 90 - Configure slim package. 91 - ''; 92 - example = '' 93 - pkgs.slim.override { 94 - theme = pkgs.fetchurl { 95 - url = http://download.berlios.de/slim/slim-wave.tar.gz; 96 - sha256 = "0ndr419i5myzcylvxb89m9grl2xyq6fbnyc3lkd711mzlmnnfxdy"; 97 - }; 98 - }; 99 - ''; 100 - }; 101 102 autoLogin = mkOption { 103 type = types.bool; ··· 125 { SLIM_CFGFILE = slimConfig; 126 SLIM_THEMESDIR = slimThemesDir; 127 }; 128 - execCmd = "exec ${slimPackage}/bin/slim"; 129 }; 130 131 # Allow null passwords so that the user can login as root on the 132 # installation CD. 133 security.pam.services.slim = { allowNullPassword = true; startSession = true; }; ··· 135 # Allow slimlock to work. 136 security.pam.services.slimlock = {}; 137 138 - environment.systemPackages = [ slimPackage ]; 139 140 }; 141
··· 7 dmcfg = config.services.xserver.displayManager; 8 9 cfg = dmcfg.slim; 10 11 slimConfig = pkgs.writeText "slim.cfg" 12 '' ··· 33 ln -s * default 34 ''; 35 }; 36 + in if cfg.theme == null then "${pkgs.slim}/share/slim/themes" else unpackedTheme; 37 38 in 39 ··· 80 the focus is placed on the password. 81 ''; 82 }; 83 84 autoLogin = mkOption { 85 type = types.bool; ··· 107 { SLIM_CFGFILE = slimConfig; 108 SLIM_THEMESDIR = slimThemesDir; 109 }; 110 + execCmd = "exec ${pkgs.slim}/bin/slim"; 111 }; 112 113 + services.xserver.displayManager.sessionCommands = 114 + '' 115 + # Export the config/themes for slimlock. 116 + export SLIM_THEMESDIR=${slimThemesDir} 117 + ''; 118 + 119 # Allow null passwords so that the user can login as root on the 120 # installation CD. 121 security.pam.services.slim = { allowNullPassword = true; startSession = true; }; ··· 123 # Allow slimlock to work. 124 security.pam.services.slimlock = {}; 125 126 + environment.systemPackages = [ pkgs.slim ]; 127 128 }; 129
+2 -21
pkgs/applications/display-managers/slim/default.nix
··· 1 { stdenv, fetchurl, cmake, pkgconfig, xorg, libjpeg, libpng 2 - , fontconfig, freetype, pam, dbus_libs, makeWrapper, pkgs, theme ? null }: 3 - 4 - let 5 - slimThemesDir = 6 - let 7 - unpackedTheme = pkgs.stdenv.mkDerivation { 8 - name = "slim-theme"; 9 - buildCommand = '' 10 - ensureDir $out 11 - cd $out 12 - unpackFile ${theme} 13 - ln -s * default 14 - ''; 15 - }; 16 - in if theme == null then "$out/share/slim/themes" else unpackedTheme; 17 - in 18 19 stdenv.mkDerivation rec { 20 name = "slim-1.3.6"; ··· 35 ./run-once.patch 36 ]; 37 38 - preConfigure = "substituteInPlace CMakeLists.txt --replace /etc $out/etc --replace /lib $out/lib"; 39 40 cmakeFlags = [ "-DUSE_PAM=1" ]; 41 ··· 46 pam dbus_libs 47 xorg.libX11 xorg.libXext xorg.libXrandr xorg.libXrender xorg.libXmu xorg.libXft makeWrapper 48 ]; 49 - 50 - postInstall = '' 51 - wrapProgram $out/bin/slimlock --set SLIM_THEMESDIR "${slimThemesDir}" --set SLIM_CFGFILE "$out/etc/slim.cfg" 52 - ''; 53 54 NIX_CFLAGS_LINK = "-lXmu"; 55
··· 1 { stdenv, fetchurl, cmake, pkgconfig, xorg, libjpeg, libpng 2 + , fontconfig, freetype, pam, dbus_libs, makeWrapper, pkgs }: 3 4 stdenv.mkDerivation rec { 5 name = "slim-1.3.6"; ··· 20 ./run-once.patch 21 ]; 22 23 + preConfigure = "substituteInPlace CMakeLists.txt --replace /lib $out/lib"; 24 25 cmakeFlags = [ "-DUSE_PAM=1" ]; 26 ··· 31 pam dbus_libs 32 xorg.libX11 xorg.libXext xorg.libXrandr xorg.libXrender xorg.libXmu xorg.libXft makeWrapper 33 ]; 34 35 NIX_CFLAGS_LINK = "-lXmu"; 36
+27 -4
pkgs/applications/display-managers/slim/runtime-paths.patch
··· 1 - diff -ru -x '*~' slim-1.3.6-orig/app.cpp slim-1.3.6/app.cpp 2 --- slim-1.3.6-orig/app.cpp 2013-10-02 00:38:05.000000000 +0200 3 - +++ slim-1.3.6/app.cpp 2013-10-15 11:02:55.629263422 +0200 4 @@ -200,7 +200,9 @@ 5 6 /* Read configuration and theme */ ··· 23 themeName = cfg->getOption("current_theme"); 24 string::size_type pos; 25 if ((pos = themeName.find(",")) != string::npos) { 26 - --- slim-1.3.6-orig/slimlock.cpp 2014-02-05 01:58:01.576560731 +0400 27 - +++ slim-1.3.6/slimlock.cpp 2014-02-05 02:11:16.587634246 +0400 28 @@ -106,13 +106,17 @@ 29 unsigned int cfg_passwd_timeout; 30 // Read user's current theme
··· 1 + diff -ru slim-1.3.6-orig/app.cpp slim-1.3.6/app.cpp 2 --- slim-1.3.6-orig/app.cpp 2013-10-02 00:38:05.000000000 +0200 3 + +++ slim-1.3.6/app.cpp 2014-03-30 19:01:04.115414201 +0200 4 @@ -200,7 +200,9 @@ 5 6 /* Read configuration and theme */ ··· 23 themeName = cfg->getOption("current_theme"); 24 string::size_type pos; 25 if ((pos = themeName.find(",")) != string::npos) { 26 + diff -ru slim-1.3.6-orig/CMakeLists.txt slim-1.3.6/CMakeLists.txt 27 + --- slim-1.3.6-orig/CMakeLists.txt 2013-10-02 00:38:05.000000000 +0200 28 + +++ slim-1.3.6/CMakeLists.txt 2014-03-30 19:16:48.445069729 +0200 29 + @@ -23,7 +23,7 @@ 30 + 31 + set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Installation Directory") 32 + set(PKGDATADIR "${CMAKE_INSTALL_PREFIX}/share/slim") 33 + -set(SYSCONFDIR "/etc") 34 + +set(SYSCONFDIR "$ENV{out}/etc") 35 + set(LIBDIR "/lib") 36 + set(MANDIR "${CMAKE_INSTALL_PREFIX}/share/man") 37 + 38 + @@ -40,7 +40,7 @@ 39 + set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DPACKAGE=\"slim\"") 40 + set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DVERSION=\"${SLIM_VERSION}\"") 41 + set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DPKGDATADIR=\"${PKGDATADIR}\"") 42 + -set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DSYSCONFDIR=\"${SYSCONFDIR}\"") 43 + +set(SLIM_DEFINITIONS ${SLIM_DEFINITIONS} "-DSYSCONFDIR=\"/etc\"") 44 + 45 + # Flags 46 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -O2") 47 + Only in slim-1.3.6: CMakeLists.txt~ 48 + diff -ru slim-1.3.6-orig/slimlock.cpp slim-1.3.6/slimlock.cpp 49 + --- slim-1.3.6-orig/slimlock.cpp 2013-10-02 00:38:05.000000000 +0200 50 + +++ slim-1.3.6/slimlock.cpp 2014-03-30 19:01:04.115414201 +0200 51 @@ -106,13 +106,17 @@ 52 unsigned int cfg_passwd_timeout; 53 // Read user's current theme