You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With some help, i managed to build the binary with nix-shell. As in it's still using make but uses nix-shell to provide the paths for dependencies. However, i had to add a new entry to the Make file dependency
just add these to the root of repo run nix-shell & then make
NOTE: 1. I have not mapped exact dependencies in nix-shell. I should have used nix-locate or something as such it might contain unnecessary dependencies. 2. I have not ran the binary as i am in gnome and ran into a error which is i think is because i am not in sway.
It's been long, i had exams. But today i have been trying to make a nixpkgs derivation. I have managed to compile the program and also generate the gschema file but it's not being used. I'm having huge skill issues with this, i'll see what i can do.
You may need to figure out where the gschema directory is on your system. Maybe this is covered in NixOS documentation somewhere? At the minimum you can probably just do a search for 'gschemas.compiled' file at the root of your OS, and find the directory that looks like a unix standard path like "/usr/share/..." or similar.
I did look at it, by generating gschema file i meant i managed to get the .xml file (it was not being generated last time or i never looked at it idk), in short i don't have the .compiled file.
In nix, the packages are sandboxed(?) and it exists in /nix/store/<someHash>-way-shell-<version>/. Each build generates a new hash as such new directory. The directory acts as the root for the package. /usr/shareusr/bin all exists in that directory for each package for each build.
The issue i have right now is, during build for some reason, calling glib-compile-schemas $out/share/glib-2.0/schemas is not compiling the .xml even tho the build succeeds.
$out is the current build's hash directory on /nix/store
On a non-Nix system, dconf-enabled applications would place their gschema files in a well-known system path. Then, you compile all schemas in that path into one database. Dconf is then pointed to this path for the database.
Maybe its worth looking at another project like WayBar which integrates with gschema/dconf as well. Maybe it has a nix build we can rip?
Activity
ldelossa commentedon May 30, 2024
Hey there.
Not unless a community member contributes this. I will only maintain packages for the distro I currently use, which is Fedora.
sudanchapagain commentedon Jun 9, 2024
With some help, i managed to build the binary with nix-shell. As in it's still using make but uses nix-shell to provide the paths for dependencies. However, i had to add a new entry to the Make file dependency
DEPS := libadwaita-1 \ gtk4-layer-shell-0 \ upower-glib \ wireplumber-0.5 \ ++ libpipewire-0.3 \ json-glib-1.0 \ libnm \ libpulse \ libpulse-simple \ libpulse-mainloop-glib \shell.nix:
just add these to the root of repo run
nix-shell& thenmakeNOTE: 1. I have not mapped exact dependencies in nix-shell. I should have used nix-locate or something as such it might contain unnecessary dependencies. 2. I have not ran the binary as i am in gnome and ran into a error which is i think is because i am not in sway.
ldelossa commentedon Jun 9, 2024
Very cool! Id love to help out more here but Im not too Nix savvy.
Your comments around running in Gnome is right. We fail if we can't take a few dbus names, which Gnome is almost definitely owning.
sudanchapagain commentedon Jun 10, 2024
I just tried running it on sway but i got an error.
I am not sure why but i am assuming it's because it isn't installed in system as in it's not linked and is in nix store. idk.
ldelossa commentedon Jun 10, 2024
@sudanchapagain The gschema file has not be integrated with your system.
Check out the makefile targets here:
After the install, a call to
make install-gschemashould be called to compile the gschema database.For instance, we do this in a post scriptlet in the rpm spec file:
https://github.com/ldelossa/way-shell/blob/main/way-shell.spec#L64C1-L71C50
sudanchapagain commentedon Jul 23, 2024
It's been long, i had exams. But today i have been trying to make a nixpkgs derivation. I have managed to compile the program and also generate the gschema file but it's not being used. I'm having huge skill issues with this, i'll see what i can do.
ldelossa commentedon Jul 23, 2024
@sudanchapagain thanks!
Check out the RPM spec: https://github.com/ldelossa/way-shell/blob/main/way-shell.spec#L65-L69
We basically do an install and then install the gschema.
You may need to figure out where the gschema directory is on your system. Maybe this is covered in NixOS documentation somewhere? At the minimum you can probably just do a search for 'gschemas.compiled' file at the root of your OS, and find the directory that looks like a unix standard path like "/usr/share/..." or similar.
sudanchapagain commentedon Jul 23, 2024
I did look at it, by generating gschema file i meant i managed to get the .xml file (it was not being generated last time or i never looked at it idk), in short i don't have the
.compiledfile.In nix, the packages are sandboxed(?) and it exists in
/nix/store/<someHash>-way-shell-<version>/. Each build generates a new hash as such new directory. The directory acts as the root for the package./usr/shareusr/binall exists in that directory for each package for each build.The issue i have right now is, during build for some reason, calling
glib-compile-schemas $out/share/glib-2.0/schemasis not compiling the .xml even tho the build succeeds.ldelossa commentedon Jul 23, 2024
@sudanchapagain hmm, and you see that the way-shell gschema file is in that directory?
sudanchapagain commentedon Jul 23, 2024
on each build directory i see this
ldelossa commentedon Jul 23, 2024
Im not really sure how this should work with Nix.
On a non-Nix system, dconf-enabled applications would place their gschema files in a well-known system path. Then, you compile all schemas in that path into one database. Dconf is then pointed to this path for the database.
Maybe its worth looking at another project like WayBar which integrates with gschema/dconf as well. Maybe it has a nix build we can rip?
Or maybe SwayNotificationCenter: https://github.com/ErikReider/SwayNotificationCenter/blob/main/data/org.erikreider.swaync.gschema.xml
sudanchapagain commentedon Jul 23, 2024
Good suggestion, thank you!
I managed to get this far because i was ripping things from the gnome application's nixpkgs package.nix files.
I honestly couldn't understand the waybar's
package.nix.SwayNotificationCenter appears to simply call this file during build https://github.com/ErikReider/SwayNotificationCenter/blob/main/build-aux/meson/postinstall.py
sudanchapagain commentedon Jul 24, 2024
I tried today too, couldn't do it. I opened a issue in nixpkgs repo for packaging request.
NixOS/nixpkgs#329583
ldelossa commentedon Jul 24, 2024
Thanks! Lets see what the response is.