nixpkgs/pkgs/development/python-modules/afdko/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

75 lines
2 KiB
Nix

{ lib, stdenv, buildPythonPackage, fetchPypi, fetchpatch, pythonOlder, python
, fonttools, defcon, lxml, fs, unicodedata2, zopfli, brotlipy, fontpens
, brotli, fontmath, mutatormath, booleanoperations
, ufoprocessor, ufonormalizer, psautohint, tqdm
, setuptools_scm
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "afdko";
version = "3.5.1";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "1qg7dgl81yq0sp50pkhgvmf8az1svx20zmpkfa68ka9d0ssh1wjw";
};
# Skip date-dependent test. See
# https://github.com/adobe-type-tools/afdko/pull/1232
# https://github.com/NixOS/nixpkgs/pull/98158#issuecomment-704321117
patches = [
(fetchpatch {
url = "https://github.com/adobe-type-tools/afdko/commit/2c36ad10f9d964759f643e8ed7b0972a27aa26bd.patch";
sha256 = "0p6a485mmzrbfldfbhgfghsypfiad3cabcw7qlw2rh993ivpnibf";
})
];
nativeBuildInputs = [ setuptools_scm ];
propagatedBuildInputs = [
booleanoperations
fonttools
lxml # fonttools[lxml], defcon[lxml] extra
fs # fonttools[ufo] extra
unicodedata2 # fonttools[unicode] extra
brotlipy # fonttools[woff] extra
zopfli # fonttools[woff] extra
fontpens
brotli
defcon
fontmath
mutatormath
ufoprocessor
ufonormalizer
psautohint
tqdm
];
# tests are broken on non x86_64
# https://github.com/adobe-type-tools/afdko/issues/1163
# https://github.com/adobe-type-tools/afdko/issues/1216
doCheck = stdenv.isx86_64;
checkInputs = [ pytestCheckHook ];
preCheck = "export PATH=$PATH:$out/bin";
disabledTests = [
# Disable slow tests, reduces test time ~25 %
"test_report"
"test_post_overflow"
"test_cjk"
"test_extrapolate"
"test_filename_without_dir"
"test_overwrite"
"test_options"
];
meta = with lib; {
description = "Adobe Font Development Kit for OpenType";
homepage = "https://adobe-type-tools.github.io/afdko/";
license = licenses.asl20;
maintainers = [ maintainers.sternenseemann ];
};
}