depot/third_party/nixpkgs/pkgs/development/tools/misc/doclifter/default.nix
Default email 2495e3f88b Project import generated by Copybara.
GitOrigin-RevId: 78cd22c1b8604de423546cd49bfe264b786eca13
2022-01-03 17:56:52 +01:00

35 lines
976 B
Nix

{ lib, stdenv, fetchurl, python3, makeWrapper, libxml2 }:
stdenv.mkDerivation rec {
pname = "doclifter";
version = "2.20";
src = fetchurl {
url = "http://www.catb.org/~esr/${pname}/${pname}-${version}.tar.gz";
sha256 = "sha256-BEuMbICJ8TD3+VjUr8rmhss7XlPNjxSy1P0SkmKLPsc=";
};
buildInputs = [ python3 ];
nativeBuildInputs = [ python3 makeWrapper ];
strictDeps = true;
makeFlags = [ "PREFIX=$(out)" ];
preInstall = ''
mkdir -p $out/bin
mkdir -p $out/share/man/man1
substituteInPlace manlifter \
--replace '/usr/bin/env python2' '/usr/bin/env python3'
2to3 -w manlifter
cp manlifter $out/bin
wrapProgram "$out/bin/manlifter" \
--prefix PATH : "${libxml2}/bin:$out/bin"
cp manlifter.1 $out/share/man/man1
'';
meta = {
description = "Lift documents in nroff markups to XML-DocBook";
homepage = "http://www.catb.org/esr/doclifter";
license = "BSD";
platforms = lib.platforms.unix;
};
}