Skip to content
Permalink
Browse files

smailq: init at 1.2 WIP

  • Loading branch information
peterhoeg committed Mar 26, 2018
1 parent 56fb68d commit 1a97724bd04c86fd4da197ef41239efdee9e8080
Showing with 64 additions and 1 deletion.
  1. +61 −0 pkgs/applications/networking/smailq/default.nix
  2. +3 −1 pkgs/top-level/all-packages.nix
@@ -0,0 +1,61 @@
{ stdenv, lib, fetchgit, python3Packages
, docbook2x, docbook_xsl, docbook_xml_dtd_44
, msmtp }:

python3Packages.buildPythonApplication rec {
name = "smailq-${version}";
version = "1.2";

format = "other";

src = fetchgit {
url = "https://git.sthu.org/repos/smailq.git";
rev = "v${version}";
sha256 = "0d15n8m99bgm6r56xpyjl2iizw6qmlpvjbh8i6wqrgmsba07cqav";
};

postPatch = ''
substituteInPlace Makefile \
--replace /usr $out \
--replace docbook2man.pl ${docbook2x}/bin/docbook2man
substituteInPlace smailq.docbook \
--replace /usr/share/xml/docbook/schema/dtd/4.4 ${docbook_xml_dtd_44}/xml/dtd/docbook
# make the paths follow freedesktop.org recommendations
substituteInPlace smailq \
--replace '~/.smailq.conf' '~/.config/smailq.conf' \
--replace '~/.smailq/log' '~/.local/share/smailq/log' \
--replace '~/.smailq/data' '~/.cache/smailq' \
--replace '/etc/smailq.conf' "$out/etc/smailq.conf"
substituteInPlace mailq \
--replace smailq $out/bin/smailq
substituteInPlace sendmail \
--replace ' smailq' ' $CMD'
'';

preInstall = ''
mkdir -p $out/{bin,etc,sbin,share/man/man1}
cat >> $out/etc/smailq.conf << _EOF
[general]
[nwtest]
[msa]
cmd = ${msmtp}/bin/msmtp
_EOF
'';

nativeBuildInputs = [ docbook2x ];

meta = with stdenv.lib; {
description = "A simple mailq for lightweight SMTP clients";
homepage = src.url;
license = licenses.gpl3;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.unix;
};
}

imapfilter = callPackage ../applications/networking/mailreaders/imapfilter.nix {
lua = lua5;
};
};

smailq = callPackage ../applications/networking/smailq { };

maxlib = callPackage ../applications/audio/pd-plugins/maxlib { };

0 comments on commit 1a97724

Please sign in to comment.
You can’t perform that action at this time.