summary refs log tree commit diff
path: root/pkgs/development/tools/documentation/gnome-doc-utils/default.nix
blob: 2e04d3dd365e99705709d37d0cb61d0613d0b982 (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
{ lib, stdenv, fetchurl, pkg-config, libxml2Python, libxslt, intltool, gnome3
, python2Packages }:

python2Packages.buildPythonApplication rec {
  pname = "gnome-doc-utils";
  version = "0.20.10";

  format = "other";

  src = fetchurl {
    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
    sha256 = "19n4x25ndzngaciiyd8dd6s2mf9gv6nv3wv27ggns2smm7zkj1nb";
  };

  nativeBuildInputs = [ intltool pkg-config libxslt.dev ];
  buildInputs = [ libxslt ];

  configureFlags = [ "--disable-scrollkeeper" ];

  preBuild = ''
    substituteInPlace xml2po/xml2po/Makefile --replace '-e "s+^#!.*python.*+#!$(PYTHON)+"' '-e "s\"^#!.*python.*\"#!$(PYTHON)\""'
  '';

  propagatedBuildInputs = [ libxml2Python ];

  passthru = {
    updateScript = gnome3.updateScript {
      packageName = pname;
    };
  };

  postFixup = ''
    # Do not propagate Python
    rm $out/nix-support/propagated-build-inputs
  '';

  meta = with lib; {
    description = "Collection of documentation utilities for the GNOME project";
    homepage = "https://gitlab.gnome.org/GNOME/gnome-doc-utils";
    license = with licenses; [ gpl2Plus lgpl2Plus ];
    platforms = platforms.all;
  };
}