mblaze: install msuck and mblow

There are lots of other scripts in contrib that we should probably
also install, but I didn't feel like taking the time to review them
all and figure out what dependencies they would need.

It would have been a shame to add a mandatory dependency on Ruby (and
all that entails) to a package that otherwise has basically no
dependencies, so I've made the Ruby dependency optional.
This commit is contained in:
Alyssa Ross 2020-04-15 12:04:47 +00:00
parent f690b34603
commit 81902419dd

View File

@ -1,10 +1,10 @@
{ stdenv, fetchFromGitHub, fetchpatch, libiconv }: { stdenv, lib, fetchFromGitHub, fetchpatch, libiconv, ruby ? null }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "mblaze"; pname = "mblaze";
version = "0.5.1"; version = "0.5.1";
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ libiconv ]; buildInputs = [ ruby ] ++ lib.optionals stdenv.isDarwin [ libiconv ];
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "chneukirchen"; owner = "chneukirchen";
@ -24,9 +24,11 @@ stdenv.mkDerivation rec {
postInstall = '' postInstall = ''
install -Dm644 -t $out/share/zsh/site-functions contrib/_mblaze install -Dm644 -t $out/share/zsh/site-functions contrib/_mblaze
'' + lib.optionalString (ruby != null) ''
install -Dt $out/bin contrib/msuck contrib/mblow
''; '';
meta = with stdenv.lib; { meta = with lib; {
homepage = "https://github.com/chneukirchen/mblaze"; homepage = "https://github.com/chneukirchen/mblaze";
description = "Unix utilities to deal with Maildir"; description = "Unix utilities to deal with Maildir";
license = licenses.cc0; license = licenses.cc0;