mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-04 05:50:00 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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 { };
|
||||
}
|
||||
|
||||
55
pkgs/desktops/gnome/extensions/pano/default.nix
Normal file
55
pkgs/desktops/gnome/extensions/pano/default.nix
Normal 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;
|
||||
};
|
||||
})
|
||||
Reference in New Issue
Block a user