liberation_ttf: Fix cross-compiling

liberation_ttf runs python3 during build,
hence it needs to be in nativeBuildInputs
when cross-building.
This commit is contained in:
Christian Kampka 2020-09-02 19:02:46 +02:00
parent 6fc3562432
commit d4c42bfaf5
No known key found for this signature in database
GPG Key ID: B88E140DB4FE1AA5

View File

@ -2,6 +2,7 @@
let let
inherit (python3.pkgs) fonttools; inherit (python3.pkgs) fonttools;
commonNativeBuildInputs = [ fontforge python3 ];
common = common =
{ version, repo, sha256, nativeBuildInputs, postPatch ? null }: { version, repo, sha256, nativeBuildInputs, postPatch ? null }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -50,13 +51,13 @@ in
liberation_ttf_v1 = common { liberation_ttf_v1 = common {
repo = "liberation-1.7-fonts"; repo = "liberation-1.7-fonts";
version = "1.07.5"; version = "1.07.5";
nativeBuildInputs = [ fontforge ]; nativeBuildInputs = commonNativeBuildInputs ;
sha256 = "1ffl10mf78hx598sy9qr5m6q2b8n3mpnsj73bwixnd4985gsz56v"; sha256 = "1ffl10mf78hx598sy9qr5m6q2b8n3mpnsj73bwixnd4985gsz56v";
}; };
liberation_ttf_v2 = common { liberation_ttf_v2 = common {
repo = "liberation-fonts"; repo = "liberation-fonts";
version = "2.1.0"; version = "2.1.0";
nativeBuildInputs = [ fontforge fonttools ]; nativeBuildInputs = commonNativeBuildInputs ++ [ fonttools ];
postPatch = '' postPatch = ''
substituteInPlace scripts/setisFixedPitch-fonttools.py --replace \ substituteInPlace scripts/setisFixedPitch-fonttools.py --replace \
'font = ttLib.TTFont(fontfile)' \ 'font = ttLib.TTFont(fontfile)' \