Skip to content

Commit

Permalink
accountsservice: use exact store paths instead of /run/current-system
Browse files Browse the repository at this point in the history
  • Loading branch information
groxxda committed Sep 1, 2016
1 parent 1d8e7d1 commit 755be7e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pkgs/development/libraries/accountsservice/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, glib, intltool, makeWrapper
{ stdenv, fetchurl, pkgconfig, glib, intltool, makeWrapper, shadow
, libtool, gobjectIntrospection, polkit, systemd, coreutils }:

stdenv.mkDerivation rec {
Expand All @@ -16,8 +16,12 @@ stdenv.mkDerivation rec {
configureFlags = [ "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
"--localstatedir=/var" ];
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"'
substituteInPlace src/daemon.c --replace '"/usr/sbin/useradd"' '"${shadow}/bin/useradd"' \
--replace '"/usr/sbin/userdel"' '"${shadow}/bin/userdel"'
substituteInPlace src/user.c --replace '"/usr/sbin/usermod"' '"${shadow}/bin/usermod"' \
--replace '"/usr/bin/chage"' '"${shadow}/bin/chage"' \
--replace '"/usr/bin/passwd"' '"${shadow}/bin/passwd"' \
--replace '"/bin/cat"' '"${coreutils}/bin/cat"'
'';

patches = [
Expand Down

0 comments on commit 755be7e

Please sign in to comment.