summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2021-11-29 12:51:06 -0800
committerJonathan Ringer <jonringer117@gmail.com>2021-11-30 18:52:53 -0800
commit0d420cc9cb291d890d498caaa73376f8d8d36095 (patch)
tree171e1f270574ba9de70c9535180260203dfbc4c1
parentpython3Packages.twentemilieu: fix build (diff)
downloadnixpkgs-0d420cc9cb291d890d498caaa73376f8d8d36095.tar.gz
python3Packages.libcst: fix build
-rw-r--r--pkgs/development/python-modules/libcst/default.nix13
1 files changed, 13 insertions, 0 deletions
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