qrcode: apply guideline checklist

Signed-off-by: lucasew <lucas59356@gmail.com>
Assisted-by: Grok (xAI) via grok-cli
This commit is contained in:
lucasew
2026-07-04 16:52:20 -03:00
parent 611c1bb6f6
commit decbab3281
+22 -8
View File
@@ -3,9 +3,10 @@
stdenv,
fetchFromGitHub,
unstableGitUpdater,
testers,
}:
stdenv.mkDerivation {
stdenv.mkDerivation (finalAttrs: {
pname = "qrcode";
version = "0-unstable-2025-04-29";
@@ -16,25 +17,38 @@ stdenv.mkDerivation {
hash = "sha256-WQeZB8G9Nm68mYmLr0ksZdFDcQxF54X0yJxigJZWvMo=";
};
strictDeps = true;
enableParallelBuilding = true;
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
# Upstream Makefile has no install target.
installPhase = ''
mkdir -p "$out"/{bin,share/doc/qrcode}
cp qrcode "$out/bin"
cp DOCUMENTATION LICENCE "$out/share/doc/qrcode"
runHook preInstall
install -Dm755 qrcode -t "$out/bin"
install -Dm644 DOCUMENTATION LICENCE -t "$out/share/doc/qrcode"
runHook postInstall
'';
passthru.updateScript = unstableGitUpdater { };
passthru = {
updateScript = unstableGitUpdater { };
tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
# Upstream exits non-zero even on successful -V.
command = "{ qrcode -V || true; }";
version = "0.1";
};
};
meta = {
description = "Small QR-code tool";
description = "QR-code encoder and decoder";
homepage = "https://github.com/qsantos/qrcode";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [
raskin
lucasew
];
platforms = with lib.platforms; unix;
platforms = lib.platforms.unix;
mainProgram = "qrcode";
};
}
})