git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #147542: gnomeExtensions.pop-shell: init
commit461a7d223c7f32b4eb9727e07a93f873568ff0ad authorpiegames <git@piegames.de> dateWed 1 Dec 2021, 11:33 (5 years ago) parente89d789753c1f5
3 files changed+104
pkgs/desktops/gnome/extensions/manuallyPackaged.nix+1 pkgs/desktops/gnome/extensions/pop-shell/default.nix+36 pkgs/desktops/gnome/extensions/pop-shell/fix-gjs.patch+67
pkgs/desktops/gnome/extensions/manuallyPackaged.nix+1
@@ -14,6 +14,7 @@
1414 "no-title-bar@jonaspoehler.de" = callPackage ./no-title-bar { };
1515 "paperwm@hedning:matrix.org" = callPackage ./paperwm { };
1616 "pidgin@muffinmad" = callPackage ./pidgin-im-integration { };
17+ "pop-shell@system76.com" = callPackage ./pop-shell { };
1718 "sound-output-device-chooser@kgshank.net" = callPackage ./sound-output-device-chooser { };
1819 "system-monitor@paradoxxx.zero.gmail.com" = callPackage ./system-monitor { };
1920 "taskwhisperer-extension@infinicode.de" = callPackage ./taskwhisperer { };
pkgs/desktops/gnome/extensions/pop-shell/default.nixnew file+36
@@ -0,0 +1,36 @@
1+{ stdenv, lib, fetchFromGitHub, glib, nodePackages, gjs }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "gnome-shell-extension-pop-shell";
5+ version = "unstable-2021-11-30";
6+
7+ src = fetchFromGitHub {
8+ owner = "pop-os";
9+ repo = "shell";
10+ rev = "4b65ee865d01436ec75a239a0586a2fa6051b8c3";
11+ sha256 = "DHmp3kzBgbyxRe0TjER/CAqyUmD9LeRqAFQ9apQDzfk=";
12+ };
13+
14+ nativeBuildInputs = [ glib nodePackages.typescript gjs ];
15+
16+ buildInputs = [ gjs ];
17+
18+ patches = [
19+ ./fix-gjs.patch
20+ ];
21+
22+ makeFlags = [ "XDG_DATA_HOME=$(out)/share" ];
23+
24+ passthru = {
25+ extensionUuid = "pop-shell@system76.com";
26+ extensionPortalSlug = "pop-shell";
27+ };
28+
29+ meta = with lib; {
30+ description = "Keyboard-driven layer for GNOME Shell";
31+ license = licenses.gpl3Only;
32+ platforms = platforms.linux;
33+ maintainers = [ maintainers.genofire ];
34+ homepage = "https://github.com/pop-os/shell";
35+ };
36+}
pkgs/desktops/gnome/extensions/pop-shell/fix-gjs.patchnew file+67
@@ -0,0 +1,67 @@
1+diff --git a/src/color_dialog/src/main.ts b/src/color_dialog/src/main.ts
2+index 9522499..9911530 100644
3+--- a/src/color_dialog/src/main.ts
4++++ b/src/color_dialog/src/main.ts
5+@@ -1,4 +1,4 @@
6+-#!/usr/bin/gjs
7++#!/usr/bin/env gjs
8+
9+ imports.gi.versions.Gtk = '3.0';
10+
11+@@ -84,4 +84,4 @@ function launch_color_dialog() {
12+
13+ Gtk.init(null);
14+
15+-launch_color_dialog()
16+\ No newline at end of file
17++launch_color_dialog()
18+diff --git a/src/extension.ts b/src/extension.ts
19+index 7417c46..00d5829 100644
20+--- a/src/extension.ts
21++++ b/src/extension.ts
22+@@ -534,7 +534,7 @@ export class Ext extends Ecs.System<ExtEvent> {
23+ return true
24+ }
25+
26+- const ipc = utils.async_process_ipc(["gjs", path])
27++ const ipc = utils.async_process_ipc([path])
28+
29+ if (ipc) {
30+ const generator = (stdout: any, res: any) => {
31+diff --git a/src/floating_exceptions/src/main.ts b/src/floating_exceptions/src/main.ts
32+index f298ec7..87a6bc4 100644
33+--- a/src/floating_exceptions/src/main.ts
34++++ b/src/floating_exceptions/src/main.ts
35+@@ -1,4 +1,4 @@
36+-#!/usr/bin/gjs
37++#!/usr/bin/env gjs
38+
39+ imports.gi.versions.Gtk = '3.0'
40+
41+@@ -329,4 +329,4 @@ function main() {
42+ Gtk.main()
43+ }
44+
45+-main()
46+\ No newline at end of file
47++main()
48+diff --git a/src/panel_settings.ts b/src/panel_settings.ts
49+index 83ff56c..1bc1e98 100644
50+--- a/src/panel_settings.ts
51++++ b/src/panel_settings.ts
52+@@ -338,7 +338,7 @@ function color_selector(ext: Ext, menu: any) {
53+ color_selector_item.add_child(color_button);
54+ color_button.connect('button-press-event', () => {
55+ let path = Me.dir.get_path() + "/color_dialog/main.js";
56+- let resp = GLib.spawn_command_line_async(`gjs ${path}`);
57++ let resp = GLib.spawn_command_line_async(path);
58+ if (!resp) {
59+
60+ return null;
61+@@ -353,4 +353,4 @@ function color_selector(ext: Ext, menu: any) {
62+ });
63+
64+ return color_selector_item;
65+-}
66+\ No newline at end of file
67++}