You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.8 KiB
55 lines
1.8 KiB
4 years ago
|
{ coreutils, fetchFromGitHub, fetchpatch, file, gawk, gnugrep, gnused
|
||
3 years ago
|
, installShellFiles, less, lib, libiconv, makeWrapper, nano, stdenv, ruby
|
||
4 years ago
|
}:
|
||
6 years ago
|
|
||
|
stdenv.mkDerivation rec {
|
||
5 years ago
|
pname = "mblaze";
|
||
3 years ago
|
version = "1.1";
|
||
6 years ago
|
|
||
4 years ago
|
nativeBuildInputs = [ installShellFiles makeWrapper ];
|
||
4 years ago
|
buildInputs = [ ruby ] ++ lib.optionals stdenv.isDarwin [ libiconv ];
|
||
6 years ago
|
|
||
6 years ago
|
src = fetchFromGitHub {
|
||
4 years ago
|
owner = "leahneukirchen";
|
||
6 years ago
|
repo = "mblaze";
|
||
|
rev = "v${version}";
|
||
3 years ago
|
sha256 = "sha256-Ho2Qoxs93ig4yYUOaoqdYnLA8Y4+7CfRM0dju89JOa4=";
|
||
6 years ago
|
};
|
||
|
|
||
5 years ago
|
makeFlags = [ "PREFIX=$(out)" ];
|
||
6 years ago
|
|
||
3 years ago
|
enableParallelBuilding = true;
|
||
|
|
||
5 years ago
|
postInstall = ''
|
||
4 years ago
|
installShellCompletion contrib/_mblaze
|
||
4 years ago
|
'' + lib.optionalString (ruby != null) ''
|
||
|
install -Dt $out/bin contrib/msuck contrib/mblow
|
||
4 years ago
|
|
||
|
# The following wrappings are used to preserve the executable
|
||
|
# names (the value of $0 in a script). The script mcom is
|
||
|
# designed to be run directly or via symlinks such as mrep. Using
|
||
|
# symlinks changes the value of $0 in the script, and makes it
|
||
|
# behave differently. When using the wrapProgram tool, the resulting
|
||
|
# wrapper breaks this behaviour. The following wrappers preserve it.
|
||
|
|
||
|
mkdir -p $out/wrapped
|
||
3 years ago
|
for x in mcom mbnc mfwd mrep; do
|
||
4 years ago
|
mv $out/bin/$x $out/wrapped
|
||
|
makeWrapper $out/wrapped/$x $out/bin/$x \
|
||
|
--argv0 $out/bin/$x \
|
||
|
--prefix PATH : $out/bin \
|
||
|
--prefix PATH : ${lib.makeBinPath [
|
||
|
coreutils file gawk gnugrep gnused
|
||
|
]}
|
||
|
done
|
||
5 years ago
|
'';
|
||
|
|
||
4 years ago
|
meta = with lib; {
|
||
4 years ago
|
homepage = "https://github.com/leahneukirchen/mblaze";
|
||
|
description = "Unix utilities for processing and interacting with mail messages which are stored in maildir folders";
|
||
6 years ago
|
license = licenses.cc0;
|
||
|
platforms = platforms.all;
|
||
|
maintainers = [ maintainers.ajgrf ];
|
||
|
};
|
||
|
}
|