-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
xppen: init package with nixos module #285660
base: master
Are you sure you want to change the base?
Conversation
Also please anyone with an actual XPPen tablet tell me if what I've made actually works, I have no means of testing it myself, I just know that the app is running and the udev rules are applied 🙏🙏 |
14a246a
to
c002eac
Compare
I tested the module, looks like I didn't break anything |
Oh and also one other question. Is it maybe possible to backport this change to 23.11? |
Yes, I think so, but I'm a bit unsure about how to deal with backporting release notes. I'll ask around to see if I can find some answers. In the meanwhile, could you squash your changes into the first three commits? If you're unsure about how to do it, feel free to ask. I might be a good idea to mark the PR as draft before push, because a rebase gone wrong will ping a ton of people. |
3c646c5
to
e9a7ec5
Compare
Didn't really want to bother remembering how to rebase properly so just |
Why is it suddenly unable to find |
Might've been after you moved it to |
I borked it, okay, will never make changes on the phone again, must've missed something important .-. |
h7x4, thank you so much for helping! |
9e497f1
to
7fb703b
Compare
Co-authored-by: MinerSebas <[email protected]>
632d981
to
ed7e2a1
Compare
Is this a good-enough service? I'm not familiar with how people usually do it in nixpkgs, I've found a few examples with grep and followed them (nginx and nifi) |
However it seems like this service runs every time I nixos-rebuild my system with it even if nothing was changed :/ Is this normal? Do I need to add some nixos-specific conditions? |
The missing piece should just be adding |
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.
Thank you for your work so far! Some feedback below.
|
||
services.udev.packages = [ cfg.package ]; | ||
|
||
systemd.services.xppen-create-config-dir = { |
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.
This service seems like something that might be better achieved with systemd-tmpfiles
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.
Unfortunately I don't think it can, those files are installed in /var because it's kind of a hack and are not temporary, those are user configuration files:///
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.
things created via systemd-tmpfiles are not necessarily temporary, despite the name.
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.
Or can tmpfiles be used to store files persistently? My problem is that I don't think I'd want those user-changed configs to be removed even is the module is disabled. If I could patch this app to read configs from, say, $XDG_CONFIG_HOME
I would, but me no smart enough to patch binaries to this degree. /var
is better than the default /usr
but yes it is incredible that they even fathomed to make /usr/lib
a user-writable configuration directory :)))
So yeah, don't think tmpfiles is good, these files are by no means temporary
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.
things created via systemd-tmpfiles are not necessarily temporary, despite the name.
So what would the added benefit be then? Can it copy a set of given files instead of this little scripty thingy?
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.
I'm just not familiar with systemd-tmpfiles that's why I'm asking:)
Co-authored-by: nuko <[email protected]>
Co-authored-by: nuko <[email protected]>
Co-authored-by: éclairevoyant <[email protected]>
Co-authored-by: éclairevoyant <[email protected]>
e56a4b4
to
d4a8dd8
Compare
Hey, [damian@nixos-desktop:~/Git/nixpkgs/result/bin]$ ./PenTablet
QFont::fromString: Invalid description 'Noto Sans,10,-1,5,400,0,0,0,0,0,0,0,0,0,0,1'
QLocale::English
QMetaObject::connectSlotsByName: No matching signal for on_horizontalSlider_tablet_light_valueChanged(int)
QObject::connect: Incompatible sender/receiver arguments
QDesktopWidget::primaryScreenChanged() --> MainWindow::onDeskScreenChanged(int)
QLayout: Attempting to add QLayout "" to MainWindow "MainWindow", which already has a layout
Function EnumDisplay nScreenCount: 4
Device.AllScreen "(0,0,4640,2880)"
Device.Screen 1 : "1(1440,1440,2560,1440)"
Device.Screen 2 : "2(0,320,1440,2560)"
Device.Screen 3 : "3(1440,0,2560,1440)"
Device.Screen 4 : "4(4000,2400,640,480)"
-------type: 1
hid_open_path Failed!
Cannot mix incompatible Qt library (5.15.14) with this library (5.15.12)
Aborted (core dumped) Let me know what you want me to try further. Also, it appears the version is still 3.4.9 but they add a suffix with YYMMDD e.g. currently it's on |
Hey @damiankorcz, I have completely forgotten about this PR. Unfortunately I don't have much time to fix and update it myself, but I think you can suggest changes and fixes, I'll add them. I can still push some effort into getting this PR merged :) |
A few months ago drivers with major version 4 got released. However some tablets are not compatible with v4, so we should definitely keep the current v3 driver. Based on the previous v3 deco and g430 drivers, I packaged a working v4 driver in #347984 (tested by @HangedFool, I don't have a hardware for it), however it is not as polished as this PR but should be a decent starting point. It would be nice to add the v4 package in this PR, but I totally understand if you don't have the capacity for it, it can be done later. At least we should make the v3 package in this PR future proof by renaming it to |
@damiankorcz This is most likely not an issue with the the xppen package in this PR, but rather with Qt packages on NixOS in general. Personally I don't have this issue and the GUI opens, but this is what I found after doing some research:
I haven't found a clear answer, but if you really want to test this PR you could try temporarily uninstalling your qt apps (also delete them with nix-collect-garbage) or updating your system to unstable (I assume you're on nixos-24.05 from the 5.15.12 Qt version). Or at this point setting up a nixos-unstable vm seems to be easier. |
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.
Hi, I don't want to be intrusive, but if you don't have time to work on this I'd be happy to take it over if it's fine with you (of course I'd credit you for all the work you've done over the past months :) ).
Is there anything else blocking this PR?
, libGL | ||
}: | ||
stdenv.mkDerivation { | ||
pname = "xppen"; |
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.
See #285660 (comment) for explanation
pname = "xppen"; | |
pname = "xppen_3"; |
{ | ||
options.programs.xppen = { | ||
enable = lib.mkEnableOption "XPPen PenTablet application"; | ||
package = lib.mkPackageOption pkgs "xppen" { }; |
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.
package = lib.mkPackageOption pkgs "xppen" { }; | |
package = lib.mkPackageOption pkgs "xppen_3" { }; |
Description of changes
Added XPPen PenTablet package and a
program.xppen
module for itThings done
I've initially made this for my friend who asked me if I could port XPPen on NixOS, I did, so now I'd like to add it to nixpkgs.
I have a few concerns however, the primary is that I'm not quite sure about the licensing of XPPen, there is practically no information I could find and the only way to contact XPPen is through mail which, if I'm completely honest, I just don't want to do.
I also don't own an XPPen tablet and don't really know much about them unlike my friend but he's not quite there yet in terms of being able to package it himself.
Do my changes relate to #213263 and the
pentablet-driver
package???Also this is my very first time trying to add a package/module to nixpkgs so please tell me if I'm doing things wrong, I tried my best but I suppose there are things that can be improved.
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.