evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / gn / gnome-shell-extensions / package.nix
blob3997815c28a80a1635f81855b6cb45b1f2119d48
2   lib,
3   stdenv,
4   fetchurl,
5   meson,
6   ninja,
7   gettext,
8   pkg-config,
9   libgtop,
10   glib,
11   gnome,
12   gnome-menus,
13   substituteAll,
16 stdenv.mkDerivation (finalAttrs: {
17   pname = "gnome-shell-extensions";
18   version = "47.1";
20   src = fetchurl {
21     url = "mirror://gnome/sources/gnome-shell-extensions/${lib.versions.major finalAttrs.version}/gnome-shell-extensions-${finalAttrs.version}.tar.xz";
22     hash = "sha256-6UOMxdOfmHXf0E6gq7UeWWLqrVwgJ0EjJDsWEgmLOoU=";
23   };
25   patches = [
26     (substituteAll {
27       src = ./fix_gmenu.patch;
28       gmenu_path = "${gnome-menus}/lib/girepository-1.0";
29     })
30     (substituteAll {
31       src = ./fix_gtop.patch;
32       gtop_path = "${libgtop}/lib/girepository-1.0";
33     })
34   ];
36   nativeBuildInputs = [
37     meson
38     ninja
39     pkg-config
40     gettext
41     glib
42   ];
44   mesonFlags = [ "-Dextension_set=all" ];
46   preFixup = ''
47     # Since we do not install the schemas to central location,
48     # let’s link them to where extensions installed
49     # through the extension portal would look for them.
50     # Adapted from export-zips.sh in the source.
52     extensiondir=$out/share/gnome-shell/extensions
53     schemadir=${glib.makeSchemaPath "$out" "$name"}
55     for f in $extensiondir/*; do
56       name=$(basename "''${f%%@*}")
57       schema=$schemadir/org.gnome.shell.extensions.$name.gschema.xml
58       schemas_compiled=$schemadir/gschemas.compiled
60       if [[ -f $schema ]]; then
61         mkdir "$f/schemas"
62         ln -s "$schema" "$f/schemas"
63         ln -s "$schemas_compiled" "$f/schemas"
64       fi
65     done
66   '';
68   passthru = {
69     updateScript = gnome.updateScript { packageName = "gnome-shell-extensions"; };
70   };
72   meta = with lib; {
73     homepage = "https://gitlab.gnome.org/GNOME/gnome-shell-extensions";
74     changelog = "https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/blob/${finalAttrs.version}/NEWS?ref_type=tags";
75     description = "Modify and extend GNOME Shell functionality and behavior";
76     maintainers = teams.gnome.members;
77     license = licenses.gpl2Plus;
78     platforms = platforms.linux;
79   };