qrcode: apply guideline checklist (#538473)
This commit is contained in:
@@ -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";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user