gnomeExtensions.pano: package manually

It's been a while since the Pano extension has been uploaded to EGO, and it's not in gnomeExtensions set after GNOME 48. So, package it manually.
This commit is contained in:
Honnip
2025-05-10 19:07:49 +09:00
parent 9c55b12a45
commit 582ffa592e
3 changed files with 57 additions and 19 deletions

View File

@@ -1,7 +1,6 @@
{
lib,
fetchFromGitLab,
fetchzip,
cpio,
ddcutil,
easyeffects,
@@ -9,9 +8,7 @@
glib,
nautilus,
gobject-introspection,
gsound,
hddtemp,
libgda6,
libgtop,
libhandy,
liquidctl,
@@ -171,22 +168,6 @@ lib.trivial.pipe super [
}
))
(patchExtension "pano@elhan.io" (
final: prev: {
version = "23-alpha3";
src = fetchzip {
url = "https://github.com/oae/gnome-shell-pano/releases/download/v${final.version}/pano@elhan.io.zip";
hash = "sha256-LYpxsl/PC8hwz0ZdH5cDdSZPRmkniBPUCqHQxB4KNhc=";
stripRoot = false;
};
preInstall = ''
substituteInPlace extension.js \
--replace-fail "import Gda from 'gi://Gda?version>=5.0'" "imports.gi.GIRepository.Repository.prepend_search_path('${libgda6}/lib/girepository-1.0'); const Gda = (await import('gi://Gda')).default" \
--replace-fail "import GSound from 'gi://GSound'" "imports.gi.GIRepository.Repository.prepend_search_path('${gsound}/lib/girepository-1.0'); const GSound = (await import('gi://GSound')).default"
'';
}
))
(patchExtension "system-monitor@gnome-shell-extensions.gcampax.github.com" (old: {
patches = [
(replaceVars

View File

@@ -20,4 +20,6 @@
"unite@hardpixel.eu" = callPackage ./unite { };
"valent@andyholmes.ca" = callPackage ./valent { };
"window-corner-preview@fabiomereu.it" = callPackage ./window-corner-preview { };
# Can be removed when https://github.com/oae/gnome-shell-pano/issues/271 resolved
"pano@elhan.io" = callPackage ./pano { };
}

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
fetchzip,
glib,
libgda6,
gsound,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "gnome-shell-extension-pano";
version = "23-alpha5";
src = fetchzip {
url = "https://github.com/oae/gnome-shell-pano/releases/download/v${finalAttrs.version}/pano@elhan.io.zip";
hash = "sha256-kTaJOSyFtBa/fl3Mot8Q8qyhwJwhcbBY4FvdztqUP4w=";
stripRoot = false;
};
nativeBuildInputs = [
glib
];
buildPhase = ''
runHook preBuild
glib-compile-schemas --strict schemas
runHook postBuild
'';
preInstall = ''
substituteInPlace extension.js \
--replace-fail "import Gda from 'gi://Gda?version>=5.0'" "imports.gi.GIRepository.Repository.prepend_search_path('${libgda6}/lib/girepository-1.0'); const Gda = (await import('gi://Gda')).default" \
--replace-fail "import GSound from 'gi://GSound'" "imports.gi.GIRepository.Repository.prepend_search_path('${gsound}/lib/girepository-1.0'); const GSound = (await import('gi://GSound')).default"
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share/gnome-shell/extensions
cp -r -T . $out/share/gnome-shell/extensions/pano@elhan.io
runHook postInstall
'';
passthru = {
extensionPortalSlug = "pano";
extensionUuid = "pano@elhan.io";
};
meta = with lib; {
description = "Next-gen Clipboard Manager for Gnome Shell";
homepage = "https://github.com/oae/gnome-shell-pano";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ honnip ];
platforms = platforms.linux;
};
})