adds pano alpha and fixes for gnome extensions
This commit is contained in:
60
config/nixos/packages/workstation/pano/default.nix
Normal file
60
config/nixos/packages/workstation/pano/default.nix
Normal file
@ -0,0 +1,60 @@
|
||||
{
|
||||
stdenv,
|
||||
fetchzip,
|
||||
lib,
|
||||
gnome,
|
||||
glib,
|
||||
libgda,
|
||||
gsound,
|
||||
substituteAll,
|
||||
wrapGAppsHook,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gnome-shell-extension-pano";
|
||||
version = "v23-alpha3";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/oae/gnome-shell-pano/releases/download/${version}/pano@elhan.io.zip";
|
||||
sha256 = "LYpxsl/PC8hwz0ZdH5cDdSZPRmkniBPUCqHQxB4KNhc=";
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./gnome-shell-extension-pano.patch;
|
||||
gsound_path = "${gsound}/lib/girepository-1.0";
|
||||
gda_path = "${libgda}/lib/girepository-1.0";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gnome.gnome-shell
|
||||
libgda
|
||||
gsound
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ wrapGAppsHook ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
local_ext_dir=$out/share/gnome-shell/extensions/pano@elhan.io
|
||||
install -d $local_ext_dir
|
||||
cp -r * $local_ext_dir
|
||||
|
||||
# Ensure typelibs are directly accessible
|
||||
mkdir -p $out/lib/girepository-1.0
|
||||
ln -s ${gsound}/lib/girepository-1.0/* $out/lib/girepository-1.0/
|
||||
ln -s ${libgda}/lib/girepository-1.0/* $out/lib/girepository-1.0/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Pano GNOME Shell Clipboard Management Extension (${version} pre-release)";
|
||||
homepage = "https://github.com/oae/gnome-shell-pano";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.zvictor ];
|
||||
};
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
--- a/extension.js
|
||||
+++ b/extension.js
|
||||
@@ -1,3 +1,7 @@
|
||||
+import GIRepository from 'gi://GIRepository';
|
||||
+GIRepository.Repository.prepend_search_path('@gda_path@');
|
||||
+GIRepository.Repository.prepend_search_path('@gsound_path@');
|
||||
+
|
||||
import Gio from 'gi://Gio';
|
||||
import GLib from 'gi://GLib';
|
||||
import * as extension_js from 'resource:///org/gnome/shell/extensions/extension.js';
|
Reference in New Issue
Block a user