nixpkgs-suyu/pkgs/development/libraries/qrencode/default.nix

48 lines
1.1 KiB
Nix
Raw Normal View History

2019-01-03 05:33:54 +01:00
{ stdenv, fetchurl, pkgconfig, SDL2, libpng, libiconv }:
2019-01-01 17:19:07 +01:00
stdenv.mkDerivation rec {
pname = "qrencode";
version = "4.0.2";
outputs = [ "bin" "out" "man" "dev" ];
src = fetchurl {
url = "https://fukuchi.org/works/qrencode/qrencode-${version}.tar.gz";
sha256 = "079v3a15ydpr67zdi3xbgvic8n2kxvi0m32dyz8jaik10yffgayv";
};
nativeBuildInputs = [ pkgconfig ];
2019-01-03 05:33:54 +01:00
buildInputs = [ SDL2 libpng ] ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv ];
2019-01-01 17:19:07 +01:00
2019-01-01 17:38:11 +01:00
configureFlags = [
"--with-tests"
];
2019-01-01 17:19:07 +01:00
doCheck = true;
2019-01-01 17:38:11 +01:00
checkPhase = ''
runHook preCheck
pushd tests
./test_basic.sh
popd
runHook postCheck
'';
2019-01-01 17:19:07 +01:00
meta = with stdenv.lib; {
homepage = https://fukuchi.org/works/qrencode/;
description = "C library for encoding data in a QR Code symbol";
longDescription = ''
Libqrencode is a C library for encoding data in a QR Code symbol,
a kind of 2D symbology that can be scanned by handy terminals
such as a mobile phone with CCD.
'';
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ adolfogc yegortimoshenko ];
platforms = platforms.all;
};
}