35 lines
832 B
Nix
35 lines
832 B
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
rustPlatform,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
version = "9.1.5";
|
|
pname = "oxipng";
|
|
|
|
# do not use fetchCrate (only repository includes tests)
|
|
src = fetchFromGitHub {
|
|
owner = "shssoichiro";
|
|
repo = "oxipng";
|
|
tag = "v${version}";
|
|
hash = "sha256-UjiGQSLiUMuYm62wF7Xwhp2MRzCaQ9pbBBkvHnuspVw=";
|
|
};
|
|
|
|
cargoHash = "sha256-sdhyxJDUlb6+SJ/kvfqsplHOeCEbA3ls66eur3eeVVA=";
|
|
|
|
# don't require qemu for aarch64-linux tests
|
|
# error: linker `aarch64-linux-gnu-gcc` not found
|
|
postPatch = ''
|
|
rm .cargo/config.toml
|
|
'';
|
|
|
|
meta = {
|
|
homepage = "https://github.com/shssoichiro/oxipng";
|
|
description = "Multithreaded lossless PNG compression optimizer";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ dywedir ];
|
|
mainProgram = "oxipng";
|
|
};
|
|
}
|