about summary refs log tree commit diff
path: root/pkgs/tools/misc
diff options
context:
space:
mode:
authorArijit Basu <sayanarijit@gmail.com>2023-06-29 13:30:42 +0530
committerArijit Basu <sayanarijit@gmail.com>2023-06-29 16:31:26 +0530
commitee5bca381eb03f65540e5df21c90257afe27abeb (patch)
treed13cb5e07ece57ababe6bb623f0b9c5814cbdc03 /pkgs/tools/misc
parent089f26b5e2aa88d01c166ea2e9c9e7c5c44cb15b (diff)
qrscan: init at 0.1.9
Diffstat (limited to 'pkgs/tools/misc')
-rw-r--r--pkgs/tools/misc/qrscan/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/tools/misc/qrscan/default.nix b/pkgs/tools/misc/qrscan/default.nix
new file mode 100644
index 0000000000000..91b8cfc18db37
--- /dev/null
+++ b/pkgs/tools/misc/qrscan/default.nix
@@ -0,0 +1,36 @@
+{ lib, rustPlatform, fetchFromGitHub, stdenv }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "qrscan";
+  version = "0.1.9";
+
+  src = fetchFromGitHub {
+    owner = "sayanarijit";
+    repo = "qrscan";
+    rev = "v${version}";
+    hash = "sha256-nAUZUE7NppsCAV8UyR8+OkikT4nJtnamsSVeyNz21EQ=";
+  };
+
+  nativeBuildInputs = [
+    rustPlatform.bindgenHook
+  ];
+
+  cargoHash = "sha256-P40IwFRtEQp6BGRgmt1x3UXtAKtWaMjR3kqhYq+p7wQ=";
+
+  checkFlags = [
+    # requires filesystem write access
+    "--skip=tests::test_export_files"
+    "--skip=tests::test_scan_from_stdin"
+    "--skip=tests::test_scan_jpeg_file"
+    "--skip=tests::test_scan_no_content"
+    "--skip=tests::test_scan_png_file"
+  ];
+
+  meta = with lib; {
+    description = "Scan a QR code in the terminal using the system camera or a given image";
+    homepage = "https://github.com/sayanarijit/qrscan";
+    license = licenses.mit;
+    broken = stdenv.isDarwin;
+    maintainers = [ maintainers.sayanarijit ];
+  };
+}