-
-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gnome shell extension pano #189091
Gnome shell extension pano #189091
Changes from all commits
c6679e1
2e8ca7d
3d79525
9d70792
80c746a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
{ lib | ||
, stdenv | ||
, atk | ||
, cogl | ||
, fetchFromGitHub | ||
, glib | ||
, gnome | ||
, gobject-introspection | ||
, gsound | ||
, gtk3 | ||
, libgda | ||
, mkYarnModules | ||
, nodePackages | ||
, pango | ||
, substituteAll | ||
, yarn | ||
}: | ||
|
||
let | ||
version = "10"; | ||
uuid = "pano@elhan.io"; | ||
pname = "gnome-shell-extension-pano"; | ||
|
||
girpathsPatch = (substituteAll { | ||
src = ./set-dirpaths.patch; | ||
gda_path = "${libgda}/lib/girepository-1.0"; | ||
gsound_path = "${gsound}/lib/girepository-1.0"; | ||
}); | ||
in | ||
stdenv.mkDerivation rec { | ||
inherit pname version; | ||
src = fetchFromGitHub { | ||
owner = "oae"; | ||
repo = "gnome-shell-pano"; | ||
rev = "v${version}"; | ||
hash = "sha256-1vGiWSXlQ8xheqJsZm3uXCixuLl5NFM2OgPQrzCPhME="; | ||
}; | ||
|
||
nativeBuildInputs = [ | ||
gobject-introspection | ||
nodePackages.rollup | ||
nodePackages.yarn | ||
]; | ||
|
||
buildInputs = [ | ||
atk | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do not see gtk3 and atk needed. |
||
cogl | ||
glib | ||
gnome.gnome-shell | ||
gnome.mutter | ||
gsound | ||
gtk3 | ||
libgda | ||
pango | ||
]; | ||
|
||
nodeModules = | ||
mkYarnModules { | ||
inherit pname version; | ||
name = "${pname}-modules-${version}"; | ||
packageJSON = "${src}/package.json"; | ||
yarnLock = "${src}/yarn.lock"; | ||
yarnNix = ./yarn.nix; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not clear how to update this. Maybe add an passthru = {
lockFileNix = runCommand
"pano-yarn.nix"
{
nativeBuildInputs = [
yarn2nix-moretea
];
}
''
unpackPhase
cd "''${sourceRoot:-.}"
yarn2nix > "$out"
'';
updateScript =
let
updateSource = gitUpdater { };
updateLockFile = _experimental-update-script-combinators.copyAttrOutputToFile "gnomeExtensions.pano.lockFileNix" ./yarn.nix;
in
_experimental-update-script-combinators.sequence [
updateSource
updateLockFile
];
}; |
||
}; | ||
|
||
postPatch = '' | ||
substituteInPlace resources/metadata.json \ | ||
--replace '"version": 999' '"version": ${version}' | ||
''; | ||
|
||
buildPhase = | ||
let | ||
dataDirPaths = lib.concatStringsSep ":" [ | ||
"${gnome.gnome-shell}/share/gnome-shell" | ||
"${gnome.mutter}/lib/mutter-10" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is now |
||
]; | ||
in | ||
'' | ||
runHook preBuild | ||
|
||
ln -sv "${nodeModules}/node_modules" node_modules | ||
export XDG_DATA_DIRS="${dataDirPaths}:$XDG_DATA_DIRS" | ||
yarn --offline build | ||
# To avoid additional dependencies, we are patching here a generated file | ||
# created by the previous command. | ||
patch -d dist -p1 < ${girpathsPatch} | ||
|
||
runHook postBuild | ||
''; | ||
|
||
passthru = { | ||
extensionUuid = uuid; | ||
extensionPortalSlug = "pano"; | ||
}; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
mkdir -p "$out/share/gnome-shell/extensions/${uuid}" | ||
cp -r dist/* "$out/share/gnome-shell/extensions/${uuid}/" | ||
runHook postInstall | ||
''; | ||
|
||
meta = with lib; { | ||
description = "Next-gen Clipboard Manager for Gnome Shell"; | ||
license = licenses.gpl2Plus; | ||
platforms = platforms.linux; | ||
maintainers = [ maintainers.michojel ]; | ||
homepage = "https://github.com/oae/gnome-shell-pano"; | ||
}; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Index: nixos/extension.js | ||
=================================================================== | ||
--- nixos.orig/extension.js | ||
+++ nixos/extension.js | ||
@@ -1,3 +1,5 @@ | ||
+imports.gi.GIRepository.Repository.prepend_search_path('@gda_path@'); | ||
+imports.gi.GIRepository.Repository.prepend_search_path('@gsound_path@'); | ||
|
||
try { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use those here directly, when we have
rec
attrset?