Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 1.1 kB view raw
1{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder 2, fonttools, lxml, fs 3, setuptools_scm 4, pytest, pytestcov, pytest_xdist, pytest-randomly 5}: 6 7buildPythonPackage rec { 8 pname = "psautohint"; 9 version = "2.1.0"; 10 11 disabled = pythonOlder "3.6"; 12 13 src = fetchFromGitHub { 14 owner = "adobe-type-tools"; 15 repo = pname; 16 sha256 = "1k1rx1adqxdxj5v3788lwnvygylp73sps1p0q44hws2vmsag2s8r"; 17 rev = "v${version}"; 18 fetchSubmodules = true; # data dir for tests 19 }; 20 21 postPatch = '' 22 echo '#define PSAUTOHINT_VERSION "${version}"' > libpsautohint/src/version.h 23 sed -i '/use_scm_version/,+3d' setup.py 24 sed -i '/setup(/a \ version="${version}",' setup.py 25 ''; 26 27 nativeBuildInputs = [ setuptools_scm ]; 28 29 propagatedBuildInputs = [ fonttools lxml fs ]; 30 31 checkInputs = [ pytest pytestcov pytest_xdist pytest-randomly ]; 32 checkPhase = "pytest tests"; 33 34 meta = with lib; { 35 description = "Script to normalize the XML and other data inside of a UFO"; 36 homepage = "https://github.com/adobe-type-tools/psautohint"; 37 license = licenses.bsd3; 38 maintainers = [ maintainers.sternenseemann ]; 39 }; 40}