diff options
author | Orivej Desh <orivej@gmx.fr> | 2017-09-12 00:29:00 +0000 |
---|---|---|
committer | Orivej Desh <orivej@gmx.fr> | 2017-09-12 00:52:57 +0000 |
commit | f0483d59f359029e8f26f8bc9d5f08100bc90acd (patch) | |
tree | 1521f026069ffd27ee5bfbbe0b097417935281e1 /pkgs/applications/editors/aseprite | |
parent | 05eb7ba6e4105d5efa0501b19b1e51ffb3c2f779 (diff) |
aseprite unfree: init at 1.2-beta12
Diffstat (limited to 'pkgs/applications/editors/aseprite')
-rw-r--r-- | pkgs/applications/editors/aseprite/default.nix | 57 |
1 files changed, 39 insertions, 18 deletions
diff --git a/pkgs/applications/editors/aseprite/default.nix b/pkgs/applications/editors/aseprite/default.nix index a04139d58591..420829199e14 100644 --- a/pkgs/applications/editors/aseprite/default.nix +++ b/pkgs/applications/editors/aseprite/default.nix @@ -1,18 +1,26 @@ -{ stdenv, fetchFromGitHub, cmake, pkgconfig +{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig , curl, freetype, giflib, libjpeg, libpng, libwebp, pixman, tinyxml, zlib , libX11, libXext, libXcursor, libXxf86vm +, unfree ? false +, cmark }: +# Unfree version is not redistributable: +# https://dev.aseprite.org/2016/09/01/new-source-code-license/ +# Consider supporting the developer: https://aseprite.org/#buy + stdenv.mkDerivation rec { name = "aseprite-${version}"; - version = "1.1.7"; + version = if unfree then "1.2-beta12" else "1.1.7"; src = fetchFromGitHub { owner = "aseprite"; repo = "aseprite"; rev = "v${version}"; fetchSubmodules = true; - sha256 = "0gd49lns2bpzbkwax5jf9x1xmg1j8ij997kcxr2596cwiswnw4di"; + sha256 = if unfree + then "1zgsr03d4vwdj2qyiwfwfqsbqngp85n13i3xwbkfkbja036c5yhc" + else "0gd49lns2bpzbkwax5jf9x1xmg1j8ij997kcxr2596cwiswnw4di"; }; nativeBuildInputs = [ cmake pkgconfig ]; @@ -20,29 +28,42 @@ stdenv.mkDerivation rec { buildInputs = [ curl freetype giflib libjpeg libpng libwebp pixman tinyxml zlib libX11 libXext libXcursor libXxf86vm + ] ++ lib.optionals unfree [ cmark ]; + + 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" + "-DWITH_DESKTOP_INTEGRATION=ON" + "-DWITH_WEBP_SUPPORT=ON" + ] ++ lib.optionals unfree [ + "-DUSE_SHARED_CMARK=ON" + # Aseprite needs internal freetype headers. + "-DUSE_SHARED_FREETYPE=OFF" + # Disable libarchive programs. + "-DENABLE_CAT=OFF" + "-DENABLE_CPIO=OFF" + "-DENABLE_TAR=OFF" ]; - 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 - -DWITH_DESKTOP_INTEGRATION=ON - -DWITH_WEBP_SUPPORT=ON + postInstall = lib.optionalString unfree '' + # Delete unneeded artifacts of bundled libraries. + rm -rf $out/include $out/lib ''; enableParallelBuilding = true; - meta = with stdenv.lib; { + meta = with lib; { homepage = https://www.aseprite.org/; description = "Animated sprite editor & pixel art tool"; - license = licenses.gpl2; + license = if unfree then licenses.unfree else licenses.gpl2; maintainers = with maintainers; [ orivej ]; platforms = platforms.linux; }; |