1 { lib, stdenv, fetchFromGitHub, imagemagick, qrencode
2 , testQR ? false, zbar ? null
5 assert testQR -> zbar != false;
8 pname = "asc-key-to-qr-code-gif";
11 src = fetchFromGitHub {
13 repo = "asc-key-to-qr-code-gif";
14 rev = "5b7b239a0089a5269444cbe8a651c99dd43dce3f";
15 sha256 = "0yrc302a2fhbzryb10718ky4fymfcps3lk67ivis1qab5kbp6z8r";
24 ''--replace "convert" "${imagemagick}/bin/convert"''
25 ''--replace "qrencode" "${qrencode.bin}/bin/qrencode"''
26 ] ++ lib.optionals testQR [
27 ''--replace "hash zbarimg" "true"'' # hash does not work on NixOS
28 ''--replace "$(zbarimg --raw" "$(${zbar.out}/bin/zbarimg --raw"''
31 substituteInPlace asc-to-gif.sh ${lib.concatStringsSep " " substitutions}
40 homepage = "https://github.com/yishilin14/asc-key-to-qr-code-gif";
41 description = "Convert ASCII-armored PGP keys to animated QR code";
42 platforms = platforms.unix;
43 maintainers = with maintainers; [ asymmetric ];