zipline: refactor environment variables (#377101)
[NixPkgs.git] / pkgs / by-name / li / libgsf / package.nix
blobea749cf2c63c1c8ba28812ffb532bce4d4e1b45e
2   fetchFromGitLab,
3   lib,
4   stdenv,
5   autoreconfHook,
6   gtk-doc,
7   pkg-config,
8   intltool,
9   gettext,
10   glib,
11   libxml2,
12   zlib,
13   bzip2,
14   perl,
15   gdk-pixbuf,
16   libiconv,
17   libintl,
18   gnome,
21 stdenv.mkDerivation rec {
22   pname = "libgsf";
23   version = "1.14.53";
25   outputs = [
26     "out"
27     "dev"
28   ];
30   src = fetchFromGitLab {
31     domain = "gitlab.gnome.org";
32     owner = "GNOME";
33     repo = "libgsf";
34     rev = "LIBGSF_${lib.replaceStrings [ "." ] [ "_" ] version}";
35     hash = "sha256-vC/6QEoV6FvFxQ0YlMkBbTmAtqbkvgZf+9BU8epi8yo=";
36   };
38   postPatch = ''
39     # Fix cross-compilation
40     substituteInPlace configure.ac \
41       --replace "AC_PATH_PROG(PKG_CONFIG, pkg-config, no)" \
42                 "PKG_PROG_PKG_CONFIG"
43   '';
45   strictDeps = true;
47   nativeBuildInputs = [
48     autoreconfHook
49     gtk-doc
50     pkg-config
51     intltool
52     libintl
53   ];
55   buildInputs = [
56     gettext
57     bzip2
58     zlib
59   ];
61   nativeCheckInputs = [
62     perl
63   ];
65   propagatedBuildInputs = [
66     libxml2
67     glib
68     gdk-pixbuf
69     libiconv
70   ];
72   doCheck = true;
74   preCheck = ''
75     patchShebangs ./tests/
76   '';
78   # checking pkg-config is at least version 0.9.0... ./configure: line 15213: no: command not found
79   # configure: error: in `/build/libgsf-1.14.50':
80   # configure: error: The pkg-config script could not be found or is too old.  Make sure it
81   # is in your PATH or set the PKG_CONFIG environment variable to the full
82   preConfigure = ''
83     export PKG_CONFIG="$(command -v "$PKG_CONFIG")"
84   '';
86   passthru = {
87     updateScript = gnome.updateScript {
88       packageName = pname;
89       versionPolicy = "odd-unstable";
90     };
91   };
93   meta = with lib; {
94     description = "GNOME's Structured File Library";
95     homepage = "https://www.gnome.org/projects/libgsf";
96     license = licenses.lgpl21Only;
97     maintainers = with maintainers; [ lovek323 ];
98     platforms = lib.platforms.unix;
100     longDescription = ''
101       Libgsf aims to provide an efficient extensible I/O abstraction for
102       dealing with different structured file formats.
103     '';
104   };