about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/typesetting/xmlroff/default.nix
blob: df9a607d4f272dc99b12f09a4a5e59062d608566 (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
44
45
46
47
48
49
{ stdenv, fetchurl, pkgconfig, libxml2, libxslt, popt, perl
, glib, pango, pangoxsl, gtk2, libtool, autoconf, automake }:

stdenv.mkDerivation rec {
  pname = "xmlroff";
  version = "0.6.2";

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

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

  configureScript = "./autogen.sh";

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

  hardeningDisable = [ "format" ];

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

  sourceRoot = "${pname}-${version}/xmlroff/";

  patches = [./xmlroff.patch];

  meta = {
    platforms = stdenv.lib.platforms.unix;
    license = stdenv.lib.licenses.bsd3;
  };
}