summary refs log tree commit diff
path: root/pkgs/tools/typesetting/xmlroff/default.nix
blob: 7bd34f40250466c656e0026ccfeef6e679367fc0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{ stdenv, fetchurl, pkgconfig, libxml2, libxslt, popt, perl
, glib, pango, pangoxsl, gtk, libtool, autoconf, automake }:

stdenv.mkDerivation rec {
  name = "xmlroff-${version}";
  version = "0.6.2";

  src = fetchurl {
    url = "https://github.com/xmlroff/xmlroff/archive/v${version}.tar.gz";
    sha256 = "1sczn6xjczsfdxlbjqv4xqlki2a95y2s8ih2nl9v1vhqfk17fiww";
  };

  buildInputs = [
    pkgconfig
    autoconf
    automake
    libxml2
    libxslt
    libtool
    glib
    pango
    pangoxsl
    gtk
    popt
  ];

  configureScript = "./autogen.sh";

  configureFlags = "--disable-pangoxsl --disable-gp";

  preBuild = ''
    substituteInPlace tools/insert-file-as-string.pl --replace "/usr/bin/perl" "${perl}/bin/perl"
    substituteInPlace Makefile --replace "docs" ""
  '';

  sourceRoot = "${name}/xmlroff/";

  patches = [./xmlroff.patch];

  meta = {
    platforms = stdenv.lib.platforms.unix;
  };
}