snoyberg / mime-mail

Compose MIME email messages.
41 stars 43 forks source link

Allow to customize sendmail executable at compile time #23

Closed sol closed 10 years ago

sol commented 10 years ago

This patch allows you to set a custom sendmail at compile time. The main motivation to do this is to make the package work with NixOS.

GHC's CPP does not support stringification (AFAICT), for that reason you have to specify the quotes explicitly. Here is an example:

$ cabal install --ghc-option='-DMIME_MAIL_SENDMAIL_PATH="/nix/store/c6bms2ryxjka8n5hg87aagn0gnm80cp6-ssmtp-2.64/sbin/sendmail"'

@shlevy Just to double check, this is what we want from a Nix perspective, right?

shlevy commented 10 years ago

Yup looks good. To expand upon the motivation a bit, in NixOS we don't have /usr/sbin, so we'd want to set up mime-mail to work with the proper sendmail path by default.

snoyberg commented 10 years ago

Looks good!

sol commented 10 years ago

@snoyberg Thanks a lot. Having it on Hackage would help us a lot ;).

snoyberg commented 10 years ago

It's already there ;) http://hackage.haskell.org/package/mime-mail-0.4.4.2

sol commented 10 years ago

:)