15 rustPlatform.buildRustPackage rec {
16 pname = "libimagequant";
19 src = fetchFromGitHub {
21 repo = "libimagequant";
23 hash = "sha256-dau+oGwcyN7AA1jEBtCgYV/cmrx5Wo3koKXbloYagrw=";
27 # created it by running `cargo update` in the source tree.
28 lockFile = ./Cargo.lock;
32 ln -s ${./Cargo.lock} Cargo.lock
35 nativeBuildInputs = [ cargo-c ];
39 ${rust.envVars.setEnv} cargo cbuild --release --frozen --prefix=${placeholder "out"} --target ${stdenv.hostPlatform.rust.rustcTarget}
45 ${rust.envVars.setEnv} cargo cinstall --release --frozen --prefix=${placeholder "out"} --target ${stdenv.hostPlatform.rust.rustcTarget}
51 inherit (python3.pkgs) pillow;
53 pkg-config = testers.hasPkgConfigModules {
54 package = libimagequant;
55 moduleNames = [ "imagequant" ];
60 homepage = "https://pngquant.org/lib/";
61 description = "Image quantization library";
62 longDescription = "Small, portable C library for high-quality conversion of RGBA images to 8-bit indexed-color (palette) images.";
63 license = licenses.gpl3Plus;
64 platforms = platforms.unix;
65 maintainers = with maintainers; [ ma9e ];