at 23.05-pre 2.1 kB view raw
1{ stdenv 2, lib 3, buildPythonPackage 4, fetchurl 5, isPy3k 6, python 7, apr 8, aprutil 9, bash 10, e2fsprogs 11, expat 12, gcc 13, glibcLocales 14, neon 15, openssl 16, pycxx 17, subversion 18}: 19 20buildPythonPackage rec { 21 pname = "pysvn"; 22 version = "1.9.18"; 23 format = "other"; 24 25 src = fetchurl { 26 url = "https://pysvn.barrys-emacs.org/source_kits/${pname}-${version}.tar.gz"; 27 hash = "sha256-lUPsNumMYwZoiR1Gt/hqdLLoHOZybRxwvu9+eU1CY78="; 28 }; 29 30 patches = [ 31 ./replace-python-first.patch 32 ]; 33 34 buildInputs = [ bash subversion apr aprutil expat neon openssl ] 35 ++ lib.optionals stdenv.isLinux [ e2fsprogs ] 36 ++ lib.optionals stdenv.isDarwin [ gcc ]; 37 38 preConfigure = '' 39 cd Source 40 ${python.interpreter} setup.py backport 41 ${python.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 50 ''; 51 52 checkInputs = [ glibcLocales ]; 53 54 checkPhase = '' 55 runHook preCheck 56 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 60 make -C ../Tests 61 62 runHook postCheck 63 ''; 64 65 # FIXME https://github.com/NixOS/nixpkgs/issues/175227 66 # pythonImportsCheck = [ "pysvn" ]; 67 68 installPhase = '' 69 dest=$(toPythonPath $out)/pysvn 70 mkdir -p $dest 71 cp pysvn/__init__.py $dest/ 72 cp pysvn/_pysvn*.so $dest/ 73 mkdir -p $out/share/doc 74 mv -v ../Docs $out/share/doc/pysvn-${version} 75 rm -v $out/share/doc/pysvn-${version}/generate_cpp_docs_from_html_docs.py 76 ''; 77 78 meta = with lib; { 79 description = "Python bindings for Subversion"; 80 homepage = "https://pysvn.sourceforge.io/"; 81 license = licenses.asl20; 82 maintainers = with maintainers; [ dotlambda ]; 83 # g++: command not found 84 broken = stdenv.isDarwin; 85 }; 86}