1{ stdenv, fetchurl, bash, autoconf, automake, libtool, pkgconfig, libcangjie 2, sqlite, buildPythonPackage, cython 3}: 4 5let 6 rev = "361bb413203fd43bab624d98edf6f7d20ce6bfd3"; 7in buildPythonPackage rec { 8 pname = "pycangjie"; 9 version = "1.3_rev_${rev}"; 10 format = "other"; 11 12 src = fetchurl { 13 url = "https://github.com/Cangjians/pycangjie/archive/${rev}.tar.gz"; 14 sha256 = "12yi09nyffmn4va7lzk4irw349qzlbxgsnb89dh15cnw0xmrin05"; 15 }; 16 17 nativeBuildInputs = [ pkgconfig ]; 18 buildInputs = [ 19 autoconf automake libtool libcangjie sqlite cython 20 ]; 21 22 preConfigure = '' 23 find . -name '*.sh' -exec sed -e 's@#!/bin/bash@${bash}/bin/bash@' -i '{}' ';' 24 sed -i 's@/usr@${libcangjie}@' tests/__init__.py 25 ''; 26 27 configureScript = "./autogen.sh"; 28 29 doCheck = true; 30 31 meta = with stdenv.lib; { 32 description = "Python wrapper to libcangjie"; 33 homepage = http://cangjians.github.io/projects/pycangjie/; 34 license = licenses.lgpl3Plus; 35 maintainers = [ maintainers.linquize ]; 36 platforms = platforms.all; 37 }; 38}