zxing-cpp: refactor
- Use rec-less, overlay-style overridable recursive attributes (in effect since https://github.com/NixOS/nixpkgs/pull/119942) - Add passthru.updateScript - Remove nested with under meta.
This commit is contained in:
parent
1769609dc0
commit
19a58cefaa
1 changed files with 16 additions and 10 deletions
|
@ -1,19 +1,20 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, cmake
|
||||
, pkg-config
|
||||
, python3
|
||||
, gitUpdater
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "zxing-cpp";
|
||||
version = "2.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zxing-cpp";
|
||||
repo = "zxing-cpp";
|
||||
rev = "v${version}";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-B/jGsHImRfj0iEio2b6R6laWBI1LL3OI407O7sren8s=";
|
||||
};
|
||||
|
||||
|
@ -27,11 +28,16 @@ stdenv.mkDerivation rec {
|
|||
"-DBUILD_BLACKBOX_TESTS=OFF"
|
||||
];
|
||||
|
||||
passthru.tests = {
|
||||
passthru = {
|
||||
tests = {
|
||||
inherit (python3.pkgs) zxing_cpp;
|
||||
};
|
||||
updateScript = gitUpdater {
|
||||
rev-prefix = "v";
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
homepage = "https://github.com/zxing-cpp/zxing-cpp";
|
||||
description = "C++ port of zxing (a Java barcode image processing library)";
|
||||
longDescription = ''
|
||||
|
@ -43,8 +49,8 @@ stdenv.mkDerivation rec {
|
|||
and performance. It can both read and write barcodes in a number of
|
||||
formats.
|
||||
'';
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ AndersonTorres ];
|
||||
platforms = with platforms; unix;
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ AndersonTorres lukegb ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue