about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/ruyaml/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/ruyaml/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/ruyaml/default.nix21
1 files changed, 17 insertions, 4 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/ruyaml/default.nix b/nixpkgs/pkgs/development/python-modules/ruyaml/default.nix
index 8779325d9b23..e5b2108831df 100644
--- a/nixpkgs/pkgs/development/python-modules/ruyaml/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/ruyaml/default.nix
@@ -2,10 +2,10 @@
 , buildPythonPackage
 , distro
 , fetchFromGitHub
+, fetchpatch
 , pytestCheckHook
 , pythonOlder
 , setuptools-scm
-, setuptools-scm-git-archive
 }:
 
 buildPythonPackage rec {
@@ -22,13 +22,26 @@ buildPythonPackage rec {
     sha256 = "0gxvwry7n1gczxkjzyfrr3fammllkvnnamja4yln8xrg3n1h89al";
   };
 
+  patches = [
+    (fetchpatch {
+      name = "remove-setuptools-scm-git-archive-from-setupcfg.patch";
+      url = "https://github.com/pycontribs/ruyaml/commit/8922dd826cbb97b29e9826b00fb28a65d584e985.patch";
+      includes = [ "setup.cfg" ];
+      hash = "sha256-XAsORoPvYRElHswlZ4S377UwuJNCU1JuCz5iyFXoXOQ=";
+    })
+
+    # https://github.com/pycontribs/ruyaml/pull/107
+    (fetchpatch {
+      name = "remove-setuptools-scm-git-archive-from-pyproject.patch";
+      url = "https://github.com/pycontribs/ruyaml/commit/4d605bf63f799696c8ba3c1f0a0f505db0ca33ce.patch";
+      hash = "sha256-X6HWXBot5ZIo+odoSHhXMb03tgpQfRw/Ze8nFgH43ZI=";
+    })
+  ];
+
   nativeBuildInputs = [
     setuptools-scm
-    setuptools-scm-git-archive
   ];
 
-  SETUPTOOLS_SCM_PRETEND_VERSION = version;
-
   propagatedBuildInputs = [
     distro
   ];