python312Packages.mandown: 1.10.0 -> 1.10.1 (#370595)
[NixPkgs.git] / pkgs / development / libraries / libgda / 6.x.nix
blobf0f23ec7953b96a5f51f8b18a49f46c759ba7e9b
2   lib,
3   stdenv,
4   fetchurl,
5   fetchpatch,
6   pkg-config,
7   intltool,
8   meson,
9   ninja,
10   itstool,
11   libxml2,
12   python3,
13   gtk3,
14   json-glib,
15   isocodes,
16   openssl,
17   gnome,
18   gobject-introspection,
19   vala,
20   libgee,
21   sqlite,
22   gtk-doc,
23   yelp-tools,
24   mysqlSupport ? false,
25   libmysqlclient ? null,
26   postgresSupport ? false,
27   postgresql ? null,
30 assert mysqlSupport -> libmysqlclient != null;
31 assert postgresSupport -> postgresql != null;
33 stdenv.mkDerivation rec {
34   pname = "libgda";
35   version = "6.0.0";
37   src = fetchurl {
38     url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
39     sha256 = "0w564z7krgjk19r39mi5qn4kggpdg9ggbyn9pb4aavb61r14npwr";
40   };
42   patches = [
43     # Fix undefined behavior
44     (fetchpatch {
45       url = "https://gitlab.gnome.org/GNOME/libgda/-/commit/657b2f8497da907559a6769c5b1d2d7b5bd40688.patch";
46       sha256 = "Qx4S9KQsTAr4M0QJi0Xr5kKuHSp4NwZJHoRPYyxIyTk=";
47     })
49     # Fix building vapi
50     (fetchpatch {
51       url = "https://gitlab.gnome.org/GNOME/libgda/-/commit/57f618a3b2a3758ee3dcbf9bbdc566122dd8566d.patch";
52       sha256 = "pyfymUd61m1kHaGyMbUQMma+szB8mlqGWwcFBBQawf8=";
53     })
55     (fetchpatch {
56       name = "CVE-2021-39359.patch";
57       url = "https://gitlab.gnome.org/GNOME/libgda/-/commit/bebdffb4de586fb43fd07ac549121f4b22f6812d.patch";
58       sha256 = "sha256-UjHP1nhb5n6TOdaMdQeE2s828T4wv/0ycG3FAk+I1QA=";
59     })
60   ];
62   nativeBuildInputs = [
63     pkg-config
64     intltool
65     meson
66     ninja
67     itstool
68     libxml2
69     python3
70     gobject-introspection
71     vala
72     gtk-doc
73     yelp-tools
74   ];
76   buildInputs =
77     [
78       gtk3
79       json-glib
80       isocodes
81       openssl
82       libgee
83       sqlite
84     ]
85     ++ lib.optionals mysqlSupport [
86       libmysqlclient
87     ]
88     ++ lib.optionals postgresSupport [
89       postgresql
90     ];
92   env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=incompatible-function-pointer-types";
94   postPatch = ''
95     patchShebangs \
96       providers/raw_spec.py \
97       providers/mysql/gen_bin.py
98   '';
100   passthru = {
101     updateScript = gnome.updateScript {
102       packageName = pname;
103       attrPath = "libgda6";
104       versionPolicy = "odd-unstable";
105     };
106   };
108   meta = with lib; {
109     description = "Database access library";
110     homepage = "https://www.gnome-db.org/";
111     license = with licenses; [
112       # library
113       lgpl2Plus
114       # CLI tools
115       gpl2Plus
116     ];
117     maintainers = teams.gnome.members;
118     platforms = platforms.unix;
119   };