2024-09-19 14:19:46 +00:00
|
|
|
{
|
|
|
|
fetchurl,
|
|
|
|
lib,
|
|
|
|
libxml2,
|
|
|
|
makeWrapper,
|
|
|
|
python3,
|
|
|
|
stdenv,
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-07-21 07:28:18 +00:00
|
|
|
pname = "doclifter";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "2.21";
|
2024-09-19 14:19:46 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2024-09-19 14:19:46 +00:00
|
|
|
url = "http://www.catb.org/~esr/doclifter/doclifter-${finalAttrs.version}.tar.gz";
|
|
|
|
hash = "sha256-3zb+H/rRmU87LWh0+kQtiRMZ4JwJ3tVrt8vQ/EeKx8Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-09-19 14:19:46 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace manlifter \
|
|
|
|
--replace-fail '/usr/bin/env python2' '/usr/bin/env python3'
|
|
|
|
2to3 -w manlifter
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
python3
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
buildInputs = [ python3 ];
|
|
|
|
|
|
|
|
strictDeps = true;
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $out/share/man/man1
|
|
|
|
cp manlifter $out/bin
|
2022-01-03 16:56:52 +00:00
|
|
|
wrapProgram "$out/bin/manlifter" \
|
2024-09-19 14:19:46 +00:00
|
|
|
--prefix PATH : "${lib.getBin libxml2}/bin:$out/bin"
|
|
|
|
gzip < manlifter.1 > $out/share/man/man1/manlifter.1.gz
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
2024-09-19 14:19:46 +00:00
|
|
|
changelog = "https://gitlab.com/esr/doclifter/-/blob/2.21/NEWS";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Lift documents in nroff markups to XML-DocBook";
|
|
|
|
homepage = "http://www.catb.org/esr/doclifter";
|
2024-09-19 14:19:46 +00:00
|
|
|
license = lib.licenses.bsd2;
|
|
|
|
mainProgram = "doclifter";
|
2021-02-05 17:12:51 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-09-19 14:19:46 +00:00
|
|
|
})
|