about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/op
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-11-20 14:55:32 +0100
committerAlyssa Ross <hi@alyssa.is>2023-11-20 14:55:32 +0100
commit34b58aaefccdb5c64b912903973ba729bae58be3 (patch)
treee18a96bc0f066422356a8da655453403baa97e64 /nixpkgs/pkgs/by-name/op
parent7be318098d7fe87d896e8787bfadc0345149cb59 (diff)
parent3fb937a1e9f4157f57011965b99fcb7f4139d9ad (diff)
downloadnixlib-34b58aaefccdb5c64b912903973ba729bae58be3.tar
nixlib-34b58aaefccdb5c64b912903973ba729bae58be3.tar.gz
nixlib-34b58aaefccdb5c64b912903973ba729bae58be3.tar.bz2
nixlib-34b58aaefccdb5c64b912903973ba729bae58be3.tar.lz
nixlib-34b58aaefccdb5c64b912903973ba729bae58be3.tar.xz
nixlib-34b58aaefccdb5c64b912903973ba729bae58be3.tar.zst
nixlib-34b58aaefccdb5c64b912903973ba729bae58be3.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/by-name/op')
-rw-r--r--nixpkgs/pkgs/by-name/op/open-fprintd/package.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/op/open-fprintd/package.nix b/nixpkgs/pkgs/by-name/op/open-fprintd/package.nix
new file mode 100644
index 000000000000..b8c8b765d550
--- /dev/null
+++ b/nixpkgs/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;
+  };
+}