2014-05-05 01:21:16 +01:00
|
|
|
{ stdenv, fetchurl, ruby, rake, rubygems, makeWrapper, ncursesw_sup
|
2013-10-12 23:38:52 +01:00
|
|
|
, xapian_ruby, gpgme, libiconvOrEmpty, mime_types, chronic, trollop, lockfile
|
2014-05-05 01:21:16 +01:00
|
|
|
, gettext, iconv, locale, text, highline, rmail_sup, unicode, gnupg, which
|
|
|
|
, bundler, git }:
|
2013-05-26 09:07:28 +01:00
|
|
|
|
2013-10-12 23:38:52 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2014-05-05 01:21:16 +01:00
|
|
|
version = "0.18.0";
|
2013-10-12 23:38:52 +01:00
|
|
|
name = "sup-${version}";
|
2014-05-05 01:21:16 +01:00
|
|
|
|
2013-05-26 09:07:28 +01:00
|
|
|
meta = {
|
|
|
|
description = "A curses threads-with-tags style email client";
|
2014-05-05 01:21:16 +01:00
|
|
|
homepage = http://supmua.org;
|
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2013-05-26 09:07:28 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ lovek323 ];
|
2014-05-05 01:21:16 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2014-08-23 13:20:37 +01:00
|
|
|
broken = true;
|
2013-05-26 09:07:28 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
|
2014-05-05 01:21:16 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/sup-heliotrope/sup/archive/release-${version}.tar.gz";
|
|
|
|
sha256 = "1dhg0i2v0ddhwi32ih5lc56x00kbaikd2wdplgzlshq0nljr9xy0";
|
2013-05-26 09:07:28 +01:00
|
|
|
};
|
|
|
|
|
2013-06-12 03:24:04 +01:00
|
|
|
buildInputs =
|
2014-05-05 01:21:16 +01:00
|
|
|
[ rake ruby rubygems makeWrapper gpgme ncursesw_sup xapian_ruby
|
|
|
|
libiconvOrEmpty git ];
|
|
|
|
|
|
|
|
phases = [ "unpackPhase" "buildPhase" "installPhase" ];
|
2013-05-26 09:07:28 +01:00
|
|
|
|
2014-05-05 01:21:16 +01:00
|
|
|
buildPhase = ''
|
|
|
|
# the builder uses git to get a listing of the files
|
2014-08-21 11:46:41 +01:00
|
|
|
export EMAIL="nobody@in.here"
|
2014-05-05 01:21:16 +01:00
|
|
|
git init >/dev/null
|
|
|
|
git add .
|
|
|
|
git commit -m "message" >/dev/null
|
|
|
|
gem build sup.gemspec
|
|
|
|
'';
|
2013-05-26 09:07:28 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
export HOME=$TMP/home; mkdir -pv "$HOME"
|
2013-06-12 03:24:04 +01:00
|
|
|
|
|
|
|
GEM_PATH="$GEM_PATH:$out/${ruby.gemPath}"
|
2013-06-14 09:06:14 +01:00
|
|
|
GEM_PATH="$GEM_PATH:${chronic}/${ruby.gemPath}"
|
|
|
|
GEM_PATH="$GEM_PATH:${gettext}/${ruby.gemPath}"
|
2013-06-15 12:02:57 +01:00
|
|
|
GEM_PATH="$GEM_PATH:${gpgme}/${ruby.gemPath}"
|
2013-10-12 23:38:52 +01:00
|
|
|
GEM_PATH="$GEM_PATH:${highline}/${ruby.gemPath}"
|
2013-06-14 09:06:14 +01:00
|
|
|
GEM_PATH="$GEM_PATH:${iconv}/${ruby.gemPath}"
|
2013-06-15 12:02:57 +01:00
|
|
|
GEM_PATH="$GEM_PATH:${locale}/${ruby.gemPath}"
|
|
|
|
GEM_PATH="$GEM_PATH:${lockfile}/${ruby.gemPath}"
|
|
|
|
GEM_PATH="$GEM_PATH:${mime_types}/${ruby.gemPath}"
|
|
|
|
GEM_PATH="$GEM_PATH:${ncursesw_sup}/${ruby.gemPath}"
|
2013-10-12 23:38:52 +01:00
|
|
|
GEM_PATH="$GEM_PATH:${rmail_sup}/${ruby.gemPath}"
|
2013-06-15 12:02:57 +01:00
|
|
|
GEM_PATH="$GEM_PATH:${text}/${ruby.gemPath}"
|
|
|
|
GEM_PATH="$GEM_PATH:${trollop}/${ruby.gemPath}"
|
2013-10-12 23:38:52 +01:00
|
|
|
GEM_PATH="$GEM_PATH:${unicode}/${ruby.gemPath}"
|
2013-06-20 01:09:15 +01:00
|
|
|
GEM_PATH="$GEM_PATH:${xapian_ruby}/${ruby.gemPath}"
|
2013-06-12 03:24:04 +01:00
|
|
|
|
|
|
|
# Don't install some dependencies -- we have already installed
|
2013-06-14 09:06:14 +01:00
|
|
|
# the dependencies but gem doesn't acknowledge this
|
2013-05-26 09:07:28 +01:00
|
|
|
gem install --no-verbose --install-dir "$out/${ruby.gemPath}" \
|
2014-05-05 01:21:16 +01:00
|
|
|
--bindir "$out/bin" --no-rdoc --no-ri sup-${version}.gem \
|
|
|
|
--ignore-dependencies >/dev/null
|
2013-05-26 09:07:28 +01:00
|
|
|
|
2013-10-12 23:38:52 +01:00
|
|
|
# specify ruby interpreter explicitly
|
|
|
|
sed -i '1 s|^.*$|#!${ruby}/bin/ruby|' bin/sup-sync-back-maildir
|
|
|
|
|
2014-05-05 01:21:16 +01:00
|
|
|
cp bin/sup-sync-back-maildir "$out/bin"
|
2013-10-12 23:38:52 +01:00
|
|
|
|
2013-05-26 09:07:28 +01:00
|
|
|
for prog in $out/bin/*; do
|
2013-10-12 23:38:52 +01:00
|
|
|
wrapProgram "$prog" --prefix GEM_PATH : "$GEM_PATH" --prefix PATH : "${gnupg}/bin:${which}/bin"
|
2013-05-26 09:07:28 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
for prog in $out/gems/*/bin/*; do
|
|
|
|
[[ -e "$out/bin/$(basename $prog)" ]]
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
}
|