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.drop-down-terminal: init at v24 #69834
Conversation
This one require a few dependencies at runtime which needs fixing:
|
pkgs/desktops/gnome-3/extensions/drop-down-terminal/default.nix
Outdated
Show resolved
Hide resolved
pkgs/desktops/gnome-3/extensions/drop-down-terminal/default.nix
Outdated
Show resolved
Hide resolved
Co-Authored-By: worldofpeace <worldofpeace@protonmail.ch>
Co-Authored-By: worldofpeace <worldofpeace@protonmail.ch>
@hedning And for the second, I should change in the |
Ah, right, I only meant that the fixes needed here are the same kind of fixes that I referenced. So the patch will look something like this: modified drop-down-terminal@gs-extensions.zzrough.org/extension.js
@@ -15,6 +15,8 @@
// Author: Stéphane Démurget <stephane.demurget@free.fr>
+imports.gi.GIRepository.Repository.prepend_search_path('@vte@/lib/lib/girepository-1.0')
+
const Lang = imports.lang;
const Gettext = imports.gettext.domain("drop-down-terminal");
const Mainloop = imports.mainloop;
@@ -653,7 +655,7 @@ const DropDownTerminalExtension = new Lang.Class({
this._killingChild = false;
// finds the forking arguments
- let args = ["gjs", GLib.build_filenamev([Me.path, "terminal.js"]), Me.path];
+ let args = ["@gjs@/bin/gjs", GLib.build_filenamev([Me.path, "terminal.js"]), Me.path];
// forks the process
debug("forking '" + args.join(" ") + "'"); And then patches = [
(substituteAll {
src = ./fix_paths.patch;
vte = vte;
gjs = gnome3.gjs;
} Does that make sense? |
@hedning One question, how do you test this and know that some libs needs absolutePath? I'm just running |
pkgs/desktops/gnome-3/extensions/drop-down-terminal/fix_gjs.patch
Outdated
Show resolved
Hide resolved
Right, you basically need to run things and see if they work. For regular programs that's usually as simple as In the case of gnome-shell extensions we need to run gnome-shell and activate the extension. Doing this in your current gnome-shell can be a bit annoying. To solve that there's two options:
Building a virtual machine can be very useful in general. Put something like into { pkgs, config, ... }:
{
environment.systemPackages = with pkgs; [
gnomeExtensions.drop-down-terminal
];
services.openssh.enable = true;
boot.cleanTmpDir = true;
services.xserver = {
enable = true;
desktopManager = {
gnome3.enable = true;
gnome3.debug = true;
};
displayManager = {
gdm.enable = true;
gdm.debug = true;
};
};
users.users.foo = {
isNormalUser = true;
uid = 1000;
password = "foobar";
extraGroups = [ "wheel" "networkmanager" ];
openssh.authorizedKeys.keys = [
# put your machines public key here to get ssh access
];
};
system.stateVersion = "16.09";
} And then build and run the VM like this for instance: nixos-rebuild build-vm -I nixpkgs=./. -I nixos-config=./vm.nix
QEMU_NET_OPTS="hostfwd=tcp::2222-:22" ./result/bin/run-*-vm -m 2500 Then you can log in and activate the extension with gnome-tweaks. Now that takes a while. I use this script through emacs (session.sh) to easily launch nested gnome-shells to test and develop extensions. For that something like this should work: nix build -f. gnomeExtensions.drop-down-terminal
session.sh wayland result/share/gnome-shell/extensions/drop-down-terminal@gs-extensions.zzrough.org/ drop-down-terminal@gs-extensions.zzrough.org |
Uow, its a great way to test, I'll try to setup this and test this whole thing, thank you! |
Right, looks like |
Finally worked! |
@ericdallo It appears you're trying to merge this into |
hum, makes sense @worldofpeace , so i need to open the PR to the master, right? |
@ericdallo Likely, it's the easiest route. It also appears you're working directly on the Best to do
|
Got it, I'll create a branch from updated master, open a new PR with theese changes and link it here. Thank you @worldofpeace |
vte = vte; | ||
gjs = gnome3.gjs; | ||
}) | ||
(substituteAll { | ||
src = ./fix_vte_on_terminal.patch; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to just put everything into the same file tbh.
Right and squash everything into one commit :) |
New PR with commits squashed #70042 |
Motivation for this change
Add the drop down terminal GNOME shell extension.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)