about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/xpath-expressions
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-09-01 11:51:02 +0000
committerAlyssa Ross <hi@alyssa.is>2023-09-01 11:51:02 +0000
commitaa4353b499e6950b7333578f936455a628145c31 (patch)
treec6332cedece2327a18d08794755b3fc0f9f1905b /nixpkgs/pkgs/development/python-modules/xpath-expressions
parentac456d475f4e50818499b804359355c0f3b4bbf7 (diff)
parent52185f4d76c18d8348f963795dfed1de018e8dfe (diff)
downloadnixlib-aa4353b499e6950b7333578f936455a628145c31.tar
nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.gz
nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.bz2
nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.lz
nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.xz
nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.zst
nixlib-aa4353b499e6950b7333578f936455a628145c31.zip
Merge https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/xpath-expressions')
-rw-r--r--nixpkgs/pkgs/development/python-modules/xpath-expressions/default.nix20
1 files changed, 12 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/xpath-expressions/default.nix b/nixpkgs/pkgs/development/python-modules/xpath-expressions/default.nix
index eebd30364e47..97e5e62b01aa 100644
--- a/nixpkgs/pkgs/development/python-modules/xpath-expressions/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/xpath-expressions/default.nix
@@ -1,6 +1,7 @@
 { lib
 , buildPythonPackage
 , fetchFromGitHub
+, fetchpatch
 , lxml
 , poetry-core
 , pythonOlder
@@ -10,16 +11,25 @@
 buildPythonPackage rec {
   pname = "xpath-expressions";
   version = "1.1.0";
-  disabled = pythonOlder "3.5";
   format = "pyproject";
+  disabled = pythonOlder "3.5";
 
   src = fetchFromGitHub {
     owner = "orf";
     repo = pname;
     rev = "v${version}";
-    sha256 = "0l289iw2zmzxyfi3g2z7b917vmsaz47h5jp871zvykpmpigc632h";
+    hash = "sha256-UAzDXrz1Tr9/OOjKAg/5Std9Qlrnizei8/3XL3hMSFA=";
   };
 
+  patches = [
+    # https://github.com/orf/xpath-expressions/pull/4
+    (fetchpatch {
+      name = "replace-poetry-with-poetry-core.patch";
+      url = "https://github.com/orf/xpath-expressions/commit/3c5900fd6b2d08dd9468707f35ab42072cf75bd3.patch";
+      hash = "sha256-IeV6ncJyt/w2s5TPpbM5a3pljNT6Bp5PIiqgTg2iTRA=";
+    })
+  ];
+
   nativeBuildInputs = [
     poetry-core
   ];
@@ -29,12 +39,6 @@ buildPythonPackage rec {
     pytestCheckHook
   ];
 
-  postPatch = ''
-    # Was fixed upstream but not released
-    substituteInPlace pyproject.toml \
-      --replace "poetry.masonry.api" "poetry.core.masonry.api"
-  '';
-
   pythonImportsCheck = [ "xpath" ];
 
   meta = with lib; {