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

Open
wants to merge 2 commits into
base: master
from

Conversation

@firmero
Copy link
Contributor

firmero commented May 1, 2020

Motivation for this change

A window tiling extension for Gnome.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
cp -r $out/share/gnome-shell/extensions/$uuid/schemas/* $schemadir
'';

meta = with stdenv.lib; {

This comment has been minimized.

Copy link
@pbogdan

pbogdan May 2, 2020

Member

Would you be willing to add yourself as a maintainer of the package?

This comment has been minimized.

Copy link
@firmero

firmero May 2, 2020

Author Contributor

I will try to add, don't know exactly the procedure now.

This comment has been minimized.

Copy link
@pbogdan

pbogdan May 2, 2020

Member

Here is a fairly recent example: 3234163

Ideally this PR would then consist of two commits:

  • maintainers: add firmero
  • gnomeExtensions.gtile: init at 34

where the second commit can reference the newly added maintainers' entry in the meta attributes like so:

meta = with stdenv.lib; {
  ... # other attributes
  maintainers = [ maintainers.firmero ];
};

This comment has been minimized.

Copy link
@firmero

firmero May 2, 2020

Author Contributor

Done, thanks for the reference.

@firmero firmero force-pushed the firmero:gnomeExtensions.gtile-init branch from 0a36f3c to 5fccbfa May 2, 2020
firmero added 2 commits May 1, 2020
A window tiling extension for Gnome.
@firmero firmero force-pushed the firmero:gnomeExtensions.gtile-init branch from 5fccbfa to 2f397e9 May 2, 2020
@pbogdan
Copy link
Member

pbogdan commented May 2, 2020

LGTM, only remaining suggestion I have would be to re-order the commits so that the maintainers entry is created first.

Other than that I'll defer to @worldofpeace and @jtojnar our resident GNOME gurus (who hopefully don't mind me to summoning them directly).

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

This comment has been minimized.

Copy link
@jtojnar

jtojnar May 2, 2020

Contributor

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

This comment has been minimized.

Copy link
@firmero

firmero May 2, 2020

Author Contributor

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).

This comment has been minimized.

Copy link
@jtojnar

jtojnar May 2, 2020

Contributor

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).

This comment has been minimized.

Copy link
@firmero

firmero May 2, 2020

Author Contributor

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.

This comment has been minimized.

Copy link
@firmero

firmero May 3, 2020

Author Contributor

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


nativeBuildInputs = [ glib ];

installPhase = ''

This comment has been minimized.

Copy link
@jtojnar

jtojnar May 2, 2020

Contributor

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.

This comment has been minimized.

Copy link
@firmero

firmero May 2, 2020

Author Contributor

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.


uuid = "gTile@vibou";

nativeBuildInputs = [ glib ];

This comment has been minimized.

Copy link
@jtojnar

jtojnar May 2, 2020

Contributor

Does not seem to be used.

This comment has been minimized.

Copy link
@firmero

firmero May 2, 2020

Author Contributor

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.