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
libfprint: added a fork for Lenovo ThinkPad #61546
Conversation
@Synthetica9 all your suggestions have been implemented, thanks for these. Are you still requesting other changes? |
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.
LGTM
@abbradar it's all yours then! |
Oh I'm sorry, it appears my suggestion breaks the urls. This patch should fix that, also remove the patchdiff --git a/pkgs/development/libraries/libfprint/default.nix b/pkgs/development/libraries/libfprint/default.nix
index fa6282cec99..fc4a8c7c342 100644
--- a/pkgs/development/libraries/libfprint/default.nix
+++ b/pkgs/development/libraries/libfprint/default.nix
@@ -7,18 +7,19 @@ stdenv.mkDerivation rec {
pname = "libfprint" + stdenv.lib.optionalString thinkpad "-thinkpad";
version = "0.99.0";
- src =
- if thinkpad then
- fetchFromGitHub {
- owner = "3v1n0";
- repo = pname;
- rev = "2e2e3821717e9042e93a995bdbd3d00f2df0be9c";
- sha256 = "1vps1wrp7hskf13f7jrv0dwry2fcid76x2w463wplngp63cj7b3b";
- }
- else fetchurl {
- url = "https://gitlab.freedesktop.org/${pname}/${pname}/uploads/82ba3cef5bdf72997df711eacdb13c0f/${pname}-${version}.tar.xz";
+ src = {
+ libfprint-thinkpad = fetchFromGitHub {
+ owner = "3v1n0";
+ repo = "libfprint";
+ rev = "2e2e3821717e9042e93a995bdbd3d00f2df0be9c";
+ sha256 = "1vps1wrp7hskf13f7jrv0dwry2fcid76x2w463wplngp63cj7b3b";
+ };
+
+ libfprint = fetchurl {
+ url = "https://gitlab.freedesktop.org/libfprint/libfprint/uploads/82ba3cef5bdf72997df711eacdb13c0f/libfprint-${version}.tar.xz";
sha256 = "16r4nl40y0jri57jiqmdz4s87byblx22lbhyvqpljd6mqm5rg187";
};
+ }.${pname};
buildInputs = [ libusb pixman glib nss gtk3 ]
++ stdenv.lib.optional thinkpad openssl;
@@ -28,7 +29,7 @@ stdenv.mkDerivation rec {
mesonFlags = [ "-Dudev_rules_dir=lib/udev/rules.d" "-Dx11-examples=false" ];
preConfigure = ''
- substituteInPlace ${pname}/meson.build \
+ substituteInPlace libfprint/meson.build \
--replace /bin/echo ${coreutils}/bin/echo
'';
diff --git a/pkgs/tools/security/fprintd/default.nix b/pkgs/tools/security/fprintd/default.nix
index 2297b8cdca4..b43be1a6924 100644
--- a/pkgs/tools/security/fprintd/default.nix
+++ b/pkgs/tools/security/fprintd/default.nix
@@ -7,7 +7,7 @@ stdenv.mkDerivation rec {
version = "0.8.1";
src = fetchurl {
- url = "https://gitlab.freedesktop.org/libfprint/${pname}/uploads/bdd9f91909f535368b7c21f72311704a/${pname}-${version}.tar.xz";
+ url = "https://gitlab.freedesktop.org/libfprint/fprintd/uploads/bdd9f91909f535368b7c21f72311704a/fprintd-${version}.tar.xz";
sha256 = "124s0g9syvglgsmqnavp2a8c0zcq8cyaph8p8iyvbla11vfizs9l";
};
|
@worldofpeace Are Nix expressions lazily evaluated? If not, you're fetching both sources instead of only the right one. |
They are :) |
@worldofpeace should be better now. |
@GrahamcOfBorg build libfprint fprintd libfprint-thinkpad fprintd-thinkpad |
Congrats @cizra ✨ Thank you for contributing. |
Motivation for this change
Lenovo ThinkPads have a fingerprint sensor with special needs. There's a fork of libfprintd available that supports it.
Things done
thinkpad
option topkgs/development/libraries/libfprint/default.nix
thinkpad
option tofprintd
(package and service)Usage:
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)