depot/third_party/nixpkgs/pkgs/by-name/xm/xmltoman/package.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

54 lines
1.2 KiB
Nix

{ lib
, stdenvNoCC
, fetchFromGitHub
, perlPackages
, perl
, installShellFiles
}:
stdenvNoCC.mkDerivation rec {
pname = "xmltoman";
version = "0.6";
src = fetchFromGitHub {
owner = "atsb";
repo = "xmltoman";
rev = version;
hash = "sha256-EmFdGIeBEcTY0Pqp7BJded9WB/DaXWcMNWh6aTsZlLg=";
};
nativeBuildInputs = [
perl
installShellFiles
];
buildInputs = [
perlPackages.XMLTokeParser
];
dontBuild = true;
# File installation and setup similar to Makefile commands below.
installPhase = ''
runHook preInstall
mkdir -p $out
perl xmltoman xml/xmltoman.1.xml > xmltoman.1
perl xmltoman xml/xmlmantohtml.1.xml > xmlmantohtml.1
install -d $out/bin $out/share/xmltoman
install -m 0755 xmltoman xmlmantohtml $out/bin
install -m 0644 xmltoman.dtd xmltoman.css xmltoman.xsl $out/share/xmltoman
installManPage *.1
runHook postInstall
'';
meta = with lib; {
description = "Two very simple scripts for converting xml to groff or html";
homepage = "https://github.com/atsb/xmltoman";
license = licenses.gpl2Only;
maintainers = with maintainers; [ tochiaha ];
mainProgram = "xmltoman";
platforms = platforms.all;
};
}