Skip to content
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

{fprintd,libfprint}-tod: init, plus libfprint-2-tod1-goodix: init at 0.0.6 #104915

Merged
merged 3 commits into from Mar 30, 2021

Conversation

grahamc
Copy link
Member

@grahamc grahamc commented Nov 25, 2020

Motivation for this change

Fingerprint sensor support for the Dell XPS 9300.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@grahamc
Copy link
Member Author

grahamc commented Nov 25, 2020

I haven't run this exact expression on the laptop with the sensor yet. For future readers, something like:

FP_TOD_DRIVERS_DIR=${libfprint-2-tod1-goodix}/usr/lib/libfprint-2/tod-1/ 

is how you load the driver. You can debug withG_MESSAGES_DEBUG=all. For internet searchers, if you run with G_DEBUG=all you're forcing glib in to strictly resolving symbols causing undefined symbol: LivenssDetection.


# for the curious, "tod" means "Touch OEM Drivers" meaning it can load
# external .so's.
libfprint.overrideAttrs ({ ... }: rec {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am very confused by this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! qyliss showed me this. overrideAttrs takes a functions whose only argument is the original attributes you're overriding. Often you'll see overrideAttrs(old: { my overrides }). Instead of calling it old, you can destructure the inputs by saying the function takes an attribute set, but the ... means it ignores all of them.

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 104915 run on x86_64-linux 1

3 packages built:
  • fprintd-tod
  • libfprint-2-tod1-goodix
  • libfprint-tod

@kamushadenes
Copy link
Contributor

Hello @grahamc , thanks for this PR.

Is there anything I can help with to get this out of the draft stage?

I also have a XPS 9300, so I can help with any testing.

@grahamc
Copy link
Member Author

grahamc commented Feb 11, 2021 via email

@trobert
Copy link
Contributor

trobert commented Feb 19, 2021

works great on a xps 9500 ! 👍
I added to my configuration:

systemd.services.fprintd.environment = { FP_TOD_DRIVERS_DIR = "${pkgs.libfprint-2-tod1-goodix}/usr/lib/libfprint-2/tod-1"; };

@ymatsiuk
Copy link
Contributor

ymatsiuk commented Mar 9, 2021

rebasing this on latest master fails the build and the only difference I see so far is ninja version

PS: I'm not complaining just trying to test it 😉

This is how I use it. And it works perfectly! Thanks!

{
  services.fprintd = {
    enable = true;
    package = pkgs.fprintd.override {
      libfprint = pkgs.libfprint-tod;
    };
  };
  systemd.services.fprintd.environment = {
    FP_TOD_DRIVERS_DIR = "${pkgs.libfprint-2-tod1-goodix}/usr/lib/libfprint-2/tod-1";
  };
}

overlay

self: super:
{
  libfprint-tod = super.callPackage ./libfprint-tod { };
  libfprint-2-tod1-goodix = super.callPackage ./libfprint-2-tod1-goodix { };
}

PS: XPS 13 9310

@ymatsiuk
Copy link
Contributor

I'm using this for 2 weeks straight and there is no issues at all. I think it's pretty safe to merge this one. Thanks.

@grahamc
Copy link
Member Author

grahamc commented Mar 29, 2021

@ofborg eval

@grahamc grahamc marked this pull request as ready for review March 29, 2021 00:27
@ymatsiuk ymatsiuk mentioned this pull request Mar 29, 2021
10 tasks
@grahamc
Copy link
Member Author

grahamc commented Mar 30, 2021

I updated this to use 1.90.7+tod1 and checked it works on nixos-unstable-small.

@grahamc grahamc merged commit 83fccd0 into NixOS:master Mar 30, 2021
@grahamc grahamc deleted the fprintd-libfprint-tod branch March 30, 2021 14:55
@utkarshgupta137
Copy link
Contributor

utkarshgupta137 commented Apr 13, 2023

I've raised a PR with a separate driver for Goodix 550a by Lenovo: #226056. Reviews appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants