14 stdenv.mkDerivation (finalAttrs: {
15 pname = "imageworsener";
18 src = fetchFromGitHub {
20 repo = "imageworsener";
21 rev = finalAttrs.version;
22 hash = "sha256-1f5x8Ph994Kkjo38NudXL+UF0fpR8BmZfaGPxc8RENU=";
26 # Fix tests not failing even when they should.
27 # https://github.com/jsummers/imageworsener/pull/46
29 url = "https://github.com/jsummers/imageworsener/commit/91c7c79d86f55920193d17a7b87631b14ac7779f.patch?full_index=1";
30 hash = "sha256-8vxht0FiQFOdglwaO0ZQpg5BNYXXHROkznZ+Caxm/v0=";
35 patchShebangs tests/runtest
37 # JPEG tests fail due to libjpeg-turbo differences.
38 sed -i '/\.jpg/d' tests/runtest
39 rm tests/expected/*.jpg
43 mkdir -p $out/share/doc/imageworsener
44 cp readme.txt technical.txt $out/share/doc/imageworsener
47 nativeBuildInputs = [ autoreconfHook ];
60 enableParallelBuilding = true;
62 __structuredAttrs = true;
64 passthru.updateScript = nix-update-script { };
67 description = "Raster image scaling and processing utility";
69 ImageWorsener is a cross-platform command-line utility and library for
70 image scaling and other image processing. It has full support for PNG,
71 JPEG, BMP formats, experimental support for WebP, read-only support for
72 GIF, and limited support for some other image formats. It’s not as
73 fast or memory-efficient as some utilities, but it’s very accurate.
75 homepage = "https://entropymine.com/imageworsener/";
76 changelog = "${finalAttrs.src.meta.homepage}/blob/${finalAttrs.src.rev}/changelog.txt";
77 sourceProvenance = [ lib.sourceTypes.fromSource ];
78 license = lib.licenses.mit;
81 lib.maintainers.smitop
83 mainProgram = "imagew";
84 platforms = lib.platforms.all;