sddm: add package

This commit is contained in:
Nikolay Amiantov 2015-03-02 20:58:05 +03:00
parent 02ce945693
commit c532beeb0d
3 changed files with 106 additions and 1 deletions

View file

@ -0,0 +1,55 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4d6e0a9..df4ad28 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -77,7 +77,9 @@ find_package(Qt5LinguistTools REQUIRED)
# find qt5 imports dir
get_target_property(QMAKE_EXECUTABLE Qt5::qmake LOCATION)
-exec_program(${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_QML" RETURN_VALUE return_code OUTPUT_VARIABLE QT_IMPORTS_DIR)
+if(NOT QT_IMPORTS_DIR)
+ exec_program(${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_QML" RETURN_VALUE return_code OUTPUT_VARIABLE QT_IMPORTS_DIR)
+endif()
# Set components version
set(COMPONENTS_VERSION 2.0)
diff --git a/data/man/sddm.conf.rst.in b/data/man/sddm.conf.rst.in
index 6a28224..798bc5c 100644
--- a/data/man/sddm.conf.rst.in
+++ b/data/man/sddm.conf.rst.in
@@ -65,6 +65,10 @@ OPTIONS
Path of the X server.
Default value is "/usr/bin/X".
+`XephyrPath=`
+ Path of the Xephyr.
+ Default value is "/usr/bin/Xephyr".
+
`XauthPath=`
Path of the Xauth.
Default value is "/usr/bin/xauth".
diff --git a/src/common/Configuration.h b/src/common/Configuration.h
index 72aa6f4..854cc22 100644
--- a/src/common/Configuration.h
+++ b/src/common/Configuration.h
@@ -54,6 +54,7 @@ namespace SDDM {
// TODO: Not absolutely sure if everything belongs here. Xsessions, VT and probably some more seem universal
Section(XDisplay,
Entry(ServerPath, QString, _S("/usr/bin/X"), _S("X server path"));
+ Entry(XephyrPath, QString, _S("/usr/bin/Xephyr"), _S("Xephyr path"));
Entry(XauthPath, QString, _S("/usr/bin/xauth"), _S("Xauth path"));
Entry(SessionDir, QString, _S("/usr/share/xsessions"), _S("Session description directory"));
Entry(SessionCommand, QString, _S(SESSION_COMMAND), _S("Xsession script path\n"
diff --git a/src/daemon/XorgDisplayServer.cpp b/src/daemon/XorgDisplayServer.cpp
index f10ad82..cb9de3f 100644
--- a/src/daemon/XorgDisplayServer.cpp
+++ b/src/daemon/XorgDisplayServer.cpp
@@ -136,7 +136,7 @@ namespace SDDM {
if (daemonApp->testing()) {
QStringList args;
args << m_display << "-ac" << "-br" << "-noreset" << "-screen" << "800x600";
- process->start("/usr/bin/Xephyr", args);
+ process->start(mainConfig.XDisplay.XephyrPath.get(), args);
} else {
// set process environment
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();

View file

@ -0,0 +1,47 @@
{ stdenv, fetchpatch, makeWrapper, fetchFromGitHub, cmake, pkgconfig, libxcb, libpthreadstubs
, libXdmcp, libXau, qt5, pam, systemd }:
let
version = "0.11.0";
in
stdenv.mkDerivation rec {
name = "sddm-${version}";
src = fetchFromGitHub {
owner = "sddm";
repo = "sddm";
rev = "v${version}";
sha256 = "1s1gm0xvgwzrpxgni3ngdj8phzg21gkk1jyiv2l2i5ayl0jdm7ig";
};
nativeBuildInputs = [ cmake pkgconfig qt5.tools makeWrapper ];
buildInputs = [ libxcb libpthreadstubs libXdmcp libXau qt5.base pam systemd ];
patches = [ (fetchpatch {
url = "https://github.com/sddm/sddm/commit/9bc21ee7da5de6b2531d47d1af4d7b0a169990b9.patch";
sha256 = "1pda0wf4xljdadja7iyh5c48h0347imadg9ya1dw5slgb7w1d94l";
})
./cmake_paths.patch
];
cmakeFlags = [ "-DCONFIG_FILE=/etc/sddm.conf" ];
preConfigure = ''
export cmakeFlags="$cmakeFlags -DQT_IMPORTS_DIR=$out/lib/qt5/qml -DCMAKE_INSTALL_SYSCONFDIR=$out/etc -DSYSTEMD_SYSTEM_UNIT_DIR=$out/lib/systemd/system"
'';
postInstall = ''
wrapProgram $out/bin/sddm-greeter \
--set QML2_IMPORT_PATH "${qt5.declarative}/lib/qt5/qml/"
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "QML based X11 display manager";
homepage = http://launchpad.net/lightdm;
platforms = platforms.linux;
maintainers = with maintainers; [ abbradar ];
};
}

View file

@ -11449,11 +11449,14 @@ let
printrun = callPackage ../applications/misc/printrun { };
sddm = callPackage ../applications/display-managers/sddm {
qt5 = qt54;
};
slim = callPackage ../applications/display-managers/slim {
libpng = libpng12;
};
smartgithg = callPackage ../applications/version-management/smartgithg { };
slimThemes = recurseIntoAttrs (import ../applications/display-managers/slim/themes.nix {