From cd531d70f6151d1c582ef8f62559c6dd712d1051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 28 Jul 2013 22:38:32 +0200 Subject: [PATCH] lightdm updates (merge #574) Also fixes the situation where some session stuff is written to nix store. --- .../lightdm-gtk-greeter/default.nix | 42 ++++++++++++++----- .../display-managers/lightdm/default.nix | 34 ++++++++------- 2 files changed, 51 insertions(+), 25 deletions(-) diff --git a/pkgs/applications/display-managers/lightdm-gtk-greeter/default.nix b/pkgs/applications/display-managers/lightdm-gtk-greeter/default.nix index 501826b82df2..0b8863752d2a 100644 --- a/pkgs/applications/display-managers/lightdm-gtk-greeter/default.nix +++ b/pkgs/applications/display-managers/lightdm-gtk-greeter/default.nix @@ -1,23 +1,43 @@ -{ stdenv, fetchurl, lightdm, pkgconfig, gtk3, intltool }: +{ stdenv, fetchurl, lightdm, pkgconfig, intltool +, hicolor_icon_theme, makeWrapper +, useGTK2 ? false, gtk2, gtk3 # gtk3 seems better supported +}: -stdenv.mkDerivation { - name = "lightdm-gtk-greeter"; +#ToDo: bad icons with gtk2; +# avatar icon is missing in standard hicolor theme, I don't know where gtk3 takes it from + +#ToDo: Failed to open sessions directory: Error opening directory '${lightdm}/share/lightdm/remote-sessions': No such file or directory + +let + ver_branch = "1.6"; + version = "1.5.1"; # 1.5.2 and 1.6.0 result into infinite cycling of X in restarts +in +stdenv.mkDerivation rec { + name = "lightdm-gtk-greeter-${version}"; src = fetchurl { - url = "https://launchpad.net/lightdm-gtk-greeter/1.6/1.5.1/+download/lightdm-gtk-greeter-1.5.1.tar.gz"; - sha256 = "ecce7e917a79fa8f2126c3fafb6337f81f2198892159a4ef695016afecd2d621"; + url = "${meta.homepage}/${ver_branch}/${version}/+download/${name}.tar.gz"; + sha256 = "08fnsbnay5jhd7ps8n91i6c227zq6xizpyn34qhqzykrga8pxkpc"; }; - buildInputs = [ pkgconfig gtk3 lightdm intltool ]; - - patches = - [ ./lightdm-gtk-greeter.patch - ]; - + patches = [ ./lightdm-gtk-greeter.patch ]; patchFlags = "-p0"; + buildInputs = [ pkgconfig lightdm intltool ] + ++ (if useGTK2 then [ gtk2 makeWrapper ] else [ gtk3 ]); + + configureFlags = stdenv.lib.optional useGTK2 "--with-gtk2"; + postInstall = '' substituteInPlace "$out/share/xgreeters/lightdm-gtk-greeter.desktop" \ --replace "Exec=lightdm-gtk-greeter" "Exec=$out/sbin/lightdm-gtk-greeter" + '' + stdenv.lib.optionalString useGTK2 '' + wrapProgram "$out/sbin/lightdm-gtk-greeter" \ + --prefix XDG_DATA_DIRS ":" "${hicolor_icon_theme}/share" ''; + + meta = { + homepage = http://launchpad.net/lightdm-gtk-greeter; + platforms = stdenv.lib.platforms.linux; + }; } diff --git a/pkgs/applications/display-managers/lightdm/default.nix b/pkgs/applications/display-managers/lightdm/default.nix index ce1f4400b271..598c42199bec 100644 --- a/pkgs/applications/display-managers/lightdm/default.nix +++ b/pkgs/applications/display-managers/lightdm/default.nix @@ -1,25 +1,31 @@ -{ stdenv, fetchurl, pam, pkgconfig, libxcb, glib, libXdmcp, itstool, libxml2, intltool, x11, libxklavier, libgcrypt, makeWrapper }: +{ stdenv, fetchurl, pam, pkgconfig, libxcb, glib, libXdmcp, itstool, libxml2 +, intltool, x11, libxklavier, libgcrypt, dbus/*for tests*/ }: -stdenv.mkDerivation { - name = "lightdm-1.5.1"; +let + ver_branch = "1.8"; + version = "1.7.0"; +in +stdenv.mkDerivation rec { + name = "lightdm-${version}"; src = fetchurl { - url = https://launchpad.net/lightdm/1.6/1.5.1/+download/lightdm-1.5.1.tar.xz; - sha256 = "645db2d763cc514d6aecb1838f4a9c33c3dcf0c94567a7ef36c6b23d8aa56c86"; + url = "${meta.homepage}/${ver_branch}/${version}/+download/${name}.tar.xz"; + sha256 = "0nwwjgc9xvwili6714ag88wsrf0lr5hv1i6z9f0xvin4ym18cbs5"; }; - buildInputs = [ pkgconfig pam libxcb glib libXdmcp itstool libxml2 intltool libxklavier libgcrypt makeWrapper ]; - - configureFlags = [ "--enable-liblightdm-gobject" ]; - - patches = - [ ./lightdm.patch - ]; - + patches = [ ./lightdm.patch ]; patchFlags = "-p0"; + buildInputs = [ + pkgconfig pam libxcb glib libXdmcp itstool libxml2 intltool libxklavier libgcrypt + ] ++ stdenv.lib.optional doCheck dbus.daemon; + + configureFlags = [ "--enable-liblightdm-gobject" "--localstatedir=/var" ]; + + doCheck = false; # some tests fail, don't know why + meta = { homepage = http://launchpad.net/lightdm; platforms = stdenv.lib.platforms.linux; }; -} \ No newline at end of file +}