summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-04-15 12:04:47 +0000
committerAlyssa Ross <hi@alyssa.is>2020-04-22 12:52:47 +0000
commit81902419ddb83f4d3cbe1750317ce1669e2ca73e (patch)
tree0e04c41acf5ac533d2903191268c698bd37d0b40
parentf690b34603d39a23c4305193747b06c17367e19f (diff)
downloadnixpkgs-81902419ddb83f4d3cbe1750317ce1669e2ca73e.tar
nixpkgs-81902419ddb83f4d3cbe1750317ce1669e2ca73e.tar.gz
nixpkgs-81902419ddb83f4d3cbe1750317ce1669e2ca73e.tar.bz2
nixpkgs-81902419ddb83f4d3cbe1750317ce1669e2ca73e.tar.lz
nixpkgs-81902419ddb83f4d3cbe1750317ce1669e2ca73e.tar.xz
nixpkgs-81902419ddb83f4d3cbe1750317ce1669e2ca73e.tar.zst
nixpkgs-81902419ddb83f4d3cbe1750317ce1669e2ca73e.zip
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.
-rw-r--r--pkgs/applications/networking/mailreaders/mblaze/default.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/applications/networking/mailreaders/mblaze/default.nix b/pkgs/applications/networking/mailreaders/mblaze/default.nix
index 82550cf43cc..fc9001e59e3 100644
--- a/pkgs/applications/networking/mailreaders/mblaze/default.nix
+++ b/pkgs/applications/networking/mailreaders/mblaze/default.nix
@@ -1,10 +1,10 @@
-{ stdenv, fetchFromGitHub, fetchpatch, libiconv }:
+{ stdenv, lib, fetchFromGitHub, fetchpatch, libiconv, ruby ? null }:
 
 stdenv.mkDerivation rec {
   pname = "mblaze";
   version = "0.5.1";
 
-  buildInputs = stdenv.lib.optionals stdenv.isDarwin [ libiconv ];
+  buildInputs = [ ruby ] ++ lib.optionals stdenv.isDarwin [ libiconv ];
 
   src = fetchFromGitHub {
     owner = "chneukirchen";
@@ -24,9 +24,11 @@ stdenv.mkDerivation rec {
 
   postInstall = ''
     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";
     description = "Unix utilities to deal with Maildir";
     license = licenses.cc0;