nixpkgs/pkgs/applications/editors/aseprite/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

113 lines
3.4 KiB
Nix
Raw Normal View History

{ stdenv, lib, callPackage, fetchFromGitHub, cmake, ninja, pkg-config
2019-06-04 12:16:34 +00:00
, curl, freetype, giflib, libjpeg, libpng, libwebp, pixman, tinyxml, zlib
, harfbuzzFull, glib, fontconfig, pcre
, libX11, libXext, libXcursor, libXxf86vm, libGL, libXi
2017-09-12 00:29:00 +00:00
, cmark
2013-09-28 14:57:14 +00:00
}:
# Unfree version is not redistributable:
# https://dev.aseprite.org/2016/09/01/new-source-code-license/
# Consider supporting the developer: https://aseprite.org/#buy
2019-06-04 12:16:34 +00:00
let
skia = callPackage ./skia.nix {};
in
2013-09-28 14:57:14 +00:00
stdenv.mkDerivation rec {
pname = "aseprite";
2023-12-13 05:04:20 +00:00
version = "1.3.2";
2013-09-28 14:57:14 +00:00
2017-09-11 23:44:33 +00:00
src = fetchFromGitHub {
owner = "aseprite";
repo = "aseprite";
rev = "v${version}";
fetchSubmodules = true;
2023-12-13 05:04:20 +00:00
hash = "sha256-8PXqMDf2ATxmtFqyZlGip+DhGrdK8M6Ztte7fGH6Fmo=";
2013-09-28 14:57:14 +00:00
};
2019-06-04 12:16:34 +00:00
nativeBuildInputs = [
cmake pkg-config ninja
];
2017-09-11 23:44:33 +00:00
2013-09-28 14:57:14 +00:00
buildInputs = [
2019-06-04 12:16:34 +00:00
curl freetype giflib libjpeg libpng libwebp pixman tinyxml zlib
2017-09-11 23:44:33 +00:00
libX11 libXext libXcursor libXxf86vm
2019-06-04 12:16:34 +00:00
cmark
harfbuzzFull glib fontconfig pcre
skia libGL libXi
2019-06-04 12:16:34 +00:00
];
2018-09-10 02:39:28 +00:00
patches = [
./shared-libwebp.patch
./shared-skia-deps.patch
2018-09-10 02:39:28 +00:00
];
2017-09-12 00:29:00 +00:00
postPatch = ''
sed -i src/ver/CMakeLists.txt -e "s-set(VERSION \".*\")-set(VERSION \"$version\")-"
2017-09-30 11:15:53 +00:00
'';
2017-09-12 00:29:00 +00:00
cmakeFlags = [
"-DENABLE_UPDATER=OFF"
"-DUSE_SHARED_CURL=ON"
"-DUSE_SHARED_FREETYPE=ON"
"-DUSE_SHARED_GIFLIB=ON"
"-DUSE_SHARED_JPEGLIB=ON"
"-DUSE_SHARED_LIBPNG=ON"
"-DUSE_SHARED_LIBWEBP=ON"
"-DUSE_SHARED_PIXMAN=ON"
"-DUSE_SHARED_TINYXML=ON"
"-DUSE_SHARED_ZLIB=ON"
"-DUSE_SHARED_CMARK=ON"
2018-09-10 02:39:28 +00:00
"-DUSE_SHARED_HARFBUZZ=ON"
"-DUSE_SHARED_WEBP=ON"
2017-09-12 00:29:00 +00:00
# Disable libarchive programs.
"-DENABLE_CAT=OFF"
"-DENABLE_CPIO=OFF"
"-DENABLE_TAR=OFF"
2019-06-04 12:16:34 +00:00
# UI backend.
"-DLAF_WITH_EXAMPLES=OFF"
2019-06-04 12:16:34 +00:00
"-DLAF_OS_BACKEND=skia"
"-DENABLE_DESKTOP_INTEGRATION=ON"
2019-06-04 12:16:34 +00:00
"-DSKIA_DIR=${skia}"
"-DSKIA_LIBRARY_DIR=${skia}/out/Release"
2013-09-28 14:57:14 +00:00
];
2017-09-12 04:50:16 +00:00
postInstall = ''
# Install desktop icons.
src="$out/share/aseprite/data/icons"
for size in 16 32 48 64; do
dst="$out"/share/icons/hicolor/"$size"x"$size"
install -Dm644 "$src"/ase"$size".png "$dst"/apps/aseprite.png
install -Dm644 "$src"/doc"$size".png "$dst"/mimetypes/aseprite.png
done
2017-09-12 00:29:00 +00:00
# Delete unneeded artifacts of bundled libraries.
2017-09-12 04:50:16 +00:00
rm -rf "$out"/include "$out"/lib
2013-09-28 14:57:14 +00:00
'';
passthru = { inherit skia; };
2017-09-12 00:29:00 +00:00
meta = with lib; {
homepage = "https://www.aseprite.org/";
2017-09-11 23:44:33 +00:00
description = "Animated sprite editor & pixel art tool";
license = licenses.unfree;
2019-06-04 12:16:34 +00:00
longDescription =
''Aseprite is a program to create animated sprites. Its main features are:
- Sprites are composed by layers & frames (as separated concepts).
- Supported color modes: RGBA, Indexed (palettes up to 256 colors), and Grayscale.
- Load/save sequence of PNG files and GIF animations (and FLC, FLI, JPG, BMP, PCX, TGA).
- Export/import animations to/from Sprite Sheets.
- Tiled drawing mode, useful to draw patterns and textures.
- Undo/Redo for every operation.
- Real-time animation preview.
- Multiple editors support.
- Pixel-art specific tools like filled Contour, Polygon, Shading mode, etc.
- Onion skinning.
2019-06-04 12:16:34 +00:00
This version is not redistributable: https://dev.aseprite.org/2016/09/01/new-source-code-license/
Consider supporting the developer: https://aseprite.org/#buy
'';
2017-09-11 23:44:33 +00:00
maintainers = with maintainers; [ orivej ];
platforms = platforms.linux;
2013-09-28 14:57:14 +00:00
};
}