nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 python3Packages,
5 gobject-introspection,
6 wrapGAppsNoGuiHook,
7}:
8
9python3Packages.buildPythonPackage rec {
10 pname = "open-fprintd";
11 version = "0.7";
12 format = "setuptools";
13
14 src = fetchFromGitHub {
15 owner = "uunicorn";
16 repo = "open-fprintd";
17 rev = version;
18 hash = "sha256-4TraOKvBc7ddqcY73aCuKgfwx4fNoaPHVG8so8Dc5Bw=";
19 };
20
21 nativeBuildInputs = [
22 wrapGAppsNoGuiHook
23 gobject-introspection
24 ];
25
26 propagatedBuildInputs = with python3Packages; [
27 dbus-python
28 pygobject3
29 ];
30
31 checkInputs = with python3Packages; [ dbus-python ];
32
33 postInstall = ''
34 install -D -m 644 debian/open-fprintd.service \
35 $out/lib/systemd/system/open-fprintd.service
36 install -D -m 644 debian/open-fprintd-resume.service \
37 $out/lib/systemd/system/open-fprintd-resume.service
38 install -D -m 644 debian/open-fprintd-suspend.service \
39 $out/lib/systemd/system/open-fprintd-suspend.service
40 substituteInPlace $out/lib/systemd/system/open-fprintd.service \
41 --replace /usr/lib/open-fprintd "$out/lib/open-fprintd"
42 substituteInPlace $out/lib/systemd/system/open-fprintd-resume.service \
43 --replace /usr/lib/open-fprintd "$out/lib/open-fprintd"
44 substituteInPlace $out/lib/systemd/system/open-fprintd-suspend.service \
45 --replace /usr/lib/open-fprintd "$out/lib/open-fprintd"
46 '';
47
48 dontWrapGApps = true;
49 makeWrapperArgs = [ "\${gappsWrapperArgs[@]}" ];
50
51 postFixup = ''
52 wrapPythonProgramsIn "$out/lib/open-fprintd" "$out ''${pythonPath[*]}"
53 '';
54
55 meta = {
56 description = "Fprintd replacement which allows you to have your own backend as a standalone service";
57 homepage = "https://github.com/uunicorn/open-fprintd";
58 license = lib.licenses.gpl2Only;
59 platforms = lib.platforms.linux;
60 };
61}