-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
Refactor postPatch in handheld-daemon and hidapi #309530
base: master
Are you sure you want to change the base?
Conversation
This reverts commit d9b487a.
The file that should change in sync with hhd is |
oh |
2a71c77
to
4813929
Compare
# handheld-daemon contains a fork of the python module `hid`, so this hook | ||
# is borrowed from the `hid` derivation. | ||
substituteInPlace src/hhd/controller/lib/hid.py \ | ||
--replace-fail libhidapi ${hidapi}/lib/libhidapi | ||
|
||
hidapi=${hidapi}/lib/ |
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 isn't the substituteInPlace
using this variable?
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.
Not sure since I did this a while ago, but iirc I just copied the substituteInPlace right on top and then changed it.
The check that's under will still work so I think it's fine if we leave it as is
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.
Except that it's duplicating the path now. If that path ever changed, you could change one and not the other - it would break and you might not realize it.
In some senses, this is just cargo-culted over from hid
; however, as long as the variable is there, it should be used in both places. Moreover, since this does mirror the hid
build rule, it should keep symmetry with the hid
derivation (which does the test before calling subInPlace
).
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.
Got it, just changed subInPlace
so that it uses the variable
@Faupi pls check if this pr fixes #303846 (comment) |
👍 |
This week is very fussy! Too much merge conflicts! |
@toast003 can you rebase this PR? |
Refactor discussed in #303846 (comment) and #303846 (comment)
Description of changes
Replace sed with substituteInPlace in
handheld-daemon
andhidapi
's postPatchThings done
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.