20 buildPythonPackage rec {
26 url = "mirror://sourceforge/project/pysvn/pysvn/V${version}/pysvn-${version}.tar.gz";
27 hash = "sha256-LbAz+KjEY3nkSJAzJNwlnSRYoWr4i1ITRUPV3ZBH7cc=";
31 ./replace-python-first.patch
34 buildInputs = [ bash subversion apr aprutil expat neon openssl ]
35 ++ lib.optionals stdenv.isLinux [ e2fsprogs ]
36 ++ lib.optionals stdenv.isDarwin [ gcc ];
40 ${python.pythonOnBuildForHost.interpreter} setup.py backport
41 ${python.pythonOnBuildForHost.interpreter} setup.py configure \
42 --apr-inc-dir=${apr.dev}/include \
43 --apu-inc-dir=${aprutil.dev}/include \
44 --pycxx-dir=${pycxx.dev}/include \
45 --svn-inc-dir=${subversion.dev}/include/subversion-1 \
46 --pycxx-src-dir=${pycxx.dev}/src \
47 --apr-lib-dir=${apr.out}/lib \
48 --svn-lib-dir=${subversion.out}/lib \
49 --svn-bin-dir=${subversion.out}/bin
52 nativeCheckInputs = [ glibcLocales ];
57 # It is not only shebangs, some tests also write scripts dynamically
58 # so it is easier to simply search and replace
59 sed -i "s|/bin/bash|${bash}/bin/bash|" ../Tests/test-*.sh
65 pythonImportsCheck = [ "pysvn" ];
68 dest=$(toPythonPath $out)/pysvn
70 cp pysvn/__init__.py $dest/
71 cp pysvn/_pysvn*.so $dest/
72 mkdir -p $out/share/doc
73 mv -v ../Docs $out/share/doc/pysvn-${version}
74 rm -v $out/share/doc/pysvn-${version}/generate_cpp_docs_from_html_docs.py
78 description = "Python bindings for Subversion";
79 homepage = "https://pysvn.sourceforge.io/";
80 license = licenses.asl20;
81 maintainers = with maintainers; [ dotlambda ];
82 # g++: command not found
83 broken = stdenv.isDarwin;