mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 11:53:27 +00:00
a68e6c3731
* doclifter: 2.19 -> 2.20 (#150219) * doclifter: fix manlifter Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
36 lines
976 B
Nix
36 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;
|
|
};
|
|
}
|