Files
nixpkgs/pkgs/by-name/ox/oxipng/package.nix

35 lines
844 B
Nix

{
lib,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage (finalAttrs: {
version = "10.1.1";
pname = "oxipng";
# do not use fetchCrate (only repository includes tests)
src = fetchFromGitHub {
owner = "oxipng";
repo = "oxipng";
tag = "v${finalAttrs.version}";
hash = "sha256-G06GAlxEVOqt2xHq+JOLSYbsa++aArbu+sb0ypQn9u4=";
};
cargoHash = "sha256-gRWDpxZGy01lWgCIse4Tf7gjwxzosozONB3LD5pX5KQ=";
# 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/oxipng/oxipng";
description = "Multithreaded lossless PNG compression optimizer";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ dywedir ];
mainProgram = "oxipng";
};
})