blob: b902feffdc038c55543e8ed877df9223fb87596d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
{ stdenv, writeExecline, getBins, zbar, libnotify, imagemagick }:
let
bins = getBins zbar [ "zbarimg" ]
// getBins imagemagick [ "import" ];
script = writeExecline "read-qr-code" {} [
"pipeline" [
bins.import "png:-"
]
bins.zbarimg
"-Sdisable"
"-Sqrcode.enable"
"--raw"
"-"
];
in script // {
meta = {
description = "Capture a screenshot, then return the content of the QR code, if any";
};
}
|