|
3 | 3 | fetchFromGitHub, |
4 | 4 | rustPlatform, |
5 | 5 | fetchurl, |
6 | | - runCommand, |
7 | | - lndir, |
8 | 6 | }: |
9 | 7 |
|
10 | | -rustPlatform.buildRustPackage rec { |
| 8 | +rustPlatform.buildRustPackage (finalAttrs: { |
11 | 9 | pname = "flaca"; |
12 | | - version = "3.2.3"; |
| 10 | + version = "3.3.2"; |
13 | 11 |
|
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 | + ''; |
32 | 27 |
|
33 | 28 | nativeBuildInputs = [ rustPlatform.bindgenHook ]; |
34 | 29 |
|
35 | 30 | useFetchCargoVendor = true; |
36 | | - cargoHash = "sha256-MdPPLv0836rVxVrl8PXMDufHdTtmBBhJ/EuG4qcK3Kk="; |
| 31 | + cargoHash = "sha256-i4eYyS3s7q/1PaqwawpWeDbUHUGEvIfN65xfvpLkOpY="; |
37 | 32 |
|
38 | 33 | meta = with lib; { |
39 | 34 | description = "CLI tool to losslessly compress JPEG and PNG images"; |
40 | 35 | 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"; |
41 | 36 | 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}"; |
43 | 38 | maintainers = with maintainers; [ zzzsy ]; |
44 | 39 | platforms = platforms.linux; |
45 | 40 | license = licenses.wtfpl; |
46 | 41 | mainProgram = "flaca"; |
47 | 42 | }; |
48 | | -} |
| 43 | +}) |
0 commit comments