Skip to content

Commit a6ee512

Browse files
aldenparkergithub-actions[bot]
authored andcommitted
xnconvert: init at 1.105.0
(cherry picked from commit ecc4bf8)
1 parent 68790e2 commit a6ee512

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
lib,
3+
fetchurl,
4+
appimageTools,
5+
makeDesktopItem,
6+
imagemagick,
7+
runCommand,
8+
}:
9+
10+
let
11+
icon =
12+
runCommand "xnconvert-icon.png"
13+
{
14+
nativeBuildInputs = [ imagemagick ];
15+
src = fetchurl {
16+
url = "https://www.xnview.com/img/app-xnconvert-512.webp";
17+
hash = "sha256-le+rvthQndY3KbkPYuMGZDDcvdpvH9CIS2REP1vmDXg=";
18+
};
19+
}
20+
''
21+
convert $src $out
22+
'';
23+
desktopItem = (
24+
makeDesktopItem {
25+
name = "xnconvert";
26+
desktopName = "XnConvert";
27+
exec = "xnconvert";
28+
icon = "xnconvert";
29+
comment = "A fast, powerful and free cross-platform batch image converter.";
30+
categories = [ "Graphics" ];
31+
}
32+
);
33+
version = "1.105.0";
34+
in
35+
appimageTools.wrapType2 {
36+
pname = "xnconvert";
37+
inherit version;
38+
39+
src = fetchurl {
40+
url = "https://download.xnview.com/old_versions/XnConvert/XnConvert-${version}.glibc2.17-x86_64.AppImage";
41+
hash = "sha256-eWQSUVxR3G3XbwBCht6LW3t3/N668jH4UqK5OnRY0ko=";
42+
};
43+
44+
extraPkgs = pkgs: [
45+
pkgs.qt5.qtbase
46+
];
47+
48+
extraInstallCommands = ''
49+
install -m 444 -D ${icon} $out/share/icons/hicolor/512x512/apps/xnconvert.png
50+
51+
mkdir -p $out/share/applications/
52+
cp ${desktopItem}/share/applications/*.desktop $out/share/applications/
53+
'';
54+
55+
meta = {
56+
homepage = "https://www.xnview.com/en/xnconvert";
57+
description = "Fast, powerful and free cross-platform batch image converter";
58+
longDescription = ''
59+
XnConvert is a fast, powerful and free cross-platform batch image converter.
60+
It allows to automate editing of your photo collections: you can rotate,
61+
convert and compress your images, photos and pictures easily, and apply over
62+
80 actions (like resize, crop, color adjustments, filter, ...).
63+
All common picture and graphics formats are supported (JPEG, TIFF, PNG, GIF,
64+
WebP, PSD, JPEG2000, JPEG-XL, OpenEXR, camera RAW, HEIC, PDF, DNG, CR2).
65+
You can save and re-use your presets for another batch image conversion.
66+
'';
67+
platforms = lib.platforms.linux;
68+
license = lib.licenses.unfree;
69+
mainProgram = "xnconvert";
70+
maintainers = with lib.maintainers; [ aldenparker ];
71+
};
72+
}

0 commit comments

Comments
 (0)