From 2d5301979dc8b0f797c47f515ec2fe03e1d220e5 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 7 Mar 2023 21:14:58 +0000 Subject: [PATCH] python310Packages.faust-cchardet: Fake cchardet dist-info To allow using faust-cchardet as a drop-in replacement, when cchardet is pinned. Fixes e.g. appdaemon. --- pkgs/development/python-modules/faust-cchardet/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/python-modules/faust-cchardet/default.nix b/pkgs/development/python-modules/faust-cchardet/default.nix index ca2cdc02162e..ad979dbaf6ab 100644 --- a/pkgs/development/python-modules/faust-cchardet/default.nix +++ b/pkgs/development/python-modules/faust-cchardet/default.nix @@ -7,6 +7,7 @@ , setuptools , wheel , pytestCheckHook +, python }: buildPythonPackage rec { @@ -29,6 +30,12 @@ buildPythonPackage rec { wheel ]; + postFixup = '' + # fake cchardet distinfo, so packages that depend on cchardet + # accept it as a drop-in replacement + ln -s $out/${python.sitePackages}/{faust_,}cchardet-${version}.dist-info + ''; + pythonImportsCheck = [ "cchardet" ];