-
Notifications
You must be signed in to change notification settings - Fork 11
Description
System.PosixCompat.User
actally had useful purposes despite not doing anything useful on Windows. Here's how I depend on it in git-annex:
I have a custom Setup.hs
, which hooks into cabal to install additional files in the user's home directory.
To get the home directory, I need to use System.Posix.User
, so would need a Setup-Depends: unix
in the cabal file. But that would prevent building on windows! So instead I Setup-Depends: unix-compat
. Then the code that gets the user's home directory is #ifdef
ed to avoid using getEffectiveUserID
on Windows.
Note that cabal does not allow using if(! os(windows))
in the custom-setup block. If it did, I could simply depend on unix
conditionally. (Cabal says: invalid subsection "if")
I am going to have to pin unix-compat
at an old version, or remove functionality from my custom Setup if this change is not reverted.