diff --git a/pkgs/development/libraries/accountservice/default.nix b/pkgs/development/libraries/accountservice/default.nix index 9734a6bc9804..0ff5466e5c4f 100644 --- a/pkgs/development/libraries/accountservice/default.nix +++ b/pkgs/development/libraries/accountservice/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchurl, pkgconfig, glib, intltool -, libtool, gobjectIntrospection, polkit, systemd }: +{ stdenv, fetchurl, pkgconfig, glib, intltool, makeWrapper +, libtool, gobjectIntrospection, polkit, systemd, coreutils }: stdenv.mkDerivation rec { name = "accountsservice-0.6.35"; @@ -9,8 +9,19 @@ stdenv.mkDerivation rec { sha256 = "0f1hzl6hw56xvwgmd4yvmdyj15xj1fafw45pzv3qarww7h0wg8b5"; }; - buildInputs = [ pkgconfig glib intltool libtool + buildInputs = [ pkgconfig glib intltool libtool makeWrapper gobjectIntrospection polkit systemd ]; - configureFlags = [ "--with-systemdsystemunitdir=$(out)/etc/systemd/system" ]; + configureFlags = [ "--with-systemdsystemunitdir=$(out)/etc/systemd/system" + "--localstatedir=/var" ]; + + patches = [ ./no-create-dirs.patch ]; + patchFlags = "-p0"; + + preFixup = '' + wrapProgram "$out/libexec/accounts-daemon" \ + --run "${coreutils}/bin/mkdir -p /var/lib/AccountsService/users" \ + --run "${coreutils}/bin/mkdir -p /var/lib/AccountsService/icons" + ''; + } diff --git a/pkgs/development/libraries/accountservice/no-create-dirs.patch b/pkgs/development/libraries/accountservice/no-create-dirs.patch new file mode 100644 index 000000000000..a0c7ca23598f --- /dev/null +++ b/pkgs/development/libraries/accountservice/no-create-dirs.patch @@ -0,0 +1,13 @@ +--- src/Makefile.in.orig 2014-04-23 22:30:00.276005326 +0200 ++++ src/Makefile.in 2014-04-23 22:30:16.809409113 +0200 +@@ -881,8 +881,8 @@ + gdbus-codegen --generate-c-code accounts-user-generated --c-namespace Accounts --interface-prefix=org.freedesktop.Accounts. $(top_srcdir)/data/org.freedesktop.Accounts.User.xml + + install-data-hook: +- $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/AccountsService/users" +- $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/AccountsService/icons" ++# $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/AccountsService/users" ++# $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/AccountsService/icons" + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded.