diff --git a/pkgs/development/python-modules/libcst/default.nix b/pkgs/development/python-modules/libcst/default.nix index 8ef73f48e856..774cb572e95b 100644 --- a/pkgs/development/python-modules/libcst/default.nix +++ b/pkgs/development/python-modules/libcst/default.nix @@ -9,6 +9,7 @@ , python , pythonOlder , pyyaml +, setuptools-scm , typing-extensions , typing-inspect }: @@ -27,6 +28,18 @@ buildPythonPackage rec { sha256 = "1r4aiqpndqa75119faknsghi7zxyjrx5r6i7cb3d0liwiqrkzrvx"; }; + postPatch = '' + # test try to format files, which isn't necessary when consuming releases + sed -i libcst/codegen/generate.py \ + -e '/ufmt/c\ pass' + ''; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeBuildInputs = [ + setuptools-scm + ]; + propagatedBuildInputs = [ hypothesis typing-extensions