diff --git a/pkgs/development/python-modules/pysvn/default.nix b/pkgs/development/python-modules/pysvn/default.nix index 37e3490a54c7..c2df3f72cef0 100644 --- a/pkgs/development/python-modules/pysvn/default.nix +++ b/pkgs/development/python-modules/pysvn/default.nix @@ -19,22 +19,22 @@ buildPythonPackage rec { pname = "pysvn"; - version = "1.9.12"; + version = "1.9.18"; format = "other"; src = fetchurl { url = "https://pysvn.barrys-emacs.org/source_kits/${pname}-${version}.tar.gz"; - sha256 = "sRPa4wNyjDmGdF1gTOgLS0pnrdyZwkkH4/9UCdh/R9Q="; + hash = "sha256-lUPsNumMYwZoiR1Gt/hqdLLoHOZybRxwvu9+eU1CY78="; }; + patches = [ + ./replace-python-first.patch + ]; + buildInputs = [ bash subversion apr aprutil expat neon openssl ] ++ lib.optionals stdenv.isLinux [ e2fsprogs ] ++ lib.optionals stdenv.isDarwin [ gcc ]; - postPatch = '' - sed -i "117s|append(|insert(0, |" Tests/benchmark_diff.py - ''; - preConfigure = '' cd Source ${python.interpreter} setup.py backport @@ -47,11 +47,10 @@ buildPythonPackage rec { --apr-lib-dir=${apr.out}/lib \ --svn-lib-dir=${subversion.out}/lib \ --svn-bin-dir=${subversion.out}/bin - '' + (lib.optionalString (stdenv.isDarwin && !isPy3k) '' - sed -i -e 's|libpython2.7.dylib|lib/libpython2.7.dylib|' Makefile - ''); + ''; + + checkInputs = [ glibcLocales ]; - checkInputs = [ glibcLocales ]; checkPhase = '' runHook preCheck @@ -60,11 +59,12 @@ buildPythonPackage rec { sed -i "s|/bin/bash|${bash}/bin/bash|" ../Tests/test-*.sh make -C ../Tests - ${python.interpreter} -c "import pysvn" - runHook postCheck ''; + # FIXME https://github.com/NixOS/nixpkgs/issues/175227 + # pythonImportsCheck = [ "pysvn" ]; + installPhase = '' dest=$(toPythonPath $out)/pysvn mkdir -p $dest @@ -77,8 +77,9 @@ buildPythonPackage rec { meta = with lib; { description = "Python bindings for Subversion"; - homepage = "http://pysvn.tigris.org/"; + homepage = "https://pysvn.sourceforge.io/"; license = licenses.asl20; + maintainers = with maintainers; [ dotlambda ]; # g++: command not found broken = stdenv.isDarwin; }; diff --git a/pkgs/development/python-modules/pysvn/replace-python-first.patch b/pkgs/development/python-modules/pysvn/replace-python-first.patch new file mode 100644 index 000000000000..9ec4ce826e3e --- /dev/null +++ b/pkgs/development/python-modules/pysvn/replace-python-first.patch @@ -0,0 +1,13 @@ +Index: Extension/Tests/benchmark_diff.py +=================================================================== +--- Extension/Tests/benchmark_diff.py (revision 2093) ++++ Extension/Tests/benchmark_diff.py (working copy) +@@ -115,7 +115,7 @@ + + if self.python: + python_re = LiteralCaseBlindSearch( self.python ) +- self.replacement_list.append( ++ self.replacement_list.insert(0, + (python_re, '') ) + + if self.svn_bin: