summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/security/asc-key-to-qr-code-gif
diff options
context:
space:
mode:
authorLorenzo Manacorda <lorenzo@mailbox.org>2018-06-12 18:54:44 +0200
committerLorenzo Manacorda <lorenzo@mailbox.org>2018-06-13 23:04:05 +0200
commitf8cd0cbc9c4e449acc8c3a72643643ce3e288f32 (patch)
treee87df5ebe9780db3eb519c18446ac327c689b700 /pkgs/tools/security/asc-key-to-qr-code-gif
parent67d00a4a1aacb0a79f4a2dc157b9bd027938a09f (diff)
asc-key-to-qr-code-gif: init at 20180613
Diffstat (limited to 'pkgs/tools/security/asc-key-to-qr-code-gif')
-rw-r--r--pkgs/tools/security/asc-key-to-qr-code-gif/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/tools/security/asc-key-to-qr-code-gif/default.nix b/pkgs/tools/security/asc-key-to-qr-code-gif/default.nix
new file mode 100644
index 000000000000..e04b41557482
--- /dev/null
+++ b/pkgs/tools/security/asc-key-to-qr-code-gif/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchFromGitHub, imagemagick, libqrencode
+, testQR ? false, zbar ? null
+}:
+
+assert testQR -> zbar != false;
+
+stdenv.mkDerivation rec {
+ name = "asc-key-to-qr-code-gif-${version}";
+ version = "20180613";
+
+ src = fetchFromGitHub {
+ owner = "yishilin14";
+ repo = "asc-key-to-qr-code-gif";
+ rev = "5b7b239a0089a5269444cbe8a651c99dd43dce3f";
+ sha256 = "0yrc302a2fhbzryb10718ky4fymfcps3lk67ivis1qab5kbp6z8r";
+ };
+
+ buildInputs = [ imagemagick libqrencode ] ++ stdenv.lib.optional testQR zbar;
+ dontBuild = true;
+ dontStrip = true;
+ dontPatchELF = true;
+
+ preInstall = ''
+ substituteInPlace asc-to-gif.sh \
+ --replace "convert" "${imagemagick}/bin/convert" \
+ --replace "qrencode" "${libqrencode}/bin/qrencode"
+ '';
+
+ 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 ];
+ };
+}