mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 21:33:03 +03:00
pythonPackages.nototools: make python 3 compatible and use that one
This commit is contained in:
parent
702c745241
commit
accec23188
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchzip, fetchFromGitHub, optipng, cairo, pythonPackages, pkgconfig, pngquant, which, imagemagick }:
|
||||
{ stdenv, fetchzip, fetchFromGitHub, optipng, cairo, python3Packages, pkgconfig, pngquant, which, imagemagick }:
|
||||
|
||||
let
|
||||
mkNoto = { name, weights, sha256, }:
|
||||
@ -102,7 +102,7 @@ in
|
||||
|
||||
buildInputs = [ cairo ];
|
||||
nativeBuildInputs = [ pngquant optipng which cairo pkgconfig imagemagick ]
|
||||
++ (with pythonPackages; [ python fonttools nototools ]);
|
||||
++ (with python3Packages; [ python fonttools nototools ]);
|
||||
|
||||
postPatch = ''
|
||||
sed -i 's,^PNGQUANT :=.*,PNGQUANT := ${pngquant}/bin/pngquant,' Makefile
|
||||
|
@ -1,28 +1,45 @@
|
||||
{ fetchFromGitHub, pythonPackages, lib }:
|
||||
{ fetchFromGitHub, lib, fetchpatch, buildPythonPackage, isPy3k, fonttools, numpy, pillow, six, bash }:
|
||||
|
||||
pythonPackages.buildPythonPackage rec {
|
||||
buildPythonPackage rec {
|
||||
pname = "nototools";
|
||||
version = "unstable-2019-03-20";
|
||||
version = "unstable-2019-10-21";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "googlefonts";
|
||||
repo = "nototools";
|
||||
rev = "9c4375f07c9adc00c700c5d252df6a25d7425870";
|
||||
sha256 = "0z9i23vl6xar4kvbqbc8nznq3s690mqc5zfv280l1c02l5n41smc";
|
||||
rev = "cae92ce958bee37748bf0602f5d7d97bb6db98ca";
|
||||
sha256 = "1jqr0dz23rjqiyxw1w69l6ry16dwdcf3c6cysiy793g2v7pir2yi";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with pythonPackages; [ fonttools numpy ];
|
||||
propagatedBuildInputs = [ fonttools numpy ];
|
||||
|
||||
patches = lib.optionals isPy3k [
|
||||
# Additional Python 3 compat https://github.com/googlefonts/nototools/pull/497
|
||||
(fetchpatch {
|
||||
url = https://github.com/googlefonts/nototools/commit/ded1f311b3260f015b5c5b80f05f7185392c4eff.patch;
|
||||
sha256 = "0bn0rlbddxicw0h1dnl0cibgj6xjalja2qcm563y7kk3z5cdwhgq";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
sed -ie "s^join(_DATA_DIR_PATH,^join(\"$out/third_party/ucd\",^" nototools/unicode_data.py
|
||||
'';
|
||||
|
||||
checkInputs = [
|
||||
pillow six bash
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
patchShebangs tests/
|
||||
cd tests
|
||||
rm gpos_diff_test.py # needs ttxn?
|
||||
./run_tests
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
cp -r third_party $out
|
||||
'';
|
||||
|
||||
disabled = pythonPackages.isPy3k;
|
||||
|
||||
meta = {
|
||||
description = "Noto fonts support tools and scripts plus web site generation";
|
||||
license = lib.licenses.asl20;
|
||||
|
@ -7,7 +7,7 @@
|
||||
, imagemagick
|
||||
, pkg-config
|
||||
, pngquant
|
||||
, python2
|
||||
, python3
|
||||
, which
|
||||
, zopfli
|
||||
}:
|
||||
@ -33,7 +33,7 @@ let
|
||||
sha256 = "0vzmlp83vnk4njcfkn03jcc1vkg2rf12zf5kj3p3a373xr4ds1zn";
|
||||
};
|
||||
|
||||
python = python2.withPackages (pp: with pp; [
|
||||
python = python3.withPackages (pp: with pp; [
|
||||
nototools
|
||||
]);
|
||||
in
|
||||
|
Loading…
Reference in New Issue
Block a user