2019-01-01 16:19:07 +00:00
|
|
|
{ stdenv, fetchFromGitHub, imagemagick, qrencode
|
2018-06-12 17:54:44 +01:00
|
|
|
, testQR ? false, zbar ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert testQR -> zbar != false;
|
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "asc-key-to-qr-code-gif";
|
2018-06-12 17:54:44 +01:00
|
|
|
version = "20180613";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "yishilin14";
|
|
|
|
repo = "asc-key-to-qr-code-gif";
|
|
|
|
rev = "5b7b239a0089a5269444cbe8a651c99dd43dce3f";
|
|
|
|
sha256 = "0yrc302a2fhbzryb10718ky4fymfcps3lk67ivis1qab5kbp6z8r";
|
|
|
|
};
|
|
|
|
|
2019-01-01 16:19:07 +00:00
|
|
|
buildInputs = [ imagemagick qrencode ] ++ stdenv.lib.optional testQR zbar;
|
2018-06-12 17:54:44 +01:00
|
|
|
dontBuild = true;
|
|
|
|
dontStrip = true;
|
|
|
|
dontPatchELF = true;
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
substituteInPlace asc-to-gif.sh \
|
|
|
|
--replace "convert" "${imagemagick}/bin/convert" \
|
2019-01-01 16:19:07 +00:00
|
|
|
--replace "qrencode" "${qrencode.bin}/bin/qrencode"
|
2018-06-12 17:54:44 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp * $out/bin/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://github.com/yishilin14/asc-key-to-qr-code-gif;
|
|
|
|
description = "Convert ASCII-armored PGP keys to animated QR code";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ asymmetric ];
|
|
|
|
};
|
|
|
|
}
|