at 22.05-pre 47 lines 1.1 kB view raw
1{ lib, stdenv, fetchurl, pkg-config, SDL2, libpng, libiconv }: 2 3stdenv.mkDerivation rec { 4 pname = "qrencode"; 5 version = "4.1.1"; 6 7 outputs = [ "bin" "out" "man" "dev" ]; 8 9 src = fetchurl { 10 url = "https://fukuchi.org/works/qrencode/qrencode-${version}.tar.gz"; 11 sha256 = "sha256-2kSO1PUqumvLDNSMrA3VG4aSvMxM0SdDFAL8pvgXHo4="; 12 }; 13 14 nativeBuildInputs = [ pkg-config ]; 15 buildInputs = [ SDL2 libpng ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; 16 17 configureFlags = [ 18 "--with-tests" 19 ]; 20 21 doCheck = true; 22 23 checkPhase = '' 24 runHook preCheck 25 26 pushd tests 27 ./test_basic.sh 28 popd 29 30 runHook postCheck 31 ''; 32 33 meta = with lib; { 34 homepage = "https://fukuchi.org/works/qrencode/"; 35 description = "C library for encoding data in a QR Code symbol"; 36 37 longDescription = '' 38 Libqrencode is a C library for encoding data in a QR Code symbol, 39 a kind of 2D symbology that can be scanned by handy terminals 40 such as a mobile phone with CCD. 41 ''; 42 43 license = licenses.lgpl21Plus; 44 maintainers = with maintainers; [ adolfogc yegortimoshenko ]; 45 platforms = platforms.all; 46 }; 47}