Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, pkg-config, SDL2, libpng, libiconv, libobjc }: 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 16 buildInputs = [ libiconv libpng ] 17 ++ lib.optionals stdenv.isDarwin [ libobjc ]; 18 19 configureFlags = [ 20 "--with-tests" 21 ]; 22 23 nativeCheckInputs = [ SDL2 ]; 24 25 doCheck = true; 26 27 checkPhase = '' 28 runHook preCheck 29 30 pushd tests 31 ./test_basic.sh 32 popd 33 34 runHook postCheck 35 ''; 36 37 meta = with lib; { 38 homepage = "https://fukuchi.org/works/qrencode/"; 39 description = "C library for encoding data in a QR Code symbol"; 40 longDescription = '' 41 Libqrencode is a C library for encoding data in a QR Code symbol, 42 a kind of 2D symbology that can be scanned by handy terminals 43 such as a mobile phone with CCD. 44 ''; 45 license = licenses.lgpl21Plus; 46 maintainers = with maintainers; [ adolfogc yana ]; 47 platforms = platforms.all; 48 }; 49}