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