2022-10-21 18:38:19 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, SDL2, libpng, libiconv, libobjc }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "qrencode";
|
2020-11-12 09:05:59 +00:00
|
|
|
version = "4.1.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
outputs = [ "bin" "out" "man" "dev" ];
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://fukuchi.org/works/qrencode/qrencode-${version}.tar.gz";
|
2020-11-12 09:05:59 +00:00
|
|
|
sha256 = "sha256-2kSO1PUqumvLDNSMrA3VG4aSvMxM0SdDFAL8pvgXHo4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2022-12-17 10:02:37 +00:00
|
|
|
|
|
|
|
buildInputs = [ libpng ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ libiconv libobjc ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-tests"
|
|
|
|
];
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
checkInputs = [ SDL2 ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
pushd tests
|
|
|
|
./test_basic.sh
|
|
|
|
popd
|
|
|
|
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
2022-01-03 16:56:52 +00:00
|
|
|
maintainers = with maintainers; [ adolfogc yana ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|