Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

aseprite-unfree: 1.2.9 -> 1.2.11

+169 -14
+41 -14
pkgs/applications/editors/aseprite/default.nix
··· 1 - { stdenv, lib, fetchFromGitHub, fetchpatch, cmake, pkgconfig 2 - , curl, freetype, giflib, harfbuzz, libjpeg, libpng, libwebp, pixman, tinyxml, zlib 3 - , libX11, libXext, libXcursor, libXxf86vm 1 + { stdenv, lib, callPackage, fetchFromGitHub, fetchpatch, cmake, ninja, pkgconfig 2 + , curl, freetype, giflib, libjpeg, libpng, libwebp, pixman, tinyxml, zlib 3 + , harfbuzzFull, glib, fontconfig, pcre 4 + , libX11, libXext, libXcursor, libXxf86vm, libGL 4 5 , unfree ? false 5 6 , cmark 6 7 }: 7 8 8 - # Unfree version is not redistributable: 9 - # https://dev.aseprite.org/2016/09/01/new-source-code-license/ 10 - # Consider supporting the developer: https://aseprite.org/#buy 11 - 9 + let 10 + skia = callPackage ./skia.nix {}; 11 + in 12 12 stdenv.mkDerivation rec { 13 13 name = "aseprite-${version}"; 14 - version = if unfree then "1.2.9" else "1.1.7"; 14 + version = if unfree then "1.2.11" else "1.1.7"; 15 15 16 16 src = fetchFromGitHub { 17 17 owner = "aseprite"; ··· 19 19 rev = "v${version}"; 20 20 fetchSubmodules = true; 21 21 sha256 = if unfree 22 - then "0a9xk163j0984n8nn6pqf27n83gr6w7g25wkiv591zx88pa6cpbd" 22 + then "1illr51jpg5g6nx29rav9dllyy5lzyyn7lj2fhrnpz1ysqgaq5p8" 23 23 else "0gd49lns2bpzbkwax5jf9x1xmg1j8ij997kcxr2596cwiswnw4di"; 24 24 }; 25 25 26 - nativeBuildInputs = [ cmake pkgconfig ]; 26 + nativeBuildInputs = [ 27 + cmake pkgconfig 28 + ] ++ lib.optionals unfree [ ninja ]; 27 29 28 30 buildInputs = [ 29 - curl freetype giflib harfbuzz libjpeg libpng libwebp pixman tinyxml zlib 31 + curl freetype giflib libjpeg libpng libwebp pixman tinyxml zlib 30 32 libX11 libXext libXcursor libXxf86vm 31 - ] ++ lib.optionals unfree [ cmark harfbuzz ]; 33 + ] ++ lib.optionals unfree [ 34 + cmark 35 + harfbuzzFull glib fontconfig pcre 36 + skia libGL 37 + ]; 32 38 33 39 patches = lib.optionals unfree [ 34 40 (fetchpatch { 35 - url = "https://github.com/aseprite/aseprite/commit/cfb4dac6feef1f39e161c23c886055a8f9acfd0d.patch"; 36 - sha256 = "1qhjfpngg8b1vvb9w26lhjjfamfx57ih0p31km3r5l96nm85l7f9"; 41 + url = "https://github.com/lfont/aseprite/commit/f1ebc47012d3fed52306ed5922787b4b98cc0a7b.patch"; 42 + sha256 = "03xg7x6b9iv7z18vzlqxhcfphmx4v3qhs9f5rgf38ppyklca5jyw"; 37 43 }) 38 44 (fetchpatch { 39 45 url = "https://github.com/orivej/aseprite/commit/ea87e65b357ad0bd65467af5529183b5a48a8c17.patch"; ··· 67 73 "-DENABLE_CAT=OFF" 68 74 "-DENABLE_CPIO=OFF" 69 75 "-DENABLE_TAR=OFF" 76 + # UI backend. 77 + "-DLAF_OS_BACKEND=skia" 78 + "-DSKIA_DIR=${skia}" 70 79 ]; 71 80 72 81 postInstall = '' ··· 87 96 homepage = https://www.aseprite.org/; 88 97 description = "Animated sprite editor & pixel art tool"; 89 98 license = if unfree then licenses.unfree else licenses.gpl2; 99 + longDescription = 100 + ''Aseprite is a program to create animated sprites. Its main features are: 101 + 102 + - Sprites are composed by layers & frames (as separated concepts). 103 + - Supported color modes: RGBA, Indexed (palettes up to 256 colors), and Grayscale. 104 + - Load/save sequence of PNG files and GIF animations (and FLC, FLI, JPG, BMP, PCX, TGA). 105 + - Export/import animations to/from Sprite Sheets. 106 + - Tiled drawing mode, useful to draw patterns and textures. 107 + - Undo/Redo for every operation. 108 + - Real-time animation preview. 109 + - Multiple editors support. 110 + - Pixel-art specific tools like filled Contour, Polygon, Shading mode, etc. 111 + - Onion skinning. 112 + '' + lib.optionalString unfree 113 + '' 114 + This version is not redistributable: https://dev.aseprite.org/2016/09/01/new-source-code-license/ 115 + Consider supporting the developer: https://aseprite.org/#buy 116 + ''; 90 117 maintainers = with maintainers; [ orivej ]; 91 118 platforms = platforms.linux; 92 119 };
+23
pkgs/applications/editors/aseprite/skia-deps.nix
··· 1 + { fetchgit }: 2 + { 3 + angle2 = fetchgit { 4 + url = "https://chromium.googlesource.com/angle/angle.git"; 5 + rev = "956ab4d9fab36be9929e63829475d4d69b2c681c"; 6 + sha256 = "0fcw04wwkn3ixr9l9k0d32n78r9g72p31ii9i5spsq2d0wlylr38"; 7 + }; 8 + dng_sdk = fetchgit { 9 + url = "https://android.googlesource.com/platform/external/dng_sdk.git"; 10 + rev = "96443b262250c390b0caefbf3eed8463ba35ecae"; 11 + sha256 = "1rsr7njhj7c5p87hfznj069fdc3qqhvvnq9sa2rb8c4q849rlzx6"; 12 + }; 13 + piex = fetchgit { 14 + url = "https://android.googlesource.com/platform/external/piex.git"; 15 + rev = "bb217acdca1cc0c16b704669dd6f91a1b509c406"; 16 + sha256 = "05ipmag6k55jmidbyvg5mkqm69zfw03gfkqhi9jnjlmlbg31y412"; 17 + }; 18 + sfntly = fetchgit { 19 + url = "https://chromium.googlesource.com/external/github.com/googlei18n/sfntly.git"; 20 + rev = "b18b09b6114b9b7fe6fc2f96d8b15e8a72f66916"; 21 + sha256 = "0zf1h0dibmm38ldypccg4faacvskmd42vsk6zbxlfcfwjlqm6pp4"; 22 + }; 23 + }
+37
pkgs/applications/editors/aseprite/skia-make-deps.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + FILTER=$1 4 + OUT=skia-deps.nix 5 + REVISION=89e4ca4352d05adc892f5983b108433f29b2c0c2 6 + DEPS=$(curl -s https://raw.githubusercontent.com/aseprite/skia/$REVISION/DEPS) 7 + THIRD_PARTY_DEPS=$(echo "$DEPS" | grep third_party | grep "#" -v | sed 's/"//g') 8 + 9 + function write_fetch_defs () 10 + { 11 + while read -r DEP; do 12 + NAME=$(echo "$DEP" | cut -d: -f1 | cut -d/ -f3 | sed 's/ //g') 13 + URL=$(echo "$DEP" | cut -d: -f2- | cut -d@ -f1 | sed 's/ //g') 14 + REV=$(echo "$DEP" | cut -d: -f2- | cut -d@ -f2 | sed 's/[ ,]//g') 15 + 16 + echo "Fetching $NAME@$REV" 17 + PREFETCH=$(nix-prefetch-git --rev "$REV" "$URL") 18 + 19 + ( 20 + cat <<EOF 21 + $NAME = fetchgit { 22 + url = "$URL"; 23 + rev = "$REV"; 24 + sha256 = $(echo $PREFETCH | jq '.sha256'); 25 + }; 26 + EOF 27 + ) >> "$OUT" 28 + 29 + echo "----------" 30 + echo 31 + done <<< "$1" 32 + } 33 + 34 + echo "{ fetchgit }:" > "$OUT" 35 + echo "{" >> "$OUT" 36 + write_fetch_defs "$(echo "$THIRD_PARTY_DEPS" | grep -E "$FILTER")" 37 + echo "}" >> "$OUT"
+68
pkgs/applications/editors/aseprite/skia.nix
··· 1 + { stdenv, lib, fetchFromGitHub, fetchgit, python2, gn, ninja 2 + , fontconfig, expat, icu58, libjpeg, libpng, libwebp, zlib 3 + , mesa, libX11 4 + }: 5 + 6 + let 7 + # skia-deps.nix is generated by: ./skia-make-deps.sh 'angle2|dng_sdk|piex|sfntly' 8 + depSrcs = import ./skia-deps.nix { inherit fetchgit; }; 9 + in 10 + stdenv.mkDerivation rec { 11 + name = "skia-aseprite-m71"; 12 + 13 + src = fetchFromGitHub { 14 + owner = "aseprite"; 15 + repo = "skia"; 16 + # latest commit from aseprite-m71 branch 17 + rev = "89e4ca4352d05adc892f5983b108433f29b2c0c2"; 18 + sha256 = "0n3vrkswvi6rib9zv2pzi18h3j5wm7flmgkgaikcm6q7iw4l2c7x"; 19 + }; 20 + 21 + nativeBuildInputs = [ python2 gn ninja ]; 22 + 23 + buildInputs = [ 24 + fontconfig expat icu58 libjpeg libpng libwebp zlib 25 + mesa libX11 26 + ]; 27 + 28 + preConfigure = with depSrcs; '' 29 + mkdir -p third_party/externals 30 + ln -s ${angle2} third_party/externals/angle2 31 + ln -s ${dng_sdk} third_party/externals/dng_sdk 32 + ln -s ${piex} third_party/externals/piex 33 + ln -s ${sfntly} third_party/externals/sfntly 34 + ''; 35 + 36 + configurePhase = '' 37 + runHook preConfigure 38 + gn gen out/Release --args="is_debug=false is_official_build=true" 39 + runHook postConfigure 40 + ''; 41 + 42 + buildPhase = '' 43 + runHook preBuild 44 + ninja -C out/Release skia 45 + runHook postBuild 46 + ''; 47 + 48 + installPhase = '' 49 + mkdir -p $out 50 + 51 + # Glob will match all subdirs. 52 + shopt -s globstar 53 + 54 + # All these paths are used in some way when building aseprite. 55 + cp -r --parents -t $out/ \ 56 + include/codec \ 57 + include/config \ 58 + include/core \ 59 + include/effects \ 60 + include/gpu \ 61 + include/private \ 62 + include/utils \ 63 + out/Release/*.a \ 64 + src/gpu/**/*.h \ 65 + third_party/externals/angle2/include \ 66 + third_party/skcms/**/*.h 67 + ''; 68 + }