2014-04-23 21:19:48 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, glib, intltool, makeWrapper
|
|
|
|
, libtool, gobjectIntrospection, polkit, systemd, coreutils }:
|
2014-01-11 22:38:21 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-09-25 15:45:14 +00:00
|
|
|
name = "accountsservice-${version}";
|
2016-09-01 09:08:36 +00:00
|
|
|
version = "0.6.42";
|
|
|
|
|
2014-01-11 22:38:21 +00:00
|
|
|
src = fetchurl {
|
2014-09-25 15:45:14 +00:00
|
|
|
url = "http://www.freedesktop.org/software/accountsservice/accountsservice-${version}.tar.xz";
|
2016-09-01 09:08:36 +00:00
|
|
|
sha256 = "0zh0kjpdc631qh36plcgpwvnmh9wj8l5cki3aw5r09w6y7198r75";
|
2014-01-11 22:38:21 +00:00
|
|
|
};
|
|
|
|
|
2014-04-23 21:19:48 +00:00
|
|
|
buildInputs = [ pkgconfig glib intltool libtool makeWrapper
|
2014-04-06 19:20:45 +00:00
|
|
|
gobjectIntrospection polkit systemd ];
|
2014-01-11 22:38:21 +00:00
|
|
|
|
2014-04-23 21:19:48 +00:00
|
|
|
configureFlags = [ "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
|
|
|
|
"--localstatedir=/var" ];
|
2016-06-01 10:59:56 +00:00
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace src/daemon.c --replace '"/usr/sbin/' '"/run/current-system/sw/sbin/'
|
|
|
|
substituteInPlace src/user.c --replace '"/usr/sbin/' '"/run/current-system/sw/sbin/' --replace '"/usr/bin/' '"/run/current-system/sw/bin' --replace '"/bin/cat"' '"/run/current-system/sw/bin/cat"'
|
|
|
|
'';
|
2014-04-23 21:19:48 +00:00
|
|
|
|
2016-06-01 11:01:51 +00:00
|
|
|
patches = [
|
|
|
|
./no-create-dirs.patch
|
|
|
|
./Add-nixbld-to-user-blacklist.patch
|
2016-06-01 11:02:26 +00:00
|
|
|
./Disable-methods-that-change-files-in-etc.patch
|
2016-06-01 11:01:51 +00:00
|
|
|
];
|
|
|
|
|
2014-04-23 21:19:48 +00:00
|
|
|
preFixup = ''
|
|
|
|
wrapProgram "$out/libexec/accounts-daemon" \
|
|
|
|
--run "${coreutils}/bin/mkdir -p /var/lib/AccountsService/users" \
|
|
|
|
--run "${coreutils}/bin/mkdir -p /var/lib/AccountsService/icons"
|
|
|
|
'';
|
|
|
|
|
2014-09-25 15:45:14 +00:00
|
|
|
meta = with stdenv.lib; {
|
2014-06-22 19:29:26 +00:00
|
|
|
description = "D-Bus interface for user account query and manipulation";
|
2014-09-25 15:45:14 +00:00
|
|
|
homepage = http://www.freedesktop.org/wiki/Software/AccountsService;
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ pSub ];
|
2016-08-02 17:50:55 +00:00
|
|
|
platforms = with platforms; linux;
|
2014-06-22 19:29:26 +00:00
|
|
|
};
|
2014-01-11 22:38:21 +00:00
|
|
|
}
|