Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

xmltoman: init at 0.6 #305096

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
54 changes: 54 additions & 0 deletions pkgs/by-name/xm/xmltoman/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{ 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
Tochiaha marked this conversation as resolved.
Show resolved Hide resolved

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;
};
}