nvidia-patch
nvidia-patch copied to clipboard
Can the patch patterns be made more accesible for external use?
Hello, I'd love to package a patched driver with Nix (for local use, not redistribution - everything installed on NixOS must be packaged).
Would it be possible to make the patch patterns accessible for use outside the patching scripts? Perhaps in JSON form, or even as a separate shell script that can be sourced independently?
I've considered this before, but unfortunately splitting out the hex patterns will be a breaking change for many users who have automated tooling to simply
$ curl https://raw.githubusercontent.com/keylase/nvidia-patch/master/patch.sh | sh
With the change they will need to fetch a separate file with the hex patterns.
What if you extract the patch patterns using a clever grep on the script instead? Try this:
$ curl https://raw.githubusercontent.com/keylase/nvidia-patch/master/patch.sh | grep -Ezo "declare.*.so'.\)."
Grepping can work, but that is also subject to breakage and not a very elegant solution.
What if the patch script downloaded the hex pattern file if it was missing? One-line automated invocations already require Internet access.
@hacker1024 Feel free to send a PR with your proposed change