nixpkgs/pkgs/applications/graphics/flaca/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.3 KiB
Nix
Raw Normal View History

2023-11-21 12:07:59 +00:00
{ lib
, fetchFromGitHub
, rustPlatform
, fetchurl
, runCommand
, lndir
}:
2023-06-22 14:52:37 +00:00
rustPlatform.buildRustPackage rec {
pname = "flaca";
2023-11-21 12:07:59 +00:00
version = "2.4.6";
2023-06-22 14:52:37 +00:00
2023-11-21 12:07:59 +00:00
src =
let
source = fetchFromGitHub {
owner = "Blobfolio";
repo = pname;
rev = "v${version}";
hash = "sha256-uybEo098+Y92b2P9CniKFmaV8hQZFuOSthgQRGZ/ncc=";
};
lockFile = fetchurl {
url = "https://github.com/Blobfolio/flaca/releases/download/v${version}/Cargo.lock";
hash = "sha256-xAjpw71HgS6fILg5zNuc43s0fIqYcoUMMbCH65xrlww=";
};
in
runCommand "source-with-lock" { nativeBuildInputs = [ lndir ]; } ''
mkdir -p $out
ln -s ${lockFile} $out/Cargo.lock
lndir -silent ${source} $out
'';
2023-06-22 14:52:37 +00:00
2023-11-21 12:07:59 +00:00
cargoHash = "sha256-w+PeuH6VFIu3iH5EXF6gEwyYoGeqXX0yd5jJs2NqisQ=";
2023-06-22 14:52:37 +00:00
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";
maintainers = with maintainers; [ zzzsy ];
platforms = platforms.linux;
license = licenses.wtfpl;
2024-02-11 02:19:15 +00:00
mainProgram = "flaca";
2023-06-22 14:52:37 +00:00
};
}