mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 07:31:20 +00:00
merge #5505: use /run/current-system/sw/bin/*
A working /sbin/shutdown (usually provided by systemd) is required by "rtcwake -m off". Creating a circular dependency on systemd for this just isn't worth the trouble, so take the straightforward way out. One could easily make the argument that rtcwake wants to shut down the *currently running system*, and that the correct API for that *is* in fact /run/current-system. And it makes a very tempting sort of sense. @vcunat moved to postPatch and added #FIXME.
This commit is contained in:
parent
488e6e6e9c
commit
8cf4ef7ab7
|
@ -8,6 +8,14 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "e0457f715b73f4a349e1acb08cb410bf0edc9a74a3f75c357070f31f70e33cd6";
|
||||
};
|
||||
|
||||
#FIXME: make it also work on non-nixos?
|
||||
postPatch = ''
|
||||
# Substituting store paths would create a circular dependency on systemd
|
||||
substituteInPlace include/pathnames.h \
|
||||
--replace "/bin/login" "/run/current-system/sw/bin/login" \
|
||||
--replace "/sbin/shutdown" "/run/current-system/sw/bin/shutdown"
|
||||
'';
|
||||
|
||||
crossAttrs = {
|
||||
# Work around use of `AC_RUN_IFELSE'.
|
||||
preConfigure = "export scanf_cv_type_modifier=ms";
|
||||
|
|
Loading…
Reference in a new issue