nixpkgs/pkgs/by-name/zx/zxing-cpp/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

59 lines
1.4 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
python3,
gitUpdater,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "zxing-cpp";
version = "2.2.1";
src = fetchFromGitHub {
owner = "zxing-cpp";
repo = "zxing-cpp";
rev = "v${finalAttrs.version}";
hash = "sha256-teFspdATn9M7Z1vSr/7PdJx/xAv+TVai8rIekxqpBZk=";
};
nativeBuildInputs = [
cmake
pkg-config
];
cmakeFlags = [
"-DBUILD_EXAMPLES=OFF"
"-DBUILD_BLACKBOX_TESTS=OFF"
];
passthru = {
tests = {
inherit (python3.pkgs) zxing-cpp;
};
updateScript = gitUpdater {
rev-prefix = "v";
};
};
meta = {
homepage = "https://github.com/zxing-cpp/zxing-cpp";
changelog = "https://github.com/zxing-cpp/zxing-cpp/releases/tag/${finalAttrs.src.rev}";
description = "C++ port of zxing (a Java barcode image processing library)";
longDescription = ''
ZXing-C++ ("zebra crossing") is an open-source, multi-format 1D/2D barcode
image processing library implemented in C++.
It was originally ported from the Java ZXing Library but has been
developed further and now includes many improvements in terms of quality
and performance. It can both read and write barcodes in a number of
formats.
'';
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ lukegb ];
platforms = lib.platforms.unix;
};
})