Commit f905e740 authored by jopejoe1's avatar jopejoe1
Browse files

python3Packages.ttfautohint-py: fix loading some modules

parent aedbfbb6
Loading
Loading
Loading
Loading
+13 −4
Original line number Diff line number Diff line
@@ -23,9 +23,14 @@ buildPythonPackage rec {
    hash = "sha256-NTog461RpyHKo/Qpicj3tflehaKj9LlZEN9qeCMM6JQ=";
  };

  postPatch = ''
  postPatch =
    ''
      substituteInPlace src/python/ttfautohint/__init__.py \
        --replace-fail 'find_library("ttfautohint")' '"${lib.getLib ttfautohint}/lib/libttfautohint${stdenv.hostPlatform.extensions.sharedLibrary}"'
    ''
    + lib.optionalString stdenv.hostPlatform.isLinux ''
      substituteInPlace src/python/ttfautohint/memory.py \
        --replace-fail 'find_library("c")' '"${lib.getLib stdenv.cc.libc}/lib/libc.so.6"'
    '';

  env.TTFAUTOHINTPY_BUNDLE_DLL = false;
@@ -36,6 +41,10 @@ buildPythonPackage rec {
    distutils
  ];

  dependencies = [
    setuptools # for pkg_resources
  ];

  buildInputs = [ ttfautohint ];

  nativeCheckInputs = [