nixpkgs/pkgs/tools/text/par/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

40 lines
996 B
Nix

{lib, stdenv, fetchurl, fetchpatch}:
stdenv.mkDerivation {
pname = "par";
version = "1.52";
src = fetchurl {
url = "http://www.nicemice.net/par/Par152.tar.gz";
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";
})
];
buildPhase = ''make -f protoMakefile'';
installPhase = ''
mkdir -p $out/bin
cp par $out/bin
mkdir -p $out/share/man/man1
cp par.1 $out/share/man/man1
'';
meta = with lib; {
homepage = "http://www.nicemice.net/par/";
description = "Paragraph reflow for email";
platforms = platforms.unix;
# See https://fedoraproject.org/wiki/Licensing/Par for license details
license = licenses.free;
};
}