Merge pull request #157350 from NixOS/gnome

GNOME: 41.2 → 41.3
This commit is contained in:
Jan Tojnar 2022-01-31 11:22:41 +01:00 committed by GitHub
commit 95ba61a82a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 506 additions and 100 deletions

View file

@ -53,6 +53,8 @@ in
"autoLogin"
"user"
])
(mkRemovedOptionModule [ "services" "xserver" "displayManager" "gdm" "nvidiaWayland" ] "We defer to GDM whether Wayland should be enabled.")
];
meta = {
@ -83,17 +85,6 @@ in
default = true;
description = ''
Allow GDM to run on Wayland instead of Xserver.
Note to enable Wayland with Nvidia the <option>nvidiaWayland</option>
must not be disabled.
'';
};
nvidiaWayland = mkOption {
type = types.bool;
default = true;
description = ''
Whether to allow wayland to be used with the proprietary
NVidia graphics driver.
'';
};
@ -230,19 +221,6 @@ in
services.dbus.packages = [ gdm ];
# We duplicate upstream's udev rules manually to make wayland with nvidia configurable
services.udev.extraRules = ''
# disable Wayland on Cirrus chipsets
ATTR{vendor}=="0x1013", ATTR{device}=="0x00b8", ATTR{subsystem_vendor}=="0x1af4", ATTR{subsystem_device}=="0x1100", RUN+="${gdm}/libexec/gdm-runtime-config set daemon WaylandEnable false"
# disable Wayland on Hi1710 chipsets
ATTR{vendor}=="0x19e5", ATTR{device}=="0x1711", RUN+="${gdm}/libexec/gdm-runtime-config set daemon WaylandEnable false"
${optionalString (!cfg.gdm.nvidiaWayland) ''
DRIVER=="nvidia", RUN+="${gdm}/libexec/gdm-runtime-config set daemon WaylandEnable false"
''}
# disable Wayland when modesetting is disabled
IMPORT{cmdline}="nomodeset", RUN+="${gdm}/libexec/gdm-runtime-config set daemon WaylandEnable false"
'';
systemd.user.services.dbus.wantedBy = [ "default.target" ];
programs.dconf.profiles.gdm =

View file

@ -7,11 +7,11 @@ let
inherit (python3Packages) python pygobject3;
in stdenv.mkDerivation rec {
pname = "gnumeric";
version = "1.12.50";
version = "1.12.51";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "dYgZuhvWmDgp+efG1xp/ogzXWjZSonHluwA9XYvMFLg=";
sha256 = "oA5sbk7N2tq9mwrhgBPXsFk3/cuPmq1ac7lZI8eusd0=";
};
configureFlags = [ "--disable-component" ];

View file

