lightdm updates (merge #574)

Also fixes the situation where some session stuff is written to nix store.
This commit is contained in:
Vladimír Čunát 2013-07-28 22:38:32 +02:00
parent d5cad473f9
commit cd531d70f6
2 changed files with 51 additions and 25 deletions

View File

@ -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;
};
}

View File

@ -1,23 +1,29 @@
{ 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;