20 buildPythonPackage rec {
26 url = "mirror://sourceforge/project/pysvn/pysvn/V${version}/pysvn-${version}.tar.gz";
27 hash = "sha256-KfLg9tuuKpXxJoniD002kDXGCTwOZ9jurCoPrWMRo7g=";
30 patches = [ ./replace-python-first.patch ];
42 ++ lib.optionals stdenv.hostPlatform.isLinux [ e2fsprogs ]
43 ++ lib.optionals stdenv.hostPlatform.isDarwin [ gcc ];
47 ${python.pythonOnBuildForHost.interpreter} setup.py backport
48 ${python.pythonOnBuildForHost.interpreter} setup.py configure \
49 --apr-inc-dir=${apr.dev}/include \
50 --apu-inc-dir=${aprutil.dev}/include \
51 --pycxx-dir=${pycxx.dev}/include \
52 --svn-inc-dir=${subversion.dev}/include/subversion-1 \
53 --pycxx-src-dir=${pycxx.dev}/src \
54 --apr-lib-dir=${apr.out}/lib \
55 --svn-lib-dir=${subversion.out}/lib \
56 --svn-bin-dir=${subversion.out}/bin
59 nativeCheckInputs = [ glibcLocales ];
64 # It is not only shebangs, some tests also write scripts dynamically
65 # so it is easier to simply search and replace
66 sed -i "s|/bin/bash|${lib.getExe bash}|" ../Tests/test-*.sh
72 pythonImportsCheck = [ "pysvn" ];
75 dest=$(toPythonPath $out)/pysvn
77 cp pysvn/__init__.py $dest/
78 cp pysvn/_pysvn*.so $dest/
79 mkdir -p $out/share/doc
80 mv -v ../Docs $out/share/doc/pysvn-${version}
81 rm -v $out/share/doc/pysvn-${version}/generate_cpp_docs_from_html_docs.py
85 description = "Python bindings for Subversion";
86 homepage = "https://pysvn.sourceforge.io/";
87 license = licenses.asl20;
88 maintainers = with maintainers; [ dotlambda ];
89 # g++: command not found
90 broken = stdenv.hostPlatform.isDarwin;