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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.3 KiB
Nix
Raw Normal View History

2022-10-11 07:33:29 +01:00
{ lib, stdenv, fetchurl, pkg-config, SDL2, libpng, libiconv, libobjc }:
2019-01-01 16:19:07 +00:00
stdenv.mkDerivation (finalAttrs: rec {
2019-01-01 16:19:07 +00:00
pname = "qrencode";
2020-11-11 21:51:22 +00:00
version = "4.1.1";
2019-01-01 16:19:07 +00:00
outputs = [ "bin" "out" "man" "dev" ];
src = fetchurl {
url = "https://fukuchi.org/works/qrencode/qrencode-${version}.tar.gz";
2020-11-11 21:51:22 +00:00
sha256 = "sha256-2kSO1PUqumvLDNSMrA3VG4aSvMxM0SdDFAL8pvgXHo4=";
2019-01-01 16:19:07 +00:00
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libiconv libpng ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ libobjc ];
2019-01-01 16:19:07 +00:00
nativeCheckInputs = [ SDL2 ];
doCheck = false;
2019-01-01 16:19:07 +00:00
2019-01-01 16:38:11 +00:00
checkPhase = ''
runHook preCheck
pushd tests
./test_basic.sh
popd
runHook postCheck
'';
passthru.tests = finalAttrs.finalPackage.overrideAttrs (_: {
configureFlags = [ "--with-tests" ];
doCheck = true;
});
meta = with lib; {
homepage = "https://fukuchi.org/works/qrencode/";
2019-01-01 16:19:07 +00:00
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 = [ ];
2019-01-01 16:19:07 +00:00
platforms = platforms.all;
2023-08-12 03:59:41 +01:00
mainProgram = "qrencode";
2019-01-01 16:19:07 +00:00
};
})