lol
1{ lib
2, stdenv
3, fetchzip
4, gnome
5, meson
6, pkg-config
7, gobject-introspection
8, ninja
9, glib
10, librest_1_0
11}:
12
13stdenv.mkDerivation rec {
14 pname = "libgovirt";
15 version = "0.3.9";
16
17 outputs = [ "out" "dev" ];
18
19 src = fetchzip {
20 url = "mirror://gnome/sources/libgovirt/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
21 sha256 = "sha256-6RDuJTyaVYlO4Kq+niQyepom6xj1lqdBbyWL/VnZUdk=";
22 };
23
24 patches = [
25 # https://gitlab.gnome.org/GNOME/libgovirt/-/issues/9
26 ./auto-disable-incompatible-compiler-warnings.patch
27 ];
28 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang (lib.concatStringsSep " " [
29 "-Wno-typedef-redefinition"
30 "-Wno-missing-field-initializers"
31 "-Wno-cast-align"
32 ]);
33
34 nativeBuildInputs = [
35 meson
36 pkg-config
37 gobject-introspection
38 ninja
39 ];
40
41 propagatedBuildInputs = [
42 glib
43 librest_1_0
44 ];
45
46 passthru = {
47 updateScript = gnome.updateScript {
48 packageName = pname;
49 versionPolicy = "none";
50 };
51 };
52
53 meta = with lib; {
54 homepage = "https://gitlab.gnome.org/GNOME/libgovirt";
55 description = "GObject wrapper for the oVirt REST API";
56 maintainers = with maintainers; [ amarshall atemu ];
57 platforms = with platforms; linux ++ darwin;
58 license = licenses.lgpl21Plus;
59 };
60}