@ -1,15 +1,36 @@
{ lib, stdenv, fetchurl, meson, ninja, gettext, appstream-glib, gnome }:
{ stdenv
, lib
, fetchurl
, meson
, ninja
, python3
, gettext
, appstream-glib
, gnome
}:
stdenv.mkDerivation rec {
pname = "cantarell-fonts";
version = "0.301";
version = "0.303.1";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "3d35db0ac03f9e6b0d5a53577591b714238985f4cfc31a0aa17f26cd74675e83";
sha256 = "+UY6BlnGPlfjgf3XU88ZKSJTlcW0kTWYlCR2GDBTBBE=";
};
nativeBuildInputs = [ meson ninja gettext appstream-glib ];
nativeBuildInputs = [
meson
ninja
python3
python3.pkgs.psautohint
python3.pkgs.cffsubr
python3.pkgs.statmake
python3.pkgs.ufo2ft
python3.pkgs.setuptools
python3.pkgs.ufoLib2
gettext
appstream-glib
];
# ad-hoc fix for https://github.com/NixOS/nixpkgs/issues/50855
# until we fix gettext's envHook
@ -19,7 +40,7 @@ stdenv.mkDerivation rec {
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "1sczskw2kv3qy39i9mzw2lkl94a90bjgv5ln9acy5kh4gb2zmy7z";
outputHash = "XeqHVdTQ7PTzxkjwfzS/BTR7+k/M69sfUKdRXGOTmZE=";
passthru = {
updateScript = gnome.updateScript {

View file

@ -43,13 +43,13 @@ in
stdenv.mkDerivation rec {
pname = "gdm";
version = "41.0";
version = "41.3";
outputs = [ "out" "dev" ];
src = fetchurl {
url = "mirror://gnome/sources/gdm/${lib.versions.major version}/${pname}-${version}.tar.xz";
sha256 = "VzjEKTqfWoDUpungb00N8+nzE8p7Yb+02K+rqYPiANw=";
sha256 = "uwtlCnzqkPCaMyhPvQKXUxVAfvwY6BQAmFLRvK00N9Q=";
};
mesonFlags = [

View file

@ -26,13 +26,13 @@
stdenv.mkDerivation rec {
pname = "gnome-desktop";
version = "41.2";
version = "41.3";
outputs = [ "out" "dev" "devdoc" ];
src = fetchurl {
url = "mirror://gnome/sources/gnome-desktop/${lib.versions.major version}/${pname}-${version}.tar.xz";
sha256 = "sha256-NDKe79rK0jMqatuuU4yNpuUiNcd3WpCLfDIECgdT7Go=";
sha256 = "sha256-jNHKq5MRgowEUkaMalBnqbxEY4NbI6FL5E6P2bAwAcY=";
};
patches = [

View file

@ -11,13 +11,13 @@
stdenv.mkDerivation rec {
pname = "gnome-session-ctl";
version = "40.0";
version = "41.3";
src = fetchFromGitHub {
owner = "nix-community";
repo = pname;
rev = version;
hash = "sha256-gvBmLx8Qoj1vPsOwaZsd9+pTDvU5D7uUts7ZT1pXwNo=";
hash = "sha256-aC0tkTf2lgCRlcbFj1FEOVBm3YUuP+8Yz98W3ZjUydg=";
};
nativeBuildInputs = [

View file

@ -1,16 +1,42 @@
{ fetchurl, lib, stdenv, substituteAll, meson, ninja, pkg-config, gnome, glib, gtk3, gsettings-desktop-schemas
, gnome-desktop, dbus, json-glib, libICE, xmlto, docbook_xsl, docbook_xml_dtd_412, python3
, libxslt, gettext, makeWrapper, systemd, xorg, libepoxy, gnugrep, bash, gnome-session-ctl }:
{ fetchurl
, lib
, stdenv
, substituteAll
, meson
, ninja
, pkg-config
, gnome
, glib
, gtk3
, gsettings-desktop-schemas
, gnome-desktop
, dbus
, json-glib
, libICE
, xmlto
, docbook_xsl
, docbook_xml_dtd_412
, python3
, libxslt
, gettext
, makeWrapper
, systemd
, xorg
, libepoxy
, bash
, gnome-session-ctl
}:
stdenv.mkDerivation rec {
pname = "gnome-session";
version = "40.1.1";
# Also bump ./ctl.nix when bumping major version.
version = "41.3";
outputs = ["out" "sessions"];
outputs = [ "out" "sessions" ];
src = fetchurl {
url = "mirror://gnome/sources/gnome-session/${lib.versions.major version}/${pname}-${version}.tar.xz";
sha256 = "10nzyhmgkrzk6i70kj7690na0hmsv6qy5bmr10akxq9jxqlphy4w";
sha256 = "7koikFP1ImJAVIiWCTNbiFKHz2e73g3J/YgrAeybWzk=";
};
patches = [
@ -18,22 +44,41 @@ stdenv.mkDerivation rec {
src = ./fix-paths.patch;
gsettings = "${glib.bin}/bin/gsettings";
dbusLaunch = "${dbus.lib}/bin/dbus-launch";
grep = "${gnugrep}/bin/grep";
bash = "${bash}/bin/bash";
})
];
mesonFlags = [ "-Dsystemd=true" "-Dsystemd_session=default" ];
nativeBuildInputs = [
meson ninja pkg-config gettext makeWrapper
xmlto libxslt docbook_xsl docbook_xml_dtd_412 python3
meson
ninja
pkg-config
gettext
makeWrapper
xmlto
libxslt
docbook_xsl
docbook_xml_dtd_412
python3
dbus # for DTD
];
buildInputs = [
glib gtk3 libICE gnome-desktop json-glib xorg.xtrans gnome.adwaita-icon-theme
gnome.gnome-settings-daemon gsettings-desktop-schemas systemd libepoxy
glib
gtk3
libICE
gnome-desktop
json-glib
xorg.xtrans
gnome.adwaita-icon-theme
gnome.gnome-settings-daemon
gsettings-desktop-schemas
systemd
libepoxy
];
mesonFlags = [
"-Dsystemd=true"
"-Dsystemd_session=default"
];
postPatch = ''
@ -49,17 +94,6 @@ stdenv.mkDerivation rec {
{} +
'';
# `bin/gnome-session` will reset the environment when run in wayland, we
# therefor wrap `libexec/gnome-session-binary` instead which is the actual
# binary needing wrapping
preFixup = ''
wrapProgram "$out/libexec/gnome-session-binary" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--suffix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH" \
--suffix XDG_DATA_DIRS : "${gnome.gnome-shell}/share"\
--suffix XDG_CONFIG_DIRS : "${gnome.gnome-settings-daemon}/etc/xdg"
'';
# We move the GNOME sessions to another output since gnome-session is a dependency of
# GDM itself. If we do not hide them, it will show broken GNOME sessions when GDM is
# enabled without proper GNOME installation.
@ -72,12 +106,26 @@ stdenv.mkDerivation rec {
rm -rf $out/libexec/gnome-session-ctl
'';
# `bin/gnome-session` will reset the environment when run in wayland, we
# therefor wrap `libexec/gnome-session-binary` instead which is the actual
# binary needing wrapping
preFixup = ''
wrapProgram "$out/libexec/gnome-session-binary" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--suffix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH" \
--suffix XDG_DATA_DIRS : "${gnome.gnome-shell}/share"\
--suffix XDG_CONFIG_DIRS : "${gnome.gnome-settings-daemon}/etc/xdg"
'';
passthru = {
updateScript = gnome.updateScript {
packageName = "gnome-session";
attrPath = "gnome.gnome-session";
};
providedSessions = [ "gnome" "gnome-xorg" ];
providedSessions = [
"gnome"
"gnome-xorg"
];
};
meta = with lib; {

View file

@ -1,17 +1,10 @@
diff --git a/gnome-session/gnome-session.in b/gnome-session/gnome-session.in
index ddd1a591..46a3488b 100755
index b4b1f8fa..99d52cba 100755
--- a/gnome-session/gnome-session.in
+++ b/gnome-session/gnome-session.in
@@ -3,17 +3,19 @@
if [ "x$XDG_SESSION_TYPE" = "xwayland" ] &&
@@ -4,13 +4,15 @@ if [ "x$XDG_SESSION_TYPE" = "xwayland" ] &&
[ "x$XDG_SESSION_CLASS" != "xgreeter" ] &&
[ -n "$SHELL" ] &&
- grep -q "$SHELL" /etc/shells &&
- ! (echo "$SHELL" | grep -q "false") &&
- ! (echo "$SHELL" | grep -q "nologin"); then
+ @grep@ -q "$SHELL" /etc/shells &&
+ ! (echo "$SHELL" | @grep@ -q "false") &&
+ ! (echo "$SHELL" | @grep@ -q "nologin"); then
[ -n "$SHELL" ]; then
if [ "$1" != '-l' ]; then
- exec bash -c "exec -l '$SHELL' -c '$0 -l $*'"
+ # Make sure the shell actually sets up the environment.
@ -28,7 +21,7 @@ index ddd1a591..46a3488b 100755
REGION=${REGION%\'}
diff --git a/gnome-session/main.c b/gnome-session/main.c
index 84edfbe5..e5285489 100644
index a460a849..9d07898f 100644
--- a/gnome-session/main.c
+++ b/gnome-session/main.c
@@ -215,7 +215,7 @@ require_dbus_session (int argc,

View file

@ -66,13 +66,13 @@ let
in
stdenv.mkDerivation rec {
pname = "gnome-shell";
version = "41.2";
version = "41.3";
outputs = [ "out" "devdoc" ];
src = fetchurl {
url = "mirror://gnome/sources/gnome-shell/${lib.versions.major version}/${pname}-${version}.tar.xz";
sha256 = "OEZR6wUTk9ur4AbRrQV78p1c1z67h7x3n/Xhwx6AqCc=";
sha256 = "Hj36KgvklFQYK0rOd/EdENP1uYjvD8tzK3MTVzlJ3tE=";
};
patches = [

View file

@ -46,13 +46,13 @@
let self = stdenv.mkDerivation rec {
pname = "mutter";
version = "41.2";
version = "41.3";
outputs = [ "out" "dev" "man" ];
src = fetchurl {
url = "mirror://gnome/sources/mutter/${lib.versions.major version}/${pname}-${version}.tar.xz";
sha256 = "AN+oEvHEhtdKK3P0IEWuEYL5JGx3lNZ9dLXlQ+pwBhc=";
sha256 = "cZxdEGDrYFwbpkO0hvtXsaPHGX59+DvWwzZvxLaEd+U=";
};
patches = [

View file

@ -12,11 +12,11 @@
, bash
, gobject-introspection
, libsoup
, gtksourceview
, gtksourceview4
, gsettings-desktop-schemas
, adwaita-icon-theme
, gnome
, gtkspell3
, gspell
, shared-mime-info
, libgee
, libgit2-glib
@ -29,11 +29,11 @@
stdenv.mkDerivation rec {
pname = "gitg";
version = "3.32.1";
version = "41";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "0npg4kqpwl992fgjd2cn3fh84aiwpdp9kd8z7rw2xaj2iazsm914";
sha256 = "f7Ybn7EPuqVI0j1wZbq9cq1j5iHeVYQMBlzm45hsRik=";
};
nativeBuildInputs = [
@ -52,8 +52,8 @@ stdenv.mkDerivation rec {
glib
gsettings-desktop-schemas
gtk3
gtksourceview
gtkspell3
gtksourceview4
gspell
json-glib
libdazzle
libgee

View file

@ -1,7 +1,6 @@
{ stdenv
, lib
, fetchurl
, fetchpatch
, pkg-config
, meson
, ninja
@ -36,24 +35,15 @@
stdenv.mkDerivation rec {
pname = "folks";
version = "0.15.3";
version = "0.15.4";
outputs = [ "out" "dev" "devdoc" ];
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "Idc3+vCT9L4GVHPucMogiFuaLDaFlB26JMIjn9PFRKU=";
sha256 = "5xCZr8noj61OdXrhNLw/1j4SuQGtYrDtVTavt5Ekr18=";
};
patches = [
# Fix build with evolution-data-server ≥ 3.41
# https://gitlab.gnome.org/GNOME/folks/-/merge_requests/52
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/folks/-/commit/62d588b0c609de17df5b4d1ebfbc67c456267efc.patch";
sha256 = "TDL/5kvVwHnvDMuKDdPLQmpmE1FTZhY+7HG8NxKqt5w=";
})
];
nativeBuildInputs = [
gettext
gobject-introspection

View file

@ -127,7 +127,6 @@ stdenv.mkDerivation rec {
passthru = {
updateScript = gnome.updateScript {
packageName = pname;
versionPolicy = "none";
};
};

View file

@ -132,7 +132,6 @@ stdenv.mkDerivation rec {
passthru = {
updateScript = gnome.updateScript {
packageName = pname;
versionPolicy = "none";
};
};

View file

@ -1,4 +1,4 @@
{ lib, stdenv, buildPythonPackage, fetchPypi, pythonOlder
{ lib, stdenv, buildPythonPackage, fetchPypi, fetchpatch, pythonOlder
, fonttools, defcon, lxml, fs, unicodedata2, zopfli, brotlipy, fontpens
, brotli, fontmath, mutatormath, booleanoperations
, ufoprocessor, ufonormalizer, psautohint, tqdm
@ -37,8 +37,15 @@ buildPythonPackage rec {
patches = [
# Don't try to install cmake and ninja using pip
./no-pypi-build-tools.patch
# Use antlr4 runtime from nixpkgs and link it dynamically
./use-dynamic-system-antlr4-runtime.patch
# Fix compatibility with latest fonttools.
(fetchpatch {
url = "https://github.com/adobe-type-tools/afdko/commit/120752c50a562e4f6c12ff4be1e3bd96ed664e82.patch";
sha256 = "RDGIpNAuCmK+zqZOeOK7ddCjr9BuqPpcnbnxdtoE48M=";
})
];
# setup.py will always (re-)execute cmake in buildPhase

View file

@ -0,0 +1,32 @@
{ lib
, buildPythonPackage
, fetchPypi
, fonttools
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "cffsubr";
version = "0.2.9.post1";
format = "pyproject";
src = fetchPypi {
inherit pname version;
sha256 = "azFBLc9JyPqEZkvahn4u3cVbb+b6aW/yU8TxOp/y/Fw=";
};
propagatedBuildInputs = [
fonttools
];
checkInputs = [
pytestCheckHook
];
meta = with lib; {
description = "Standalone CFF subroutinizer based on AFDKO tx";
homepage = "https://github.com/adobe-type-tools/cffsubr";
license = licenses.asl20;
};
}

View file

@ -0,0 +1,44 @@
{ lib
, buildPythonPackage
, fetchPypi
, setuptools-scm
, fonttools
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "compreffor";
version = "0.5.1.post1";
format = "pyproject";
src = fetchPypi {
inherit pname version;
sha256 = "Zqia+yP4Dp5VNGeMwv+j04aNm9oVmZ2juehbfEzDfOQ=";
};
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
fonttools
];
checkInputs = [
pytestCheckHook
];
# Tests cannot seem to open the cpython module.
doCheck = false;
pythonImportsCheck = [
"compreffor"
];
meta = with lib; {
description = "CFF table subroutinizer for FontTools";
homepage = "https://github.com/googlefonts/compreffor";
license = licenses.asl20;
};
}

View file

@ -17,7 +17,7 @@
buildPythonPackage rec {
pname = "fonttools";
version = "4.26.2";
version = "4.29.0";
# Bump to 3.7 when https://github.com/fonttools/fonttools/pull/2417 is merged
disabled = pythonOlder "3.6";
@ -26,7 +26,7 @@ buildPythonPackage rec {
owner = pname;
repo = pname;
rev = version;
sha256 = "1zp9idjkn4bn1a4pn8x64vi8j1ijdsd4qvgf1f70dfwqvw6ak1i6";
sha256 = "LnkpTEpZbbRAyqGPJXdfpHjh4t7n6LkjZGLhirVNl7E=";
};
# all dependencies are optional, but

View file

@ -0,0 +1,57 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, attrs
, cattrs
, fonttools
, fs
, pytestCheckHook
, ufo2ft
, ufoLib2
}:
buildPythonPackage rec {
pname = "statmake";
version = "0.4.1";
format = "pyproject";
src = fetchFromGitHub {
owner = "daltonmaag";
repo = "statmake";
rev = "v${version}";
sha256 = "OXhoQAD4LEh80iRUZE2z8sCtWJDv/bSo0bwHbOOPVE0=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
attrs
cattrs
fonttools
# required by fonttools[ufo]
fs
];
checkInputs = [
pytestCheckHook
ufo2ft
ufoLib2
];
postPatch = ''
# https://github.com/daltonmaag/statmake/pull/41
substituteInPlace pyproject.toml \
--replace 'requires = ["poetry>=1.0.0"]' 'requires = ["poetry-core"]' \
--replace 'build-backend = "poetry.masonry.api"' 'build-backend = "poetry.core.masonry.api"'
'';
meta = with lib; {
description = "Applies STAT information from a Stylespace to a variable font";
homepage = "https://github.com/daltonmaag/statmake";
license = licenses.mit;
};
}

View file

@ -0,0 +1,65 @@
{ lib
, buildPythonPackage
, fetchPypi
, setuptools-scm
, fonttools
, defcon
, compreffor
, booleanoperations
, cffsubr
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "ufo2ft";
version = "2.25.2";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "ooWIHvyMtrht4WcGPiacY8dfjPSb5uitHnTRTKvf2AA=";
};
patches = [
# Use cu2qu from fonttools.
# https://github.com/googlefonts/ufo2ft/pull/461
./fonttools-cu2qu.patch
];
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
fonttools
defcon
compreffor
booleanoperations
cffsubr
];
checkInputs = [
pytestCheckHook
];
pytestFlagsArray = [
# Do not depend on skia.
"--deselect=tests/integration_test.py::IntegrationTest::test_removeOverlaps_CFF_pathops"
"--deselect=tests/integration_test.py::IntegrationTest::test_removeOverlaps_pathops"
"--deselect=tests/preProcessor_test.py::TTFPreProcessorTest::test_custom_filters_as_argument"
"--deselect=tests/preProcessor_test.py::TTFInterpolatablePreProcessorTest::test_custom_filters_as_argument"
];
postPatch = ''
# Does not seem to find 0.2.9.post1 for some reason.
substituteInPlace setup.py \
--replace '"cffsubr>=0.2.8"' '"cffsubr"'
'';
meta = with lib; {
description = "Bridge from UFOs to FontTools objects";
homepage = "https://github.com/googlefonts/ufo2ft";
license = licenses.mit;
};
}

View file

@ -0,0 +1,126 @@
From 0b3631e91c93d56460929f40850f7d8a39a71bde Mon Sep 17 00:00:00 2001
From: Simon Cozens <simon@simon-cozens.org>
Date: Thu, 11 Feb 2021 09:43:41 +0000
Subject: [PATCH 1/2] Rename cu2qu to fontTools.cu2qu
---
Lib/ufo2ft/filters/cubicToQuadratic.py | 4 ++--
Lib/ufo2ft/preProcessor.py | 4 ++--
requirements.txt | 1 -
setup.py | 1 -
tests/outlineCompiler_test.py | 2 +-
tests/preProcessor_test.py | 2 +-
6 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/Lib/ufo2ft/filters/cubicToQuadratic.py b/Lib/ufo2ft/filters/cubicToQuadratic.py
index 87d81b1f..4b77144f 100644
--- a/Lib/ufo2ft/filters/cubicToQuadratic.py
+++ b/Lib/ufo2ft/filters/cubicToQuadratic.py
@@ -1,7 +1,7 @@
import logging
-from cu2qu.pens import Cu2QuPointPen
-from cu2qu.ufo import CURVE_TYPE_LIB_KEY, DEFAULT_MAX_ERR
+from fontTools.pens.cu2quPen import Cu2QuPointPen
+from fontTools.cu2qu.ufo import CURVE_TYPE_LIB_KEY, DEFAULT_MAX_ERR
from ufo2ft.filters import BaseFilter
from ufo2ft.fontInfoData import getAttrWithFallback
diff --git a/Lib/ufo2ft/preProcessor.py b/Lib/ufo2ft/preProcessor.py
index 05ac47dc..c796df2e 100644
--- a/Lib/ufo2ft/preProcessor.py
+++ b/Lib/ufo2ft/preProcessor.py
@@ -217,7 +217,7 @@ def __init__(
layerNames=None,
skipExportGlyphs=None,
):
- from cu2qu.ufo import DEFAULT_MAX_ERR
+ from fontTools.cu2qu.ufo import DEFAULT_MAX_ERR
self.ufos = ufos
self.inplace = inplace
@@ -249,7 +249,7 @@ def __init__(
self.postFilters.append(post)
def process(self):
- from cu2qu.ufo import fonts_to_quadratic
+ from fontTools.cu2qu.ufo import fonts_to_quadratic
# first apply all custom pre-filters
for funcs, ufo, glyphSet in zip(self.preFilters, self.ufos, self.glyphSets):
diff --git a/setup.py b/setup.py
index 175429af..eef39ee1 100644
--- a/setup.py
+++ b/setup.py
@@ -30,7 +30,6 @@
tests_require=["pytest>=2.8"],
install_requires=[
"fonttools[ufo]>=4.28.5",
- "cu2qu>=1.6.7",
"cffsubr>=0.2.8",
"booleanOperations>=0.9.0",
],
diff --git a/tests/outlineCompiler_test.py b/tests/outlineCompiler_test.py
index 74319184..e7b15a23 100644
--- a/tests/outlineCompiler_test.py
+++ b/tests/outlineCompiler_test.py
@@ -2,7 +2,7 @@
import os
import pytest
-from cu2qu.ufo import font_to_quadratic
+from fontTools.cu2qu.ufo import font_to_quadratic
from fontTools.ttLib import TTFont
from fontTools.ttLib.tables._g_l_y_f import USE_MY_METRICS
diff --git a/tests/preProcessor_test.py b/tests/preProcessor_test.py
index 64196f92..87b23946 100644
--- a/tests/preProcessor_test.py
+++ b/tests/preProcessor_test.py
@@ -2,7 +2,7 @@
import os
import pytest
-from cu2qu.ufo import CURVE_TYPE_LIB_KEY
+from fontTools.cu2qu.ufo import CURVE_TYPE_LIB_KEY
from fontTools import designspaceLib
import ufo2ft
From 27c5af88ec2c3314618ecbf65104050a53508bb0 Mon Sep 17 00:00:00 2001
From: Simon Cozens <simon@simon-cozens.org>
Date: Thu, 11 Feb 2021 09:49:28 +0000
Subject: [PATCH 2/2] Sort the imports
---
Lib/ufo2ft/filters/cubicToQuadratic.py | 2 +-
tests/preProcessor_test.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/ufo2ft/filters/cubicToQuadratic.py b/Lib/ufo2ft/filters/cubicToQuadratic.py
index 4b77144f..5f28ea42 100644
--- a/Lib/ufo2ft/filters/cubicToQuadratic.py
+++ b/Lib/ufo2ft/filters/cubicToQuadratic.py
@@ -1,7 +1,7 @@
import logging
-from fontTools.pens.cu2quPen import Cu2QuPointPen
from fontTools.cu2qu.ufo import CURVE_TYPE_LIB_KEY, DEFAULT_MAX_ERR
+from fontTools.pens.cu2quPen import Cu2QuPointPen
from ufo2ft.filters import BaseFilter
from ufo2ft.fontInfoData import getAttrWithFallback
diff --git a/tests/preProcessor_test.py b/tests/preProcessor_test.py
index 87b23946..76ee495a 100644
--- a/tests/preProcessor_test.py
+++ b/tests/preProcessor_test.py
@@ -2,8 +2,8 @@
import os
import pytest
-from fontTools.cu2qu.ufo import CURVE_TYPE_LIB_KEY
from fontTools import designspaceLib
+from fontTools.cu2qu.ufo import CURVE_TYPE_LIB_KEY
import ufo2ft
from ufo2ft.constants import (

View file

@ -0,0 +1,37 @@
{ lib
, buildPythonPackage
, fetchPypi
, attrs
, fonttools
, pytestCheckHook
, fs
}:
buildPythonPackage rec {
pname = "ufoLib2";
version = "0.13.0";
format = "pyproject";
src = fetchPypi {
inherit pname version;
sha256 = "xJfvyNE+30BgNirX8u1xhKcD8pM3owRAVC4WX+qFqEM=";
};
propagatedBuildInputs = [
attrs
fonttools
# required by fonttools[ufo]
fs
];
checkInputs = [
pytestCheckHook
];
meta = with lib; {
description = "Library to deal with UFO font sources";
homepage = "https://github.com/fonttools/ufoLib2";
license = licenses.mit;
};
}

View file

@ -1517,6 +1517,8 @@ in {
cffi = callPackage ../development/python-modules/cffi { };
cffsubr = callPackage ../development/python-modules/cffsubr { };
cfgv = callPackage ../development/python-modules/cfgv { };
cfn-flip = callPackage ../development/python-modules/cfn-flip { };
@ -1771,6 +1773,8 @@ in {
compiledb = callPackage ../development/python-modules/compiledb { };
compreffor = callPackage ../development/python-modules/compreffor { };
concurrent-log-handler = callPackage ../development/python-modules/concurrent-log-handler { };
conda = callPackage ../development/python-modules/conda { };
@ -9408,6 +9412,8 @@ in {
statistics = callPackage ../development/python-modules/statistics { };
statmake = callPackage ../development/python-modules/statmake { };
statsd = callPackage ../development/python-modules/statsd { };
statsmodels = callPackage ../development/python-modules/statsmodels { };
@ -10059,6 +10065,10 @@ in {
inherit (pkgs.xorg) libX11 libXext;
};
ufo2ft = callPackage ../development/python-modules/ufo2ft { };
ufoLib2 = callPackage ../development/python-modules/ufoLib2 { };
ufonormalizer = callPackage ../development/python-modules/ufonormalizer { };
ufoprocessor = callPackage ../development/python-modules/ufoprocessor { };