DreymaR/BigBagKbdTrixXKB

Option to change original XKB files location

fufexan opened this issue · 4 comments

Hello Dreymar. I am trying to integrate your work in NixOS, so I could modify the xkeyboard-config package.

Due to the way Nix stores files, after downloading your repo, it is stored under /nix/store/hash-source, a different path than the upstream xkeyboard-config clone. This separation makes it impossible for your scripts to search in /usr/share/X11, because they're simply not stored there. Also, it wouldn't be possible to hardcode the path, as the hash changes based on what's inside the package.

It is, however, possible to reference the location of xkeyboard-config while building Nix packages. Because of that, I'd like to be able to specify that location as an option for your script, similar to the -i option.

Is it possible to integrate such an option? I could fork and make the changes on my end, then open a PR.

I don't quite understand what you mean. In the install script, you can just change the X11DIR variable to what you want. But you'd like a switch for the script instead, so you wouldn't have to edit the file each time? Isn't that what the -i switch does?

If you wish, you can also copy the modded files over the X11/xkb dir manually. But maybe the better option is to use a local directory? See the other current issue.

The setxkb script has a -d switch for which dir to run setxkbmap from.

The reason I wanted an option beside -i is because I needed a way to tell the script where the X11DIR is (in order for it to get and patch the XKB files). I managed to do it.

Another thing I did was add an option to use the script without sudo. In the Nix build process, sudo isn't available as a command, and since one could specify the X11DIR, if it's writable, the script has no problem.

I updated my fork with the code if you want to look.

Here's how I'm using my fork.

Nice work there! I wish I understood the magic you've done with how you're setting it up, but that went right above my head.
ᏊᵕꈊᵕᏊ

Thanks for merging!

As for the magic I'm doing with it - it's just patching packages the Nix way :) Although that method is not ideal, I can't seem to be able to include your mods in a more elegant way. But it works, and I'm fine with it.