1{ stdenv
2, lib
3, fetchurl
4, gnome
5, meson
6, ninja
7, pkg-config
8, vala
9, libssh2
10, gtk-doc
11, gobject-introspection
12, gi-docgen
13, libgit2
14, glib
15, python3
16}:
17
18stdenv.mkDerivation rec {
19 pname = "libgit2-glib";
20 version = "1.1.0";
21
22 outputs = [ "out" "dev" "devdoc" ];
23
24 src = fetchurl {
25 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
26 sha256 = "w43XV12vgUHh5CIzOldfr2XzySEMCOg+mBuI3UG/HvM=";
27 };
28
29 nativeBuildInputs = [
30 meson
31 ninja
32 pkg-config
33 vala
34 gtk-doc
35 gobject-introspection
36 gi-docgen
37 ];
38
39 propagatedBuildInputs = [
40 # Required by libgit2-glib-1.0.pc
41 libgit2
42 glib
43 ];
44
45 buildInputs = [
46 libssh2
47 python3.pkgs.pygobject3 # this should really be a propagated input of python output
48 ];
49
50 mesonFlags = [
51 "-Dgtk_doc=true"
52 ];
53
54 postPatch = ''
55 for f in meson_vapi_link.py meson_python_compile.py; do
56 chmod +x $f
57 patchShebangs $f
58 done
59 '';
60
61 passthru = {
62 updateScript = gnome.updateScript {
63 packageName = pname;
64 versionPolicy = "none";
65 };
66 };
67
68 meta = with lib; {
69 description = "A glib wrapper library around the libgit2 git access library";
70 homepage = "https://wiki.gnome.org/Projects/Libgit2-glib";
71 license = licenses.lgpl21Plus;
72 maintainers = teams.gnome.members;
73 platforms = platforms.linux;
74 };
75}