Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnomeExtensions.gtile: init at 34 #86451

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2568,6 +2568,12 @@
githubId = 415760;
name = "Jonas Höglund";
};
firmero = {
email = "[email protected]";
github = "firmero";
githubId = 25690815;
name = "Roman Firment";
};
fishi0x01 = {
email = "[email protected]";
github = "fishi0x01";
Expand Down
34 changes: 34 additions & 0 deletions pkgs/desktops/gnome-3/extensions/gtile/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{ stdenv, fetchFromGitHub, glib }:

stdenv.mkDerivation rec {
pname = "gnome-shell-extension-gtile";
version = "34";

src = fetchFromGitHub {
owner = "gTile";
repo = "gTile";
rev = "V${version}";
sha256 = "1yka4acmrykh4vdd89yvn6yv89c6q16r72lgi3j48my3jghwjiwp";
};

uuid = "gTile@vibou";

nativeBuildInputs = [ glib ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not seem to be used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, is see, glib is used only in ${glib.makeSchemaPath} expression and there is no internal usage of glib (e.g. glib-compile-schemas usage while Makefile target producing).


installPhase = ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When overriding installPhase, you should also provide runHook preInstall and runHook postInstall. Though, in this case, it is better to rely on the default installPhase.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just used the same approach which is used is another extensions within gnome-3 extensions directory. In general, i think that nix files in that directory should be refactored, to look consistent.

mkdir -p $out/share/gnome-shell/extensions/$uuid
cp -r * $out/share/gnome-shell/extensions/$uuid
schemadir=${glib.makeSchemaPath "$out" "${pname}-${version}"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the schemas installed to the extension directory as done on the first line not work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They work in the way that i can see extension settings from Extensions app but cannot see them if I run dconf-editor. If i copy schemas to schemadir and add extension package to services.xserver.desktopManager.gnome3.sessionPath list, then it works (that schemadir is appended in variable XDG_DATA_DIR).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I do not think the schemas of extensions are expected to be seen in dconf editor. And I am still not sure if dconf-editor is even compatible with Nix (since it relies on global data like sessionPath).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From description of sessionPath option:

Additional list of packages to be added to the session search path. Useful for GNOME Shell extensions or GSettings-conditional autostart. Note that this should be a last resort; patching the package is preferred (see GPaste).

I've took a look at gpaste and been inspirited with usage of glib.makeSchemaPath.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My motivation was to get option names using dconf-editor, without looking at the xml schema of extension.

mkdir -p $schemadir
cp -r $out/share/gnome-shell/extensions/$uuid/schemas/* $schemadir
'';

meta = with stdenv.lib; {
SuperSandro2000 marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
meta = with stdenv.lib; {
meta = with lib; {

description = "GNOME shell extension to move/resize windows on a configurable grid scheme";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = [ maintainers.firmero ];
homepage = "https://github.com/gTile/gTile";
};
}
1 change: 1 addition & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24091,6 +24091,7 @@ in
draw-on-your-screen = callPackage ../desktops/gnome-3/extensions/draw-on-your-screen { };
drop-down-terminal = callPackage ../desktops/gnome-3/extensions/drop-down-terminal { };
gsconnect = callPackage ../desktops/gnome-3/extensions/gsconnect { };
gtile = callPackage ../desktops/gnome-3/extensions/gtile { };
icon-hider = callPackage ../desktops/gnome-3/extensions/icon-hider { };
impatience = callPackage ../desktops/gnome-3/extensions/impatience { };
mpris-indicator-button = callPackage ../desktops/gnome-3/extensions/mpris-indicator-button { };
Expand Down