tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
scfbuild: 1.0.3 -> 2.0.0
Francesco Gazzetta
4 years ago
14a1a01c
33f73db2
+3
-55
2 changed files
expand all
collapse all
unified
split
pkgs
tools
misc
scfbuild
default.nix
python-3.patch
+3
-9
pkgs/tools/misc/scfbuild/default.nix
reviewed
···
2
2
3
3
buildPythonApplication {
4
4
pname = "scfbuild";
5
5
-
version = "1.0.3";
5
5
+
version = "2.0.0";
6
6
7
7
format = "other";
8
8
9
9
src = fetchFromGitHub {
10
10
owner = "13rac1";
11
11
repo = "scfbuild";
12
12
-
rev = "9acc7fc5fedbf48683d8932dd5bd7583bf922bae";
13
13
-
sha256 = "1zlqsxkpg7zvmhdjgbqwwc9qgac2b8amzq8c5kwyh5cv95zcp6qn";
12
12
+
rev = "6d84339512a892972185d894704efa67dd82e87a";
13
13
+
sha256 = "0wkyzkhshlax9rvdmn441gv87n9abfr0qqmgs8bkg9kbcjb4bhad";
14
14
};
15
15
-
16
16
-
patches = [
17
17
-
# Convert to Python 3
18
18
-
# https://github.com/13rac1/scfbuild/pull/19
19
19
-
./python-3.patch
20
20
-
];
21
15
22
16
propagatedBuildInputs = [ pyyaml fonttools fontforge ];
23
17
-46
pkgs/tools/misc/scfbuild/python-3.patch
reviewed
···
1
1
-
--- a/bin/scfbuild
2
2
-
+++ b/bin/scfbuild
3
3
-
@@ -1,4 +1,4 @@
4
4
-
-#!/usr/bin/env python2
5
5
-
+#!/usr/bin/env python3
6
6
-
# -*- coding: utf-8 -*-
7
7
-
8
8
-
from __future__ import (absolute_import, division, print_function,
9
9
-
--- a/scfbuild/builder.py
10
10
-
+++ b/scfbuild/builder.py
11
11
-
@@ -287,8 +287,8 @@ def _add_name_record(self, text, name_id, platform_id, plat_enc_id, lang_id):
12
12
-
# TODO: The installed version of fontTools doesn't have
13
13
-
# table__n_a_m_e.setName().
14
14
-
record = NameRecord()
15
15
-
- # PyYAML creates strings, force to Unicode
16
16
-
- record.string = unicode(text)
17
17
-
+ # PyYAML creates strings, which are unicode as of Python3
18
18
-
+ record.string = text
19
19
-
record.nameID = name_id
20
20
-
record.platformID = platform_id
21
21
-
record.platEncID = plat_enc_id
22
22
-
--- a/scfbuild/fforge.py
23
23
-
+++ b/scfbuild/fforge.py
24
24
-
@@ -84,7 +84,7 @@ def add_glyphs(font, svg_filepaths, conf):
25
25
-
u_ids = [int(u_id, 16) for u_id in filename.split("-")]
26
26
-
# Example: (0x1f441, 0x1f5e8)
27
27
-
28
28
-
- u_str = ''.join(map(unichr, u_ids))
29
29
-
+ u_str = ''.join(map(chr, u_ids))
30
30
-
# Example: "U\0001f441U\0001f5e8"
31
31
-
32
32
-
# Replace sequences with correct ZWJ/VS16 versions as needed
33
33
-
--- a/scfbuild/main.py
34
34
-
+++ b/scfbuild/main.py
35
35
-
@@ -1,4 +1,4 @@
36
36
-
-#!/usr/bin/env python2
37
37
-
+#!/usr/bin/env python3
38
38
-
# -*- coding: utf-8 -*-
39
39
-
40
40
-
# SCFBuild is released under the GNU General Public License v3.
41
41
-
index 0000000..99418b5
42
42
-
--- /dev/null
43
43
-
+++ b/scfbuild/requirements.txt
44
44
-
@@ -0,0 +1,2 @@
45
45
-
+fonttools>=3.41.2
46
46
-
+PyYAML>=5.1