mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 13:30:36 +00:00
jp2a: add update script and version check, modernize
This commit is contained in:
@@ -11,11 +11,13 @@
|
||||
bash-completion,
|
||||
libwebp,
|
||||
libexif,
|
||||
nix-update-script,
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
version = "1.3.3";
|
||||
pname = "jp2a";
|
||||
version = "1.3.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Talinx";
|
||||
@@ -24,16 +26,16 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-GvPRLYrqZyzk24RmJJ1VcnXo6uda50qqqRA/pioPm5Q=";
|
||||
};
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
makeFlags = [ "PREFIX=${placeholder "out"}" ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
autoconf-archive
|
||||
pkg-config
|
||||
bash-completion
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
bash-completion
|
||||
libjpeg
|
||||
libpng
|
||||
ncurses
|
||||
@@ -41,12 +43,23 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
libexif
|
||||
];
|
||||
|
||||
installFlags = [ "bashcompdir=\${out}/share/bash-completion/completions" ];
|
||||
installFlags = [ "bashcompdir=${placeholder "out"}/share/bash-completion/completions" ];
|
||||
|
||||
__structuredAttrs = true;
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
|
||||
doInstallCheck = true;
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
broken = stdenv.hostPlatform.isDarwin;
|
||||
homepage = "https://github.com/Talinx/jp2a";
|
||||
description = "Small utility that converts JPG images to ASCII";
|
||||
changelog = "https://github.com/Talinx/jp2a/releases/tag/${finalAttrs.src.tag}";
|
||||
license = lib.licenses.gpl2Only;
|
||||
maintainers = [ lib.maintainers.FlorianFranzen ];
|
||||
platforms = lib.platforms.unix;
|
||||
|
||||
Reference in New Issue
Block a user