2022-01-03 16:56:52 +00:00
|
|
|
{ lib, stdenv, fetchurl, python3, makeWrapper, libxml2 }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "doclifter";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "2.21";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2021-07-21 07:28:18 +00:00
|
|
|
url = "http://www.catb.org/~esr/${pname}/${pname}-${version}.tar.gz";
|
2024-02-29 20:09:43 +00:00
|
|
|
sha256 = "sha256-3zb+H/rRmU87LWh0+kQtiRMZ4JwJ3tVrt8vQ/EeKx8Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2021-03-20 04:20:00 +00:00
|
|
|
buildInputs = [ python3 ];
|
2022-01-03 16:56:52 +00:00
|
|
|
nativeBuildInputs = [ python3 makeWrapper ];
|
2021-03-20 04:20:00 +00:00
|
|
|
|
|
|
|
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
|
2022-01-03 16:56:52 +00:00
|
|
|
substituteInPlace manlifter \
|
|
|
|
--replace '/usr/bin/env python2' '/usr/bin/env python3'
|
|
|
|
2to3 -w manlifter
|
2020-04-24 23:36:52 +00:00
|
|
|
cp manlifter $out/bin
|
2022-01-03 16:56:52 +00:00
|
|
|
wrapProgram "$out/bin/manlifter" \
|
|
|
|
--prefix PATH : "${libxml2}/bin:$out/bin"
|
2020-04-24 23:36:52 +00:00
|
|
|
cp manlifter.1 $out/share/man/man1
|
|
|
|
'';
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
description = "Lift documents in nroff markups to XML-DocBook";
|
|
|
|
homepage = "http://www.catb.org/esr/doclifter";
|
|
|
|
license = "BSD";
|
2021-02-05 17:12:51 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|