nixos/wyoming/{faster-whisper,piper}: drop download directory (#376447)
[NixPkgs.git] / pkgs / by-name / xm / xmltoman / package.nix
blob6a3f7cbcb38a6a50180feda0f70322c58a66c52e
2   lib,
3   stdenvNoCC,
4   fetchFromGitHub,
5   perlPackages,
6   perl,
7   installShellFiles,
8 }:
10 stdenvNoCC.mkDerivation rec {
11   pname = "xmltoman";
12   version = "0.6";
14   src = fetchFromGitHub {
15     owner = "atsb";
16     repo = "xmltoman";
17     rev = version;
18     hash = "sha256-EmFdGIeBEcTY0Pqp7BJded9WB/DaXWcMNWh6aTsZlLg=";
19   };
21   nativeBuildInputs = [
22     perl
23     installShellFiles
24   ];
26   buildInputs = [
27     perlPackages.XMLTokeParser
28   ];
30   dontBuild = true;
32   # File installation and setup similar to Makefile commands below.
33   installPhase = ''
34     runHook preInstall
36     mkdir -p $out
37     perl xmltoman xml/xmltoman.1.xml > xmltoman.1
38     perl xmltoman xml/xmlmantohtml.1.xml > xmlmantohtml.1
39     install -d $out/bin $out/share/xmltoman
40     install -m 0755 xmltoman xmlmantohtml $out/bin
41     install -m 0644 xmltoman.dtd xmltoman.css xmltoman.xsl $out/share/xmltoman
42     installManPage *.1
44     runHook postInstall
45   '';
47   meta = with lib; {
48     description = "Two very simple scripts for converting xml to groff or html";
49     homepage = "https://github.com/atsb/xmltoman";
50     license = licenses.gpl2Only;
51     maintainers = with maintainers; [ tochiaha ];
52     mainProgram = "xmltoman";
53     platforms = platforms.all;
54   };