Unverified Commit da0a6aee authored by Michael Daniels's avatar Michael Daniels
Browse files

qrencode: adopt, cleanup

* Switched `rev` to `tag`.
* Added `passthru.updateScript`
* Removed `with lib;` from `meta`
* Updated `meta.description` and `meta.longDescription` to reflect that there is a CLI tool too.
* Adopted.

(cherry picked from commit 9d644e7e)
parent f373743f
Loading
Loading
Loading
Loading
+18 −11
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  lib,
  stdenv,
  fetchFromGitHub,
  nix-update-script,
  pkg-config,
  libpng,
  libiconv,
@@ -22,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: {
  src = fetchFromGitHub {
    owner = "fukuchi";
    repo = "libqrencode";
    rev = "v${finalAttrs.version}";
    tag = "v${finalAttrs.version}";
    hash = "sha256-nbrmg9SqCqMrLE7WCfNEzMV/eS9UVCKCrjBrGMzAsLk";
  };

@@ -48,22 +49,28 @@ stdenv.mkDerivation (finalAttrs: {
    runHook postCheck
  '';

  passthru.tests = finalAttrs.finalPackage.overrideAttrs (_: {
  passthru = {
    tests = finalAttrs.finalPackage.overrideAttrs {
      configureFlags = [ "--with-tests" ];
      doCheck = true;
  });
    };
    updateScript = nix-update-script { };
  };

  meta = with lib; {
  meta = {
    homepage = "https://fukuchi.org/works/qrencode/";
    description = "C library for encoding data in a QR Code symbol";
    description = "C library and command line tool 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.
      such as a smartphone.

      The library also contains qrencode, a command-line utility to output
      QR Code images in various formats.
    '';
    license = licenses.lgpl21Plus;
    maintainers = [ ];
    platforms = platforms.all;
    license = lib.licenses.lgpl21Plus;
    maintainers = [ lib.maintainers.mdaniels5757 ];
    platforms = lib.platforms.all;
    mainProgram = "qrencode";
  };
})