uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
|
|
@ -0,0 +1,71 @@
|
|||
{ lib, stdenv, fetchFromGitHub, pkg-config, linkFarm, lightdm-enso-os-greeter
|
||||
, dbus, pcre, libepoxy, libXdmcp, at-spi2-core, libxklavier, libxkbcommon, libpthreadstubs
|
||||
, gtk3, vala, cmake, libgee, libX11, lightdm, gdk-pixbuf, clutter-gtk, wrapGAppsHook, librsvg }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "lightdm-enso-os-greeter";
|
||||
version = "0.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nick92";
|
||||
repo = "Enso-OS";
|
||||
rev = "ed48330bfd986072bd82ac542ed8f8a7365c6427";
|
||||
sha256 = "sha256-v79J5KyjeJ99ifN7nK/B+J7f292qDAEHsmsHLAMKVYY=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./fix-paths.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
vala
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
dbus
|
||||
gtk3
|
||||
pcre
|
||||
libepoxy
|
||||
libgee
|
||||
libX11
|
||||
lightdm
|
||||
libXdmcp
|
||||
gdk-pixbuf
|
||||
clutter-gtk
|
||||
libxklavier
|
||||
at-spi2-core
|
||||
libxkbcommon
|
||||
libpthreadstubs
|
||||
librsvg
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
cd greeter
|
||||
'';
|
||||
|
||||
passthru.xgreeters = linkFarm "enso-os-greeter-xgreeters" [{
|
||||
path = "${lightdm-enso-os-greeter}/share/xgreeters/pantheon-greeter.desktop";
|
||||
name = "pantheon-greeter.desktop";
|
||||
}];
|
||||
|
||||
postFixup = ''
|
||||
substituteInPlace $out/share/xgreeters/pantheon-greeter.desktop \
|
||||
--replace "pantheon-greeter" "$out/bin/pantheon-greeter"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = ''
|
||||
A fork of pantheon greeter that positions elements in a central and
|
||||
vertigal manner and adds a blur effect to the background
|
||||
'';
|
||||
homepage = "https://github.com/nick92/Enso-OS";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [
|
||||
eadwu
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
diff --git a/greeter/CMakeLists.txt b/greeter/CMakeLists.txt
|
||||
index 57aebb0..ab50bff 100644
|
||||
--- a/greeter/CMakeLists.txt
|
||||
+++ b/greeter/CMakeLists.txt
|
||||
@@ -9,7 +9,6 @@ list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
||||
set (CONF_DIR "/etc/lightdm")
|
||||
set (DATADIR "${CMAKE_INSTALL_PREFIX}/share")
|
||||
set (PKGDATADIR "${DATADIR}/enso/greeter")
|
||||
-set (CMAKE_INSTALL_PREFIX /usr)
|
||||
set (VERSION "1.0.6")
|
||||
|
||||
|
||||
@@ -94,9 +93,9 @@ glib_compile_resources (GLIB_RESOURCES_CSS SOURCE data/css.gresource.xml)
|
||||
add_executable (pantheon-greeter ${VALA_C} ${GLIB_RESOURCES_CSS})
|
||||
target_link_libraries(pantheon-greeter m)
|
||||
|
||||
-install (TARGETS pantheon-greeter RUNTIME DESTINATION sbin)
|
||||
+install (TARGETS pantheon-greeter RUNTIME DESTINATION bin)
|
||||
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/pantheon-greeter.desktop DESTINATION share/xgreeters)
|
||||
-install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/greeter.conf DESTINATION ${CONF_DIR})
|
||||
+install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/greeter.conf DESTINATION etc/lightdm)
|
||||
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/fingerprint.svg DESTINATION ${PKGDATADIR})
|
||||
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/power.svg DESTINATION ${PKGDATADIR})
|
||||
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/checked.svg DESTINATION ${PKGDATADIR})
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
{ lib, stdenv, linkFarm, lightdm-mini-greeter, fetchFromGitHub, autoreconfHook, pkg-config, lightdm, gtk3, glib, gdk-pixbuf, wrapGAppsHook, librsvg }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lightdm-mini-greeter";
|
||||
version = "0.5.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "prikhi";
|
||||
repo = "lightdm-mini-greeter";
|
||||
rev = version;
|
||||
sha256 = "sha256-Pm7ExfusFIPktX2C4UE07qgOVhcWhVxnaD3QARpmu7Y=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config wrapGAppsHook ];
|
||||
buildInputs = [ lightdm gtk3 glib gdk-pixbuf librsvg ];
|
||||
|
||||
configureFlags = [ "--sysconfdir=/etc" ];
|
||||
makeFlags = [ "configdir=${placeholder "out"}/etc" ];
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace "$out/share/xgreeters/lightdm-mini-greeter.desktop" \
|
||||
--replace "Exec=lightdm-mini-greeter" "Exec=$out/bin/lightdm-mini-greeter"
|
||||
'';
|
||||
|
||||
passthru.xgreeters = linkFarm "lightdm-mini-greeter-xgreeters" [{
|
||||
path = "${lightdm-mini-greeter}/share/xgreeters/lightdm-mini-greeter.desktop";
|
||||
name = "lightdm-mini-greeter.desktop";
|
||||
}];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A minimal, configurable, single-user GTK3 LightDM greeter";
|
||||
homepage = "https://github.com/prikhi/lightdm-mini-greeter";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ mnacamura prikhi ];
|
||||
platforms = platforms.linux;
|
||||
changelog = "https://github.com/prikhi/lightdm-mini-greeter/blob/master/CHANGELOG.md";
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
{ lib, stdenv, linkFarm, lightdm-tiny-greeter, fetchFromGitHub
|
||||
, pkg-config, lightdm, gtk3, glib, wrapGAppsHook, conf ? "" }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lightdm-tiny-greeter";
|
||||
version = "1.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "off-world";
|
||||
repo = "lightdm-tiny-greeter";
|
||||
rev = version;
|
||||
sha256 = "08azpj7b5qgac9bgi1xvd6qy6x2nb7iapa0v40ggr3d1fabyhrg6";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config wrapGAppsHook ];
|
||||
buildInputs = [ lightdm gtk3 glib ];
|
||||
|
||||
postUnpack = if conf != "" then ''
|
||||
cp ${builtins.toFile "config.h" conf} source/config.h
|
||||
'' else "";
|
||||
|
||||
buildPhase = ''
|
||||
mkdir -p $out/bin $out/share/xgreeters
|
||||
make ${pname}
|
||||
mv ${pname} $out/bin/.
|
||||
mv lightdm-tiny-greeter.desktop $out/share/xgreeters
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
substituteInPlace "$out/share/xgreeters/lightdm-tiny-greeter.desktop" \
|
||||
--replace "Exec=lightdm-tiny-greeter" "Exec=$out/bin/lightdm-tiny-greeter"
|
||||
'';
|
||||
|
||||
passthru.xgreeters = linkFarm "lightdm-tiny-greeter-xgreeters" [{
|
||||
path = "${lightdm-tiny-greeter}/share/xgreeters/lightdm-tiny-greeter.desktop";
|
||||
name = "lightdm-tiny-greeter.desktop";
|
||||
}];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A tiny multi user lightdm greeter";
|
||||
homepage = "https://github.com/off-world/lightdm-tiny-greeter";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ edwtjo ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
147
pkgs/applications/display-managers/lightdm/default.nix
Normal file
147
pkgs/applications/display-managers/lightdm/default.nix
Normal file
|
|
@ -0,0 +1,147 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, nix-update-script
|
||||
, substituteAll
|
||||
, plymouth
|
||||
, pam
|
||||
, pkg-config
|
||||
, autoconf
|
||||
, automake
|
||||
, libtool
|
||||
, libxcb
|
||||
, glib
|
||||
, libXdmcp
|
||||
, itstool
|
||||
, intltool
|
||||
, libxklavier
|
||||
, libgcrypt
|
||||
, audit
|
||||
, busybox
|
||||
, polkit
|
||||
, accountsservice
|
||||
, gtk-doc
|
||||
, gnome
|
||||
, gobject-introspection
|
||||
, vala
|
||||
, fetchpatch
|
||||
, withQt4 ? false
|
||||
, qt4
|
||||
, withQt5 ? false
|
||||
, qtbase
|
||||
, yelp-tools
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lightdm";
|
||||
version = "1.30.0";
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "CanonicalLtd";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0i1yygmjbkdjnqdl9jn8zsa1mfs2l19qc4k2capd8q1ndhnjm2dx";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf
|
||||
automake
|
||||
yelp-tools
|
||||
gnome.yelp-xsl
|
||||
gobject-introspection
|
||||
gtk-doc
|
||||
intltool
|
||||
itstool
|
||||
libtool
|
||||
pkg-config
|
||||
vala
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
accountsservice
|
||||
audit
|
||||
glib
|
||||
libXdmcp
|
||||
libgcrypt
|
||||
libxcb
|
||||
libxklavier
|
||||
pam
|
||||
polkit
|
||||
] ++ optional withQt4 qt4
|
||||
++ optional withQt5 qtbase;
|
||||
|
||||
patches = [
|
||||
# Adds option to disable writing dmrc files
|
||||
(fetchpatch {
|
||||
url = "https://src.fedoraproject.org/rpms/lightdm/raw/4cf0d2bed8d1c68970b0322ccd5dbbbb7a0b12bc/f/lightdm-1.25.1-disable_dmrc.patch";
|
||||
sha256 = "06f7iabagrsiws2l75sx2jyljknr9js7ydn151p3qfi104d1541n";
|
||||
})
|
||||
|
||||
# Don't use etc/dbus-1/system.d
|
||||
(fetchpatch {
|
||||
url = "https://github.com/canonical/lightdm/commit/a99376f5f51aa147aaf81287d7ce70db76022c47.patch";
|
||||
sha256 = "1zyx1qqajrmqcf9hbsapd39gmdanswd9l78rq7q6rdy4692il3yn";
|
||||
})
|
||||
|
||||
# https://github.com/canonical/lightdm/pull/104
|
||||
(fetchpatch {
|
||||
url = "https://github.com/canonical/lightdm/commit/03f218981733e50d810767f9d04e42ee156f7feb.patch";
|
||||
sha256 = "07w18m2gpk29z6ym4y3lzsmg5dk3ffn39sq6lac26ap7narf4ma7";
|
||||
})
|
||||
|
||||
# Hardcode plymouth to fix transitions.
|
||||
# For some reason it can't find `plymouth`
|
||||
# even when it's in PATH in environment.systemPackages.
|
||||
(substituteAll {
|
||||
src = ./fix-paths.patch;
|
||||
plymouth = "${plymouth}/bin/plymouth";
|
||||
})
|
||||
];
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
preConfigure = "NOCONFIGURE=1 ./autogen.sh";
|
||||
|
||||
configureFlags = [
|
||||
"--localstatedir=/var"
|
||||
"--sysconfdir=/etc"
|
||||
"--disable-tests"
|
||||
"--disable-dmrc"
|
||||
] ++ optional withQt4 "--enable-liblightdm-qt"
|
||||
++ optional withQt5 "--enable-liblightdm-qt5";
|
||||
|
||||
installFlags = [
|
||||
"sysconfdir=${placeholder "out"}/etc"
|
||||
"localstatedir=\${TMPDIR}"
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace autogen.sh \
|
||||
--replace "which" "${busybox}/bin/which"
|
||||
|
||||
substituteInPlace src/shared-data-manager.c \
|
||||
--replace /bin/rm ${busybox}/bin/rm
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
rm -rf $out/etc/apparmor.d $out/etc/init $out/etc/pam.d
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script {
|
||||
attrPath = pname;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/CanonicalLtd/lightdm";
|
||||
description = "A cross-desktop display manager";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ ] ++ teams.pantheon.members;
|
||||
};
|
||||
}
|
||||
13
pkgs/applications/display-managers/lightdm/fix-paths.patch
Normal file
13
pkgs/applications/display-managers/lightdm/fix-paths.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/src/plymouth.c b/src/plymouth.c
|
||||
index d1ed91f4..318f9409 100644
|
||||
--- a/src/plymouth.c
|
||||
+++ b/src/plymouth.c
|
||||
@@ -24,7 +24,7 @@ static gboolean has_active_vt = FALSE;
|
||||
static gboolean
|
||||
plymouth_run_command (const gchar *command, gint *exit_status)
|
||||
{
|
||||
- g_autofree gchar *command_line = g_strdup_printf ("plymouth %s", command);
|
||||
+ g_autofree gchar *command_line = g_strdup_printf ("@plymouth@ %s", command);
|
||||
g_autoptr(GError) error = NULL;
|
||||
gboolean result = g_spawn_command_line_sync (command_line, NULL, NULL, exit_status, &error);
|
||||
|
||||
79
pkgs/applications/display-managers/lightdm/gtk-greeter.nix
Normal file
79
pkgs/applications/display-managers/lightdm/gtk-greeter.nix
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
{ lib, stdenv
|
||||
, lightdm_gtk_greeter
|
||||
, fetchurl
|
||||
, lightdm
|
||||
, pkg-config
|
||||
, intltool
|
||||
, linkFarm
|
||||
, wrapGAppsHook
|
||||
, useGTK2 ? false
|
||||
, gtk2
|
||||
, gtk3 # gtk3 seems better supported
|
||||
, xfce4-dev-tools
|
||||
, at-spi2-core
|
||||
, librsvg
|
||||
, hicolor-icon-theme
|
||||
}:
|
||||
|
||||
#ToDo: bad icons with gtk2;
|
||||
# avatar icon is missing in standard hicolor theme, I don't know where gtk3 takes it from
|
||||
|
||||
let
|
||||
ver_branch = "2.0";
|
||||
version = "2.0.7";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lightdm-gtk-greeter";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "${meta.homepage}/${ver_branch}/${version}/+download/${pname}-${version}.tar.gz";
|
||||
sha256 = "1g7wc3d3vqfa7mrdhx1w9ywydgjbffla6rbrxq9k3sc62br97qms";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config intltool xfce4-dev-tools wrapGAppsHook ];
|
||||
buildInputs = [ lightdm librsvg hicolor-icon-theme ]
|
||||
++ (if useGTK2 then [ gtk2 ] else [ gtk3 ]);
|
||||
|
||||
configureFlags = [
|
||||
"--localstatedir=/var"
|
||||
"--sysconfdir=/etc"
|
||||
"--disable-indicator-services-command"
|
||||
"--sbindir=${placeholder "out"}/bin" # for wrapGAppsHook to wrap automatically
|
||||
] ++ lib.optional useGTK2 "--with-gtk2";
|
||||
|
||||
postPatch = ''
|
||||
# exo-csource has been dropped from exo, and replaced by xdt-csource from xfce4-dev-tools
|
||||
for f in configure.ac src/Makefile.am; do
|
||||
substituteInPlace $f --replace exo-csource xdt-csource
|
||||
done
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
configureFlagsArray+=( --enable-at-spi-command="${at-spi2-core}/libexec/at-spi-bus-launcher --launch-immediately" )
|
||||
'';
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
|
||||
|
||||
installFlags = [
|
||||
"localstatedir=\${TMPDIR}"
|
||||
"sysconfdir=${placeholder "out"}/etc"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace "$out/share/xgreeters/lightdm-gtk-greeter.desktop" \
|
||||
--replace "Exec=lightdm-gtk-greeter" "Exec=$out/bin/lightdm-gtk-greeter"
|
||||
'';
|
||||
|
||||
passthru.xgreeters = linkFarm "lightdm-gtk-greeter-xgreeters" [{
|
||||
path = "${lightdm_gtk_greeter}/share/xgreeters/lightdm-gtk-greeter.desktop";
|
||||
name = "lightdm-gtk-greeter.desktop";
|
||||
}];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://launchpad.net/lightdm-gtk-greeter";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
29
pkgs/applications/display-managers/ly/default.nix
Normal file
29
pkgs/applications/display-managers/ly/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ stdenv, lib, fetchFromGitHub, linux-pam }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ly";
|
||||
version = "0.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cylgom";
|
||||
repo = "ly";
|
||||
rev = version;
|
||||
sha256 = "16gjcrd4a6i4x8q8iwlgdildm7cpdsja8z22pf2izdm6rwfki97d";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
buildInputs = [ linux-pam ];
|
||||
makeFlags = [ "FLAGS=-Wno-error" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp bin/ly $out/bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "TUI display manager";
|
||||
license = licenses.wtfpl;
|
||||
homepage = "https://github.com/cylgom/ly";
|
||||
maintainers = [ maintainers.vidister ];
|
||||
};
|
||||
}
|
||||
81
pkgs/applications/display-managers/sddm/default.nix
Normal file
81
pkgs/applications/display-managers/sddm/default.nix
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
{ mkDerivation, lib, fetchFromGitHub, fetchpatch
|
||||
, cmake, extra-cmake-modules, pkg-config, libxcb, libpthreadstubs
|
||||
, libXdmcp, libXau, qtbase, qtdeclarative, qtquickcontrols2, qttools, pam, systemd
|
||||
}:
|
||||
|
||||
let
|
||||
version = "0.19.0";
|
||||
|
||||
in mkDerivation {
|
||||
pname = "sddm";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sddm";
|
||||
repo = "sddm";
|
||||
rev = "v${version}";
|
||||
sha256 = "1s6icb5r1n6grfs137gdzfrcvwsb3hvlhib2zh6931x8pkl1qvxa";
|
||||
};
|
||||
|
||||
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";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch =
|
||||
# Fix missing include for gettimeofday()
|
||||
''
|
||||
sed -e '1i#include <sys/time.h>' -i src/helper/HelperApp.cpp
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake extra-cmake-modules pkg-config qttools ];
|
||||
|
||||
buildInputs = [
|
||||
libxcb libpthreadstubs libXdmcp libXau pam qtbase qtdeclarative qtquickcontrols2 systemd
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCONFIG_FILE=/etc/sddm.conf"
|
||||
# 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
|
||||
# for running SDDM outside NixOS, but that configuration is
|
||||
# not supported anyway.
|
||||
"-DUID_MIN=1000"
|
||||
"-DUID_MAX=29999"
|
||||
|
||||
"-DQT_IMPORTS_DIR=${placeholder "out"}/${qtbase.qtQmlPrefix}"
|
||||
"-DCMAKE_INSTALL_SYSCONFDIR=${placeholder "out"}/etc"
|
||||
"-DSYSTEMD_SYSTEM_UNIT_DIR=${placeholder "out"}/lib/systemd/system"
|
||||
"-DDBUS_CONFIG_DIR=${placeholder "out"}/share/dbus-1/system.d"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
# remove empty scripts
|
||||
rm "$out/share/sddm/scripts/Xsetup" "$out/share/sddm/scripts/Xstop"
|
||||
for f in $out/share/sddm/themes/**/theme.conf ; do
|
||||
substituteInPlace $f \
|
||||
--replace 'background=' "background=$(dirname $f)/"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "QML based X11 display manager";
|
||||
homepage = "https://github.com/sddm/sddm";
|
||||
maintainers = with maintainers; [ abbradar ttuegel ];
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl2Plus;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
diff --git a/src/common/Configuration.h b/src/common/Configuration.h
|
||||
index cf44a62..7bb9c03 100644
|
||||
--- a/src/common/Configuration.h
|
||||
+++ b/src/common/Configuration.h
|
||||
@@ -44,6 +44,7 @@ namespace SDDM {
|
||||
"NOTE: Currently ignored if autologin is enabled."));
|
||||
Entry(InputMethod, QString, QStringLiteral("qtvirtualkeyboard"), _S("Input method module"));
|
||||
Entry(Namespaces, QStringList, QStringList(), _S("Comma-separated list of Linux namespaces for user session to enter"));
|
||||
+ Entry(DefaultSession, QString, QString(), _S("System-wide default session"));
|
||||
// Name Entries (but it's a regular class again)
|
||||
Section(Theme,
|
||||
Entry(ThemeDir, QString, _S(DATA_INSTALL_DIR "/themes"), _S("Theme directory path"));
|
||||
diff --git a/src/greeter/SessionModel.cpp b/src/greeter/SessionModel.cpp
|
||||
index 1953c76..54fe2f2 100644
|
||||
--- a/src/greeter/SessionModel.cpp
|
||||
+++ b/src/greeter/SessionModel.cpp
|
||||
@@ -43,6 +43,7 @@ namespace SDDM {
|
||||
beginResetModel();
|
||||
populate(Session::WaylandSession, mainConfig.Wayland.SessionDir.get());
|
||||
populate(Session::X11Session, mainConfig.X11.SessionDir.get());
|
||||
+ selectDefaultSession();
|
||||
endResetModel();
|
||||
|
||||
// refresh everytime a file is changed, added or removed
|
||||
@@ -52,6 +53,7 @@ namespace SDDM {
|
||||
d->sessions.clear();
|
||||
populate(Session::WaylandSession, mainConfig.Wayland.SessionDir.get());
|
||||
populate(Session::X11Session, mainConfig.X11.SessionDir.get());
|
||||
+ selectDefaultSession();
|
||||
endResetModel();
|
||||
});
|
||||
watcher->addPath(mainConfig.Wayland.SessionDir.get());
|
||||
@@ -149,11 +151,25 @@ namespace SDDM {
|
||||
else
|
||||
delete si;
|
||||
}
|
||||
+ }
|
||||
+
|
||||
+ void SessionModel::selectDefaultSession() {
|
||||
+ d->lastIndex = 0;
|
||||
+
|
||||
// find out index of the last session
|
||||
for (int i = 0; i < d->sessions.size(); ++i) {
|
||||
if (d->sessions.at(i)->fileName() == stateConfig.Last.Session.get()) {
|
||||
d->lastIndex = i;
|
||||
- break;
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // Otherwise, fallback to system-wide default session.
|
||||
+ auto defaultSession = mainConfig.DefaultSession.get();
|
||||
+ for (int i = 0; i < d->sessions.size(); ++i) {
|
||||
+ if (QFileInfo(d->sessions.at(i)->fileName()).fileName() == defaultSession) {
|
||||
+ d->lastIndex = i;
|
||||
+ return;
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/src/greeter/SessionModel.h b/src/greeter/SessionModel.h
|
||||
index 2e2efa9..a93315c 100644
|
||||
--- a/src/greeter/SessionModel.h
|
||||
+++ b/src/greeter/SessionModel.h
|
||||
@@ -58,6 +58,7 @@ namespace SDDM {
|
||||
SessionModelPrivate *d { nullptr };
|
||||
|
||||
void populate(Session::Type type, const QString &path);
|
||||
+ void selectDefaultSession();
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
diff --git a/src/common/ConfigReader.cpp b/src/common/ConfigReader.cpp
|
||||
index 041e5ed..efb1324 100644
|
||||
--- a/src/common/ConfigReader.cpp
|
||||
+++ b/src/common/ConfigReader.cpp
|
||||
@@ -148,17 +148,14 @@ namespace SDDM {
|
||||
// * m_path (classic fallback /etc/sddm.conf)
|
||||
|
||||
QStringList files;
|
||||
- QDateTime latestModificationTime = QFileInfo(m_path).lastModified();
|
||||
|
||||
if (!m_sysConfigDir.isEmpty()) {
|
||||
//include the configDir in modification time so we also reload on any files added/removed
|
||||
QDir dir(m_sysConfigDir);
|
||||
if (dir.exists()) {
|
||||
- latestModificationTime = std::max(latestModificationTime, QFileInfo(m_sysConfigDir).lastModified());
|
||||
const auto dirFiles = dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot, QDir::LocaleAware);
|
||||
for (const QFileInfo &file : dirFiles) {
|
||||
files << (file.absoluteFilePath());
|
||||
- latestModificationTime = std::max(latestModificationTime, file.lastModified());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -166,22 +163,15 @@ namespace SDDM {
|
||||
//include the configDir in modification time so we also reload on any files added/removed
|
||||
QDir dir(m_configDir);
|
||||
if (dir.exists()) {
|
||||
- latestModificationTime = std::max(latestModificationTime, QFileInfo(m_configDir).lastModified());
|
||||
const auto dirFiles = dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot, QDir::LocaleAware);
|
||||
for (const QFileInfo &file : dirFiles) {
|
||||
files << (file.absoluteFilePath());
|
||||
- latestModificationTime = std::max(latestModificationTime, file.lastModified());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
files << m_path;
|
||||
|
||||
- if (latestModificationTime <= m_fileModificationTime) {
|
||||
- return;
|
||||
- }
|
||||
- m_fileModificationTime = latestModificationTime;
|
||||
-
|
||||
for (const QString &filepath : qAsConst(files)) {
|
||||
loadInternal(filepath);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue