Skip to content

Commit 4d3ac9f

Browse files
committed
flaca: 3.2.3 -> 3.3.2
1 parent 16cdd6b commit 4d3ac9f

File tree

1 file changed

+20
-25
lines changed

1 file changed

+20
-25
lines changed

pkgs/by-name/fl/flaca/package.nix

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,41 @@
33
fetchFromGitHub,
44
rustPlatform,
55
fetchurl,
6-
runCommand,
7-
lndir,
86
}:
97

10-
rustPlatform.buildRustPackage rec {
8+
rustPlatform.buildRustPackage (finalAttrs: {
119
pname = "flaca";
12-
version = "3.2.3";
10+
version = "3.3.2";
1311

14-
src =
15-
let
16-
source = fetchFromGitHub {
17-
owner = "Blobfolio";
18-
repo = "flaca";
19-
rev = "v${version}";
20-
hash = "sha256-GpxOTu7yjJ9IFMKVkgjLeKGNEUiKw0ZeWQorfhaOTsg=";
21-
};
22-
lockFile = fetchurl {
23-
url = "https://github.com/Blobfolio/flaca/releases/download/v${version}/Cargo.lock";
24-
hash = "sha256-SaqQ4U8JXTFlp1EqkNZ6VV8KyPXHYtEycfZn/68SeHY=";
25-
};
26-
in
27-
runCommand "source-with-lock" { nativeBuildInputs = [ lndir ]; } ''
28-
mkdir -p $out
29-
ln -s ${lockFile} $out/Cargo.lock
30-
lndir -silent ${source} $out
31-
'';
12+
lockFile = fetchurl {
13+
url = "https://github.com/Blobfolio/flaca/releases/download/v${finalAttrs.version}/Cargo.lock";
14+
hash = "sha256-AFEuJQAz+cXUuyLefqsV2VyytJ+sfLrJQSArITqQZZU=";
15+
};
16+
17+
src = fetchFromGitHub {
18+
owner = "Blobfolio";
19+
repo = "flaca";
20+
tag = "v${finalAttrs.version}";
21+
hash = "sha256-sxBP3L9Abk3/NYkE1UeFFulGEhDe4wKqS71wrX6mA9c=";
22+
};
23+
24+
postUnpack = ''
25+
ln -s ${finalAttrs.lockFile} ${finalAttrs.src.name}/Cargo.lock
26+
'';
3227

3328
nativeBuildInputs = [ rustPlatform.bindgenHook ];
3429

3530
useFetchCargoVendor = true;
36-
cargoHash = "sha256-MdPPLv0836rVxVrl8PXMDufHdTtmBBhJ/EuG4qcK3Kk=";
31+
cargoHash = "sha256-i4eYyS3s7q/1PaqwawpWeDbUHUGEvIfN65xfvpLkOpY=";
3732

3833
meta = with lib; {
3934
description = "CLI tool to losslessly compress JPEG and PNG images";
4035
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";
4136
homepage = "https://github.com/Blobfolio/flaca";
42-
changelog = "https://github.com/Blobfolio/flaca/releases/tag/v${version}";
37+
changelog = "https://github.com/Blobfolio/flaca/releases/tag/v${finalAttrs.version}";
4338
maintainers = with maintainers; [ zzzsy ];
4439
platforms = platforms.linux;
4540
license = licenses.wtfpl;
4641
mainProgram = "flaca";
4742
};
48-
}
43+
})

0 commit comments

Comments
 (0)