2021-01-11 08:54:33 +01:00
|
|
|
{lib, stdenv, fetchurl, fetchpatch}:
|
2016-08-05 06:43:27 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2019-11-26 05:27:58 +01:00
|
|
|
pname = "par";
|
|
|
|
version = "1.52";
|
2016-08-05 06:43:27 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-04-01 03:11:51 +02:00
|
|
|
url = "http://www.nicemice.net/par/Par152.tar.gz";
|
2016-08-05 06:43:27 +02:00
|
|
|
sha256 = "33dcdae905f4b4267b4dc1f3efb032d79705ca8d2122e17efdecfd8162067082";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# A patch by Jérôme Pouiller that adds support for multibyte
|
|
|
|
# charsets (like UTF-8), plus Debian packaging.
|
|
|
|
(fetchpatch {
|
|
|
|
url = "http://sysmic.org/dl/par/par-1.52-i18n.4.patch";
|
|
|
|
sha256 = "0alw44lf511jmr38jnh4j0mpp7vclgy0grkxzqf7q158vzdb6g23";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-11-24 06:00:00 +01:00
|
|
|
makefile = "protoMakefile";
|
|
|
|
preBuild = ''
|
2021-01-13 10:00:45 +01:00
|
|
|
makeFlagsArray+=(CC="${stdenv.cc.targetPrefix}cc -c" LINK1=${stdenv.cc.targetPrefix}cc)
|
2020-11-24 06:00:00 +01:00
|
|
|
'';
|
2016-08-05 06:43:27 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp par $out/bin
|
|
|
|
|
|
|
|
mkdir -p $out/share/man/man1
|
|
|
|
cp par.1 $out/share/man/man1
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://www.nicemice.net/par/";
|
2016-08-05 06:43:27 +02:00
|
|
|
description = "Paragraph reflow for email";
|
2018-10-10 03:35:12 +02:00
|
|
|
platforms = platforms.unix;
|
|
|
|
# See https://fedoraproject.org/wiki/Licensing/Par for license details
|
|
|
|
license = licenses.free;
|
2016-08-05 06:43:27 +02:00
|
|
|
};
|
|
|
|
}
|