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
pkgs/applespi: add experimental Linux support for MacBook keyboards #57419
Conversation
@krav Are you still motivated to continue with this PR? If so please address the issue listed. |
@aanderse Oh, I somehow missed that the check was failing. I'll fix it and see if I can't get this to build with Linux 5.2, then NixOS might actually be usable on newer Macbook Pro models. |
@@ -0,0 +1,38 @@ | |||
{ stdenv, fetchgit, pkgs }: |
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.
Don't use pkgs
in the parameters, always list the required packages. For kernel modules, adding kernel
is the way to go.
@@ -0,0 +1,38 @@ | |||
{ stdenv, fetchgit, pkgs }: | |||
let | |||
version = "git"; |
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.
Don't add the version in a let
block. Additionally, when the package is from a version-less development release, use unstable-YYYY-MM-DD
as the version number, with the date being the date of the commit.
Add pname = "applespi";
and version = "YYYY-MM-DD-${kernel.version}"
to the mkDerivation
call in this particular case.
stdenv.mkDerivation { | ||
name = "applespi-${version}-${kernel.version}"; | ||
|
||
src = fetchgit { |
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.
Prefer fetchFromGitHub
for GitHub, as it will fetch only the revision by using the GitHub specific ways to fetch a single commit's tree.
Motivation for this change
According to https://github.com/Dunedan/mbp-2016-linux#keyboard--touchpad, this adds support for the keyboard and touchpad in MacBookPro1[3,4],[1-3]. Confirmed working on a MacBookPro14,1.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)