Peal
December 12, 2023, 5:45am
1
Hello, i tried to install the Hanabi extension for gnome but things just wont work out like how i wanted it to be. This extension required meson in order to build and even though I had meson, i canβt seem to install hanabi.
in my ./gnome-ext/hanabi.nix where i fetch it from github and install it:
{ stdenv, fetchFromGitHub }:
{
hanabi = stdenv.mkDerivation rec {
pname = "gnome-ext-hanabi";
version = "";
dontBuild = true;
installPhase = ''
meson setup .build --prefix=$out && ninja -C .build install
'';
src = fetchFromGitHub {
owner = "jeffshee";
repo = "gnome-ext-hanabi";
rev = "f7f2231188d67bed828d0fdf978ace872da2d216";
sha256 = "sha256-IkQtg0fddCnEy2yGKtH5ZOdbuclJLkCqBjO2pSeUk9I=";
};
};
}
and in my configuration.nix:
environment.systemPackages = with pkgs; [
(callPackage ./gnome-ext/hanabi.nix{}).hanabi
meson
ninja
glib # For post installation of Hanabi
];
and it gives me the error: /nix/store/wr08yanv2bjrphhi5aai12hf2qz5kvic-stdenv-linux/setup: line 1559: meson: command not found
even though Iβm pretty sure that i had meson installed
am I missing something here?
Peal
December 12, 2023, 7:16am
2
to be more specific, I want to ask how do i use the command meson
in installPhase
Peal
December 28, 2023, 6:38am
4
Hola
i have come back with another problem. Hanabi also require glib in order to compile schemas. I solve it as below by adding environment.extraOutputsToInstall = ["dev"];
and glib nodejs
into nativeBuildInputs =
:
{pkgs, stdenv, fetchFromGitHub }:
{
environment.extraOutputsToInstall = ["dev"];
hanabi = stdenv.mkDerivation rec {
pname = "gnome-extension-hanabi";
version = "";
dontBuild = false;
nativeBuildInputs = with pkgs; [
meson
ninja
glib
nodejs
];
src = fetchFromGitHub {
owner = "jeffshee";
repo = "gnome-ext-hanabi";
rev = "f7f2231188d67bed828d0fdf978ace872da2d216";
sha256 = "sha256-IkQtg0fddCnEy2yGKtH5ZOdbuclJLkCqBjO2pSeUk9I=";
};
};
}
however:
building '/nix/store/4jmci3sl0fmlh9asndzmjf7hgvk949yc-gnome-extension-hanabi-.drv'...
unpacking sources
unpacking source archive /nix/store/5biixdajw15a09ag7xks74hq4cvq549j-source
source root is source
patching sources
updateAutotoolsGnuConfigScriptsPhase
configuring
mesonConfigurePhase flags: --prefix=/nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi- --libdir=/nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/lib --libexecdir=/nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/libexec --bindir=/nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/bin --sbindir=/nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/sbin --includedir=/nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/include --mandir=/nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/man --infodir=/nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/info --localedir=/nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/locale -Dauto_features=enabled -Dwrap_mode=nodownload --buildtype=plain
The Meson build system
Version: 1.2.3
Source dir: /build/source
Build dir: /build/source/build
Build type: native build
Project name: hanabi-extension
Project version: 1
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program npm found: YES (/nix/store/4bgg8j8275adawqbc5rkm4fv48dgg2i3-nodejs-18.18.2/bin/npm)
Configuring metadata.json using configuration
Program msgfmt found: YES (/nix/store/wxjk2v5vjxmpm7lkiy0mk9xcqcrhp007-gettext-0.21.1/bin/msgfmt)
Program msginit found: YES (/nix/store/wxjk2v5vjxmpm7lkiy0mk9xcqcrhp007-gettext-0.21.1/bin/msginit)
Program msgmerge found: YES (/nix/store/wxjk2v5vjxmpm7lkiy0mk9xcqcrhp007-gettext-0.21.1/bin/msgmerge)
Program xgettext found: YES (/nix/store/wxjk2v5vjxmpm7lkiy0mk9xcqcrhp007-gettext-0.21.1/bin/xgettext)
Build targets in project: 12
hanabi-extension 1
User defined options
auto_features: enabled
bindir : /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/bin
buildtype : plain
includedir : /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/include
infodir : /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/info
libdir : /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/lib
libexecdir : /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/libexec
localedir : /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/locale
mandir : /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/man
prefix : /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-
sbindir : /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/sbin
wrap_mode : nodownload
Found ninja-1.11.1 at /nix/store/x9l05cdsjj21n5bsaf65yhhq90k0jpf7-ninja-1.11.1/bin/ninja
mesonConfigurePhase: enabled\ parallel\ building
building
build flags: -j14
[1/8] Generating src/po/pt_BR/LC_MESSAGES/hanabi-extension@jeffshee.github.io-pt_BR.mo with a custom command
[2/8] Generating src/po/fr/LC_MESSAGES/hanabi-extension@jeffshee.github.io-fr.mo with a custom command
[3/8] Generating src/po/ja/LC_MESSAGES/hanabi-extension@jeffshee.github.io-ja.mo with a custom command
[4/8] Generating src/po/cs/LC_MESSAGES/hanabi-extension@jeffshee.github.io-cs.mo with a custom command
[5/8] Generating src/po/nb_NO/LC_MESSAGES/hanabi-extension@jeffshee.github.io-nb_NO.mo with a custom command
[6/8] Generating src/po/zh_Hans/LC_MESSAGES/hanabi-extension@jeffshee.github.io-zh_Hans.mo with a custom command
[7/8] Generating src/po/de/LC_MESSAGES/hanabi-extension@jeffshee.github.io-de.mo with a custom command
[8/8] Generating src/po/tr/LC_MESSAGES/hanabi-extension@jeffshee.github.io-tr.mo with a custom command
glibPreInstallPhase
installing
mesonInstallPhase flags: ''
Installing src/po/ja/LC_MESSAGES/hanabi-extension@jeffshee.github.io.mo to /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io/locale/ja/LC_MESSAGES
Installing src/po/pt_BR/LC_MESSAGES/hanabi-extension@jeffshee.github.io.mo to /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io/locale/pt_BR/LC_MESSAGES
Installing src/po/nb_NO/LC_MESSAGES/hanabi-extension@jeffshee.github.io.mo to /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io/locale/nb_NO/LC_MESSAGES
Installing src/po/fr/LC_MESSAGES/hanabi-extension@jeffshee.github.io.mo to /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io/locale/fr/LC_MESSAGES
Installing src/po/cs/LC_MESSAGES/hanabi-extension@jeffshee.github.io.mo to /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io/locale/cs/LC_MESSAGES
Installing src/po/de/LC_MESSAGES/hanabi-extension@jeffshee.github.io.mo to /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io/locale/de/LC_MESSAGES
Installing src/po/zh_Hans/LC_MESSAGES/hanabi-extension@jeffshee.github.io.mo to /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io/locale/zh_Hans/LC_MESSAGES
Installing src/po/tr/LC_MESSAGES/hanabi-extension@jeffshee.github.io.mo to /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io/locale/tr/LC_MESSAGES
Installing /build/source/build/src/metadata.json to /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io
Installing /build/source/src/extension.js to /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io
Installing /build/source/src/gnomeShellOverride.js to /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io
Installing /build/source/src/launcher.js to /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io
Installing /build/source/src/logger.js to /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io
Installing /build/source/src/panelMenu.js to /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io
Installing /build/source/src/prefs.js to /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io
Installing /build/source/src/roundedCornersEffect.js to /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io
Installing /build/source/src/wallpaper.js to /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io
Installing /build/source/src/windowManager.js to /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io
Installing /build/source/src/../LICENSE to /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io
Installing /build/source/src/assets/hanabi-symbolic.svg to /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io
Installing /build/source/src/renderer/renderer.js to /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io/renderer
Installing /build/source/src/renderer/stylesheet.css to /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io/renderer
Installing /build/source/src/schemas/io.github.jeffshee.hanabi-extension.gschema.xml to /nix/store/416x9zmi2466b14vzi3rnpfzcbmx12p0-gnome-extension-hanabi-/share/glib-2.0/schemas
Running custom install script '/build/source/build-aux/meson-postinstall.sh'
FAILED: install script '/build/source/build-aux/meson-postinstall.sh' could not be run, stopped
error: builder for '/nix/store/4jmci3sl0fmlh9asndzmjf7hgvk949yc-gnome-extension-hanabi-.drv' failed with exit code 127
error: 1 dependencies of derivation '/nix/store/91i4kr52fm61c62z4c7754id01qm9r2q-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/sz5f2xdyjma69bv995rcvcvamqfc1g5v-nixos-system-Windows_11-23.11.2217.d02d818f22c7.drv' failed to build
The file hierarchy in /nix/store/XXXXXXXXgnome-ext-hanabi- is shown as below:
.
βββ share
βββ glib-2.0
β βββ schemas
β βββ io.github.jeffshee.hanabi-extension.gschema.xml
βββ gnome-shell
βββ extensions
βββ hanabi-extension@jeffshee.github.io
βββ extension.js
βββ gnomeShellOverride.js
βββ hanabi-symbolic.svg
βββ launcher.js
βββ LICENSE
βββ locale
β βββ cs
β β βββ LC_MESSAGES
β β βββ hanabi-extension@jeffshee.github.io.mo
β βββ de
β β βββ LC_MESSAGES
β β βββ hanabi-extension@jeffshee.github.io.mo
β βββ fr
β β βββ LC_MESSAGES
β β βββ hanabi-extension@jeffshee.github.io.mo
β βββ ja
β β βββ LC_MESSAGES
β β βββ hanabi-extension@jeffshee.github.io.mo
β βββ nb_NO
β β βββ LC_MESSAGES
β β βββ hanabi-extension@jeffshee.github.io.mo
β βββ pt_BR
β β βββ LC_MESSAGES
β β βββ hanabi-extension@jeffshee.github.io.mo
β βββ tr
β β βββ LC_MESSAGES
β β βββ hanabi-extension@jeffshee.github.io.mo
β βββ zh_Hans
β βββ LC_MESSAGES
β βββ hanabi-extension@jeffshee.github.io.mo
βββ logger.js
βββ metadata.json
βββ panelMenu.js
βββ prefs.js
βββ renderer
β βββ renderer.js
β βββ stylesheet.css
βββ roundedCornersEffect.js
βββ wallpaper.js
βββ windowManager.js
25 directories, 23 files
This shows that it built fine, but the only problem here is the meson-postinstall.sh
which is needed to compile the io.github.jeffshee.hanabi-extension.gschema.xml
. Although i have already included glib
into nativeBuildInputs
I think Iβm missing something obvious here. Either that or Hanabi is the problem. Either way, I canβt seem to find the solution at allβ¦
I donβt wanna go back to Ubuntu, considering the amount of time I have spent into nixosβ¦
and I know that Iβm being stubborn about installing it globally but i really donβt want to do it the normal way
pls send helpβ¦
jtojnar
December 28, 2023, 4:39pm
7
That is a NixOS option that needs to be used in the context of NixOS configuration. It will not do anything in a random Nix expression.
If you want the builder to have access to glib.dev
output, you do not need to do anything special β the generic builder in Nixpkgs (as used by stdenv.mkDerivation
) already adds programs from dev
output of nativeBuildInputs
to PATH
out of the box.
This sounds like it is because of the script expecting interpreter on a path does not exist in the build sandbox:
You can replace the path by adding the following to the derivation expression:
postPatch = ''
patchShebangs build-aux/meson-postinstall.sh
'';
1 Like
Peal
December 29, 2023, 2:08am
8
after trying this out, it runs fine, but the problem after that is gnome doesnβt recognize the schema compiled.
The file hierarchy in /nix/store/xxxxgnome-ext-hanabi
is shown as below :
.
βββ share
βββ glib-2.0
βββ gnome-shell
β βββ extensions
β βββ hanabi-extension@jeffshee.github.io
β βββ extension.js
β βββ gnomeShellOverride.js
β βββ hanabi-symbolic.svg
β βββ launcher.js
β βββ LICENSE
β βββ locale
β β βββ cs
β β β βββ LC_MESSAGES
β β β βββ hanabi-extension@jeffshee.github.io.mo
β β βββ de
β β β βββ LC_MESSAGES
β β β βββ hanabi-extension@jeffshee.github.io.mo
β β βββ fr
β β β βββ LC_MESSAGES
β β β βββ hanabi-extension@jeffshee.github.io.mo
β β βββ ja
β β β βββ LC_MESSAGES
β β β βββ hanabi-extension@jeffshee.github.io.mo
β β βββ nb_NO
β β β βββ LC_MESSAGES
β β β βββ hanabi-extension@jeffshee.github.io.mo
β β βββ pt_BR
β β β βββ LC_MESSAGES
β β β βββ hanabi-extension@jeffshee.github.io.mo
β β βββ tr
β β β βββ LC_MESSAGES
β β β βββ hanabi-extension@jeffshee.github.io.mo
β β βββ zh_Hans
β β βββ LC_MESSAGES
β β βββ hanabi-extension@jeffshee.github.io.mo
β βββ logger.js
β βββ metadata.json
β βββ panelMenu.js
β βββ prefs.js
β βββ renderer
β β βββ renderer.js
β β βββ stylesheet.css
β βββ roundedCornersEffect.js
β βββ wallpaper.js
β βββ windowManager.js
βββ gsettings-schemas
βββ gnome-extension-hanabi-
βββ glib-2.0
βββ schemas
βββ gschemas.compiled
βββ io.github.jeffshee.hanabi-extension.gschema.xml
28 directories, 24 files
I totally donβt understand whatβs happening
Peal
December 29, 2023, 3:22am
9
I think the problem is that the schema should be in $out/share/glib-2.0
instead of where it is right now, but i donβt know how to approach this tbh
Peal
December 29, 2023, 3:43am
10
ok after some time i found something interesting:
$ cat /run/current-system/sw/share/gsettings-schemas/org.gnome.shell.extensions.hanabi-extension-/glib-2.0/schemas/io.github.jeffshee.hanabi-extension.gschema.xml
<?xml version="1.0" encoding="UTF-8"?>
<schemalist>
<schema id="io.github.jeffshee.hanabi-extension" path="/io/github/jeffshee/hanabi-extension/">
idk why but the schema is in /io/github/jeffshee/hanabi-extension/
instead of /org/gnome/shell/extensions/
like it normally do
$ dconf dump /io/github/jeffshee/
[hanabi-extension]
enable-va=true
mute=true
startup-delay=1000
video-path='/home/${user}/questionable-video.mp4'
well the schema is there, and gnome apparently canβt find it. Idk why, i also dont know how to fix it, i gave up
Peal
December 29, 2023, 3:50am
11
And also for people who interested in live wallpaper, i have an alternative hidamari
, coming from the same dev who developed hanabi
.
You can install it from flatpak , although I hate flatpak as thereβs no way for you to install flatpak packages declaratively but anyways I guess
jtojnar
December 29, 2023, 12:49pm
12
GLib setup hook moves it to $out/share/gsettings-schemas/$name
to prevent collisions of gschemas.compiled
.
The latter is for official extensions developed by the GNOME project. Projects should use the domain name they control, see Application ID docs .
Peal:
well the schema is there, and gnome apparently canβt find it. Idk why, i also dont know how to fix it, i gave up
GNOME Shell extensions do not generally expose their settings schemas so that is expected. Actually, on NixOS no projects are exposing their schemas thanks to the aforementioned glib setup hook and the fact that we do not have any global nexus for them, see also GSettings schema of installed software not available to gsettings program or dconf-editor Β· Issue #33277 Β· NixOS/nixpkgs Β· GitHub .
But in this case, the problem is that Hanabi installs the schema to path that it thinks is a global location but it is not due to Nixβs rejection of FHS:
)
uuid = 'hanabi-extension@jeffshee.github.io'
prefix = get_option('prefix')
datadir = join_paths(prefix, get_option('datadir'))
extensions_dir = join_paths(datadir, 'gnome-shell', 'extensions')
install_dir = join_paths(extensions_dir, uuid)
schema = 'io.github.jeffshee.hanabi-extension'
schema_dir = join_paths(datadir, 'glib-2.0', 'schemas')
gnome = import('gnome')
i18n = import('i18n')
npm_exe = find_program('npm', required: false)
if npm_exe.found()
run_target('dev', command: [ npm_exe, 'install', '--save-dev' ])
endif
subdir('src')
GNOME Shell looks for the schema in global locations (paths listed in XDG_DATA_DIRS
environment variable) but since we do not accept schemas as global, they are not present.
Fortunately, GNOME Shell also looks for schemas in the extensionβs directory . In fact this is what most extensions do.
You could probably do something like to move it to the regular location:
postInstall = ''
mv "$out/share/glib-2.0/schemas" "$out/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io/schemas"
'';
2 Likes
Peal
December 30, 2023, 1:22am
13
hereβs the final answer for who wants to install hanabi:
{pkgs, stdenv, fetchFromGitHub }:
{
hanabi = stdenv.mkDerivation rec {
pname = "org.gnome.shell.extensions.hanabi-extension";
version = "";
dontBuild = false;
nativeBuildInputs = with pkgs; [
meson
ninja
glib
nodejs
];
# installPhase = ''
# cp -r $out/share/gsettings-schemas/gnome-extension-hanabi-/glib-2.0 $out/share/glib-2.0
# '';
postPatch = ''
patchShebangs build-aux/meson-postinstall.sh
'';
postInstall = ''
mv "$out/share/glib-2.0/schemas" "$out/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io/schemas"
'';
src = fetchFromGitHub {
owner = "jeffshee";
repo = "gnome-ext-hanabi";
rev = "f7f2231188d67bed828d0fdf978ace872da2d216";
sha256 = "sha256-IkQtg0fddCnEy2yGKtH5ZOdbuclJLkCqBjO2pSeUk9I=";
};
};
}
Peal
January 1, 2024, 12:27am
14
final answer for real this time
{pkgs, stdenv, fetchFromGitHub }:
{
hanabi = stdenv.mkDerivation rec {
pname = "org.gnome.shell.extensions.hanabi-extension";
version = "";
dontBuild = false;
nativeBuildInputs = with pkgs; [
meson
ninja
glib
nodejs
wrapGAppsHook4
];
buildInputs = with pkgs; [
# Video/Audio data composition framework tools like "gst-inspect", "gst-launch" ...
gst_all_1.gstreamer
# Common plugins like "filesrc" to combine within e.g. gst-launch
gst_all_1.gst-plugins-base
# Specialized plugins separated by quality
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-ugly
# Plugins to reuse ffmpeg to play almost every video format
gst_all_1.gst-libav
# Support the Video Audio (Hardware) Acceleration API
gst_all_1.gst-vaapi
gjs
];
dontWrapGApps = true;
postPatch = ''
patchShebangs build-aux/meson-postinstall.sh
'';
postInstall = ''
mv "$out/share/glib-2.0/schemas" "$out/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io/schemas"
'';
postFixup = ''
wrapGApp "$out/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io/renderer/renderer.js"
'';
src = fetchFromGitHub {
owner = "jeffshee";
repo = "gnome-ext-hanabi";
rev = "f7f2231188d67bed828d0fdf978ace872da2d216";
sha256 = "sha256-IkQtg0fddCnEy2yGKtH5ZOdbuclJLkCqBjO2pSeUk9I=";
};
};
}
Oh, also (probably unrelated to the GStreamer issue from the other thread ) I just noticed that the renderer is using the GSettings schema. My suggestion to move them inside the extension directory will make the schema inaccessible for the renderer, since it runs outside the GNOME Shell context. Simplest solution will probably be linking the schema to the other place in postFixup
instead of moving it:
postFixup = ''
ln -s "$out/share/gsettings-schemas/${name}/glib-2.0/schemas" "$out/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io/schemas"
'';
Peal
January 5, 2024, 11:23pm
16
final final final answer
{pkgs, stdenv, fetchFromGitHub }:
{
hanabi = stdenv.mkDerivation rec {
pname = "gnome-ext-hanabi";
version = "";
dontBuild = false;
nativeBuildInputs = with pkgs; [
meson
ninja
glib
nodejs
wrapGAppsHook4
appstream-glib
gobject-introspection
# makeWrapper
# pkg-config
shared-mime-info
];
buildInputs = with pkgs; [
# Video/Audio data composition framework tools like "gst-inspect", "gst-launch" ...
gst_all_1.gstreamer
# Common plugins like "filesrc" to combine within e.g. gst-launch
gst_all_1.gst-plugins-base
# Specialized plugins separated by quality
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-ugly
# Plugins to reuse ffmpeg to play almost every video format
gst_all_1.gst-libav
# Support the Video Audio (Hardware) Acceleration API
gst_all_1.gst-vaapi
# gst_all_1.gst-plugins-rs
clapper
gjs
gtk4
# libadwaita
# libGL
# libsoup
wayland
wayland-protocols
];
dontWrapGApps = true;
# installPhase = ''
# cp -r $out/share/gsettings-schemas/gnome-extension-hanabi-/glib-2.0 $out/share/glib-2.0
# '';
postPatch = ''
patchShebangs build-aux/meson-postinstall.sh
'';
# postInstall = ''
# mv "$out/share/glib-2.0/schemas" "$out/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io/schemas"
# '';
postFixup = ''
wrapGApp "$out/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io/renderer/renderer.js"
ln -s "$out/share/gsettings-schemas/gnome-ext-hanabi-/glib-2.0/schemas" "$out/share/gnome-shell/extensions/hanabi-extension@jeffshee.github.io/schemas"
'';
src = fetchFromGitHub {
owner = "jeffshee";
repo = "gnome-ext-hanabi";
rev = "f7f2231188d67bed828d0fdf978ace872da2d216";
sha256 = "sha256-IkQtg0fddCnEy2yGKtH5ZOdbuclJLkCqBjO2pSeUk9I=";
};
};
}
#git ls-remote https://github.com/jeffshee/gnome-ext-hanabi for rev