[Nix-dev] Howto install sup on nix

Marc Weber marco-oweber at gmx.de
Fri Sep 4 19:31:23 CEST 2009


Why sup?
- You manage your emails by threads
- You can search your emails fast using Xapian engine
- You can tag them easily
- You can kill a thread (never watch this mail or any follow ups again)
  I think its cool :-)

info: Sup doesn't touch your mail sources unless you use sup-sync-back.

      So you can continue using your original mail client until you feel
      comfortable using sup.

      Sup is just a big index on top of mboxes, maildirs or imap
      folders.

Here we go (HOWTO):
========================

git clone git://gitorious.org/sup/mainline.git

# checkout next:
git branch next origin/next --track
git checkout next

Put this into your .bashrc:
(You don't want ferret, the default. This will change soon)


Add this to your config.nix to packageOverrides:

  rubyCollection = pkgs.misc.collection {
    name = "my-ruby-packages";
    list = let l = pkgs.rubyLibs; in 
      [ pkgs.ruby
        pkgs.xapianBindings

        l.chronic
        l.sup # we only need all deps: ferret_0_11_6 ncurses_0_9_1 rmail_1_0_0 highline_1_5_1 net_ssh_2_0_11 trollop_1_14 lockfile_1_4_3 mime_types_1_16 gettext_2_0_4 fastthread_1_0_7
        l.rubygems_update # optional
      ];
  };

install it:

  nix-env -A rubyCollection

You may also want to set this in your .bashrc / .zshrc:

  export GEM_PATH=~/.nix-profile
  export RUBYLIB=~/.nix-profile/gems/rubygems-update-1.3.4/lib/:~/.nix-profile/lib/ruby-1.8
  export RUBYOPT=rubygems

  sup_git_xapian(){
    exe=$1; shift
    (
      cd ~/managed_repos/sup_mainline;  # <<<<<<<<< the git repo
      export SUP_INDEX=xapian           # I told you about that
      # export SUP_BASE=base_dir        # You can move your .sup directory somewhere else. The xapian index can grow ..
      ruby -I lib bin/$exe "$@"
    )
  }

  for i in sup sup-{add,sync,sync-back,config,dump,tweak-labels,recover-sources}; do
    eval "alias $i=\"sup_git_xapian $i\""
  done

Now you should be able to run them all:
 sup-add    sup-config    sup-dump sup-recover-sources sup-sync sup-sync-back   sup-tweak-labels

start by using sup-config.
Be aware that there is a nice mailinglist called sup-talk.
read
  -> http://sup.rubyforge.org/NewUserGuide.txt
  -> http://sup.rubyforge.org/
  -> http://sup.rubyforge.org/wiki/wiki.pl

It doesn't make sense to package current sup because it's changing
fast..

TODO: It does'nt set the bg color to black as it should.
I'm using a workaround I can live with..

bad: you can run it only once - I still like it
So I start copying some emails to an editor while browsing in sup..

have fun - Marc Weber



More information about the nix-dev mailing list