From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 13 10:26:48 2025 Received: (at submit) by debbugs.gnu.org; 13 Apr 2025 14:26:48 +0000 Received: from localhost ([127.0.0.1]:43269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u3yIJ-0007ci-LR for submit@debbugs.gnu.org; Sun, 13 Apr 2025 10:26:48 -0400 Received: from lists.gnu.org ([2001:470:142::17]:48228) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u3yIG-0007cS-L5 for submit@debbugs.gnu.org; Sun, 13 Apr 2025 10:26:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u3xoo-0005Dx-KD for guix-patches@gnu.org; Sun, 13 Apr 2025 09:56:18 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u3xom-0007vp-Pt for guix-patches@gnu.org; Sun, 13 Apr 2025 09:56:18 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-43cf58eea0fso17644475e9.0 for ; Sun, 13 Apr 2025 06:56:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744552571; x=1745157371; darn=gnu.org; h=message-id:date:mime-version:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=qmdYbQXdqCKCUS3y5kr9KdsfVZRrEvjqYIyH1XP9L74=; b=JLPxbaZ4eb/9HYiyscKS03YU1cnaez1ITGwdT61RrVEAfKhj36Elf4YMOeUWpQ6twH tKzt35V/TNNruQ3eOdfCVxVRZPNyU51tZ7liS/3tWgVcxR/JbYtdHSHclmy/e3GeMdoB X4S13myA82Bzo2NysneZSt/+BVoj+HCCX0q61tKj6Qnq+jiRT1odDIW/FqRUZMlHGlH7 N1GZ963MDp7u2YCYF5r3mxKFPlntMMSu8TQj3q5nGtTqEIts80Qjuvtw/H0GZdNh+ZSz anVZHVhrqyBjAOr51vtA6ZnS8NnrKeOrCgR8a5uCYNyYjJa7YrAn1RmVfK+vL2jbplMW 0Rqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744552571; x=1745157371; h=message-id:date:mime-version:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=qmdYbQXdqCKCUS3y5kr9KdsfVZRrEvjqYIyH1XP9L74=; b=UxBbxgt7BcnbnHAiypO3fV9vlRj5q+HHo3OV1g7vGBZX9umvybylekM83MXyozuTj5 yKsOZvjv2wuGZ7oTmuWYtJBqPrHDKIwh4iXWMbaWVK8Hj1aQ5oaHiHHC6jhv1yIGrMZG oyRbVNAmxl8LiKwRNQnDtSwk6m5dyg6us/rC+tLIX/svdiapOCU9Plt7jDw6zOsS/g/f itU9GUPUljAHQqOjCblEpw+JkPdr7HNCVrpOeiGZ/kKj+Gxw2n9H7ZywC0RGeMwRpeOY Iv4AGuAlQrFm9Hl4s/sr+PhX4f8TSAkghbWTesEmQDKBoSw/4TVadVAQWxo3Oeqyk9ni 5UyA== X-Gm-Message-State: AOJu0YxPSRslHP3hhv1uG6Eicueu02MERmmWRW7ZeNrGrX/oNSfpbF5o 3EYPvQBkZ/E/HvElmTBDK7i4hTKai51Qond9w+N6JYY5YmF+PO5MseZ5r5pM X-Gm-Gg: ASbGncucmdaCZuvBdh7oh3wzw/Jy0vAf+JqC7zZqptAMxulORsoemE3wZWYNw2TdS5v qD/XWu0zZESmXt6adtXpeGj574ErkBdYfAf+PDVs+BkAiFE6l0FFGq20Zsa2t2dRF2Jh1Wmc/zp KH+lELRbhvHk1pHhg9yaiCUqZtYHakf004YQYyaQFi55LonYqwI2x89fec8ZzdkYjI7ZBT2D5V6 xufB8uPea5+fyEwjWUOroxZVEa40a5I5J5rHxQh8qoN2AOAy/KpY1lm0CVjIcSb0rN6uXOv5tdk Ay97I/zw+S0+KKqWKKc3cyEcZAB6a6oPMR2/ X-Google-Smtp-Source: AGHT+IG7FuMRUn/4BXBzmHmHUDsCFzKd7PJUPSax0i3j3nbqTllS9jZBi34oSYlRLdXNRUU13p8k2A== X-Received: by 2002:a05:600c:5026:b0:43c:f1b8:16ad with SMTP id 5b1f17b1804b1-43f3a9aee21mr92214715e9.30.1744552570418; Sun, 13 Apr 2025 06:56:10 -0700 (PDT) Received: from localhost ([82.151.112.249]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39eae9640bcsm7950508f8f.1.2025.04.13.06.56.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Apr 2025 06:56:10 -0700 (PDT) From: Grigory Shepelev To: guix-patches@gnu.org Subject: [PATCH] gnu: gpaste: version bump + fix build MIME-Version: 1.0 Content-Type: text/plain Date: Sat, 12 Apr 2025 07:26:15 +0300 Message-ID: <87semcyxlc.fsf@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=shegeley@gmail.com; helo=mail-wm1-x336.google.com X-Spam_score_int: -7 X-Spam_score: -0.8 X-Spam_bar: / X-Spam_report: (-0.8 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_24_48=1.34, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Bumped version + completely copied build from Nixpkgs. Change-Id: I8506dcb11617f82cbbf4dbe446f37ec0b91083a1 --- gnu/packages/aux-files/gpaste/wrapper.js | 5 +++ gnu/packages/gnome-xyz.scm | 37 +++++++++++++++++---- gnu/packages/patches/gpaste-fix-paths.pa [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org] 0.5 DATE_IN_PAST_24_48 Date: is 24 to 48 hours before Received: date -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (shegeley[at]gmail.com) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Bumped version + completely copied build from Nixpkgs. Change-Id: I8506dcb11617f82cbbf4dbe446f37ec0b91083a1 --- gnu/packages/aux-files/gpaste/wrapper.js | 5 +++ gnu/packages/gnome-xyz.scm | 37 +++++++++++++++++---- gnu/packages/patches/gpaste-fix-paths.patch | 35 ++----------------- 3 files changed, 38 insertions(+), 39 deletions(-) create mode 100644 gnu/packages/aux-files/gpaste/wrapper.js diff --git a/gnu/packages/aux-files/gpaste/wrapper.js b/gnu/packages/aux-files/gpaste/wrapper.js new file mode 100644 index 0000000000..ea6a9cba6f --- /dev/null +++ b/gnu/packages/aux-files/gpaste/wrapper.js @@ -0,0 +1,5 @@ +import GIRepository from 'gi://GIRepository'; + +GIRepository.Repository.prepend_search_path('@typelibDir@'); + +export default (await import('./.@originalName@-wrapped.js')).default; diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm index 8e2ffb49cb..a41033df70 100644 --- a/gnu/packages/gnome-xyz.scm +++ b/gnu/packages/gnome-xyz.scm @@ -1045,7 +1045,7 @@ (define-public gnome-shell-extension-night-theme-switcher (define-public gpaste (package (name "gpaste") - (version "44.1") + (version "45.2") (source (origin (method git-fetch) (uri (git-reference @@ -1054,7 +1054,7 @@ (define-public gpaste (file-name (git-file-name name version)) (sha256 (base32 - "1amfr8hwf7401xa3fzaa8w17w3v3lxx0fkr7rqkkyfy57iavrykk")) + "1x8rqxqzggvzs0hr9hkwq9gmzn1m16jwllml4m4bxrdib4c9lh8q")) (patches (search-patches "gpaste-fix-paths.patch")))) (build-system meson-build-system) @@ -1088,11 +1088,34 @@ (define-public gpaste (lambda _ (substitute* "src/libgpaste/gpaste/gpaste-settings.c" (("@gschemasCompiled@") - (string-append #$output "/share/glib-2.0/schemas/"))) - (substitute* '("src/gnome-shell/extension.js" - "src/gnome-shell/prefs.js") - (("@typelibPath@") - (string-append #$output "/lib/girepository-1.0/")))))))) + (string-append #$output "/share/glib-2.0/schemas/"))))) + (add-after 'install 'wrap-typelib + ;; absolute copy from nixpkgs + ;; https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/gp/gpaste/package.nix#L67 + (lambda _ + (let* [(extension-dir + (string-append + #$output + "/share" + "/gnome-shell" + "/extensions" + "/GPaste@gnome-shell-extensions.gnome.org")) + (extension.js (string-append extension-dir "/extension.js")) + (extension-wrapped.js (string-append extension-dir "/.extension-wrapped.js")) + (prefs.js (string-append extension-dir "/prefs.js")) + (prefs-wrapped.js (string-append extension-dir "/.prefs-wrapped.js")) + (wrapper.js #$(local-file (search-auxiliary-file "gpaste/wrapper.js"))) + (typelibdir (string-append #$output "/lib/girepository-1.0"))] + (rename-file extension.js extension-wrapped.js) + (rename-file prefs.js prefs-wrapped.js) + (copy-file wrapper.js extension.js) + (copy-file wrapper.js prefs.js) + (substitute* extension.js + (("@originalName@") "extension") + (("@typelibDir@") typelibdir)) + (substitute* prefs.js + (("@originalName@") "prefs") + (("@typelibDir@") typelibdir)))))))) (home-page "https://github.com/Keruspe/GPaste") (synopsis "Clipboard management system for GNOME Shell") (description "GPaste is a clipboard manager, a tool which allows you to diff --git a/gnu/packages/patches/gpaste-fix-paths.patch b/gnu/packages/patches/gpaste-fix-paths.patch index bacecd61a9..ebebc8a20b 100644 --- a/gnu/packages/patches/gpaste-fix-paths.patch +++ b/gnu/packages/patches/gpaste-fix-paths.patch @@ -1,44 +1,15 @@ -This is copied from NixOS, which is under MIT licence. -https://github.com/NixOS/nixpkgs/blob/master/pkgs/desktops/gnome/misc/gpaste/ -diff --git a/src/gnome-shell/extension.js b/src/gnome-shell/extension.js -index c8773fd6..9efbed67 100644 ---- a/src/gnome-shell/extension.js -+++ b/src/gnome-shell/extension.js -@@ -6,6 +6,8 @@ - - const Config = imports.misc.config; - -+imports.gi.GIRepository.Repository.prepend_search_path('@typelibPath@'); -+ - imports.gi.versions.Clutter = Config.LIBMUTTER_API_VERSION; - imports.gi.versions.GLib = '2.0'; - imports.gi.versions.GPaste = '2'; -diff --git a/src/gnome-shell/prefs.js b/src/gnome-shell/prefs.js -index 32244ab2..74b85572 100644 ---- a/src/gnome-shell/prefs.js -+++ b/src/gnome-shell/prefs.js -@@ -6,6 +6,8 @@ - - imports.gi.versions.GPasteGtk = '4'; - -+imports.gi.GIRepository.Repository.prepend_search_path('@typelibPath@'); -+ - const ExtensionUtils = imports.misc.extensionUtils; - - const { GPasteGtk } = imports.gi; diff --git a/src/libgpaste/gpaste/gpaste-settings.c b/src/libgpaste/gpaste/gpaste-settings.c -index 7e53eb64..57c399fc 100644 +index 830f5e0b..c8df0e11 100644 --- a/src/libgpaste/gpaste/gpaste-settings.c +++ b/src/libgpaste/gpaste/gpaste-settings.c -@@ -1013,7 +1013,11 @@ create_g_settings (void) +@@ -1039,7 +1039,10 @@ create_g_settings (void) } else { - return g_settings_new (G_PASTE_SETTINGS_NAME); + // library used by introspection requires schemas but we cannot set XDG_DATA_DIRS for the library -+ GSettingsSchemaSource *schema_source = g_settings_schema_source_new_from_directory ("@gschemasCompiled@", NULL, FALSE, NULL); ++ g_autoptr (GSettingsSchemaSource) schema_source = g_settings_schema_source_new_from_directory ("@gschemasCompiled@", NULL, FALSE, NULL); + g_autoptr (GSettingsSchema) schema = g_settings_schema_source_lookup (schema_source, G_PASTE_SETTINGS_NAME, FALSE); -+ g_settings_schema_source_unref (schema_source); + return g_settings_new_full (schema, NULL, NULL); } } -- 2.48.1