about summary refs log tree commit diff
path: root/pkgs/by-name
diff options
context:
space:
mode:
authorArtturi <Artturin@artturin.com>2023-11-19 18:13:32 +0200
committerGitHub <noreply@github.com>2023-11-19 18:13:32 +0200
commitc71c02a5592007816f65dd33019fa162806f8b3e (patch)
treedc26bb9dd9afd16a13ac073943fa7dfef7a5565f /pkgs/by-name
parent64f54e41d67961a8795c2941005eb35c3ed600b9 (diff)
parentfef8db6162506e0388c635a8e25f867263c9c048 (diff)
Merge pull request #157807 from scottbot95/open-fprintd
Diffstat (limited to 'pkgs/by-name')
-rw-r--r--pkgs/by-name/op/open-fprintd/package.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/pkgs/by-name/op/open-fprintd/package.nix b/pkgs/by-name/op/open-fprintd/package.nix
new file mode 100644
index 0000000000000..b8c8b765d550f
--- /dev/null
+++ b/pkgs/by-name/op/open-fprintd/package.nix
@@ -0,0 +1,44 @@
+{ lib, fetchFromGitHub, python3Packages }:
+
+python3Packages.buildPythonPackage rec {
+  pname = "open-fprintd";
+  version = "0.6";
+
+  src = fetchFromGitHub {
+    owner = "uunicorn";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-uVFuwtsmR/9epoqot3lJ/5v5OuJjuRjL7FJF7oXNDzU=";
+  };
+
+  propagatedBuildInputs = with python3Packages; [ dbus-python pygobject3 ];
+
+  checkInputs = with python3Packages; [ dbus-python ];
+
+  postInstall = ''
+    install -D -m 644 debian/open-fprintd.service \
+      $out/lib/systemd/system/open-fprintd.service
+    install -D -m 644 debian/open-fprintd-resume.service \
+      $out/lib/systemd/system/open-fprintd-resume.service
+    install -D -m 644 debian/open-fprintd-suspend.service \
+      $out/lib/systemd/system/open-fprintd-suspend.service
+    substituteInPlace $out/lib/systemd/system/open-fprintd.service \
+      --replace /usr/lib/open-fprintd "$out/lib/open-fprintd"
+    substituteInPlace $out/lib/systemd/system/open-fprintd-resume.service \
+      --replace /usr/lib/open-fprintd "$out/lib/open-fprintd"
+    substituteInPlace $out/lib/systemd/system/open-fprintd-suspend.service \
+      --replace /usr/lib/open-fprintd "$out/lib/open-fprintd"
+  '';
+
+  postFixup = ''
+    wrapPythonProgramsIn "$out/lib/open-fprintd" "$out $pythonPath"
+  '';
+
+  meta = with lib; {
+    description =
+      "Fprintd replacement which allows you to have your own backend as a standalone service";
+    homepage = "https://github.com/uunicorn/open-fprintd";
+    license = licenses.gpl2Only;
+    platforms = platforms.linux;
+  };
+}