flaca: 3.2.3 -> 3.3.2

This commit is contained in:
Mathias Zhang 2025-04-09 00:58:37 +08:00
parent 16cdd6bc56
commit 4d3ac9fe9d
No known key found for this signature in database

View file

@ -3,46 +3,41 @@
fetchFromGitHub,
rustPlatform,
fetchurl,
runCommand,
lndir,
}:
rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
pname = "flaca";
version = "3.2.3";
version = "3.3.2";
src =
let
source = fetchFromGitHub {
owner = "Blobfolio";
repo = "flaca";
rev = "v${version}";
hash = "sha256-GpxOTu7yjJ9IFMKVkgjLeKGNEUiKw0ZeWQorfhaOTsg=";
};
lockFile = fetchurl {
url = "https://github.com/Blobfolio/flaca/releases/download/v${version}/Cargo.lock";
hash = "sha256-SaqQ4U8JXTFlp1EqkNZ6VV8KyPXHYtEycfZn/68SeHY=";
};
in
runCommand "source-with-lock" { nativeBuildInputs = [ lndir ]; } ''
mkdir -p $out
ln -s ${lockFile} $out/Cargo.lock
lndir -silent ${source} $out
'';
lockFile = fetchurl {
url = "https://github.com/Blobfolio/flaca/releases/download/v${finalAttrs.version}/Cargo.lock";
hash = "sha256-AFEuJQAz+cXUuyLefqsV2VyytJ+sfLrJQSArITqQZZU=";
};
src = fetchFromGitHub {
owner = "Blobfolio";
repo = "flaca";
tag = "v${finalAttrs.version}";
hash = "sha256-sxBP3L9Abk3/NYkE1UeFFulGEhDe4wKqS71wrX6mA9c=";
};
postUnpack = ''
ln -s ${finalAttrs.lockFile} ${finalAttrs.src.name}/Cargo.lock
'';
nativeBuildInputs = [ rustPlatform.bindgenHook ];
useFetchCargoVendor = true;
cargoHash = "sha256-MdPPLv0836rVxVrl8PXMDufHdTtmBBhJ/EuG4qcK3Kk=";
cargoHash = "sha256-i4eYyS3s7q/1PaqwawpWeDbUHUGEvIfN65xfvpLkOpY=";
meta = with lib; {
description = "CLI tool to losslessly compress JPEG and PNG images";
longDescription = "A CLI tool for x86-64 Linux machines that simplifies the task of maximally, losslessly compressing JPEG and PNG images for use in production web environments";
homepage = "https://github.com/Blobfolio/flaca";
changelog = "https://github.com/Blobfolio/flaca/releases/tag/v${version}";
changelog = "https://github.com/Blobfolio/flaca/releases/tag/v${finalAttrs.version}";
maintainers = with maintainers; [ zzzsy ];
platforms = platforms.linux;
license = licenses.wtfpl;
mainProgram = "flaca";
};
}
})