2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, bash
|
|
|
|
, autoconf
|
|
|
|
, automake
|
|
|
|
, libtool
|
|
|
|
, pkg-config
|
|
|
|
, libcangjie
|
|
|
|
, sqlite
|
|
|
|
, buildPythonPackage
|
|
|
|
, cython
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
buildPythonPackage {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "pycangjie";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "unstable-2015-05-03";
|
2020-04-24 23:36:52 +00:00
|
|
|
format = "other";
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Cangjians";
|
|
|
|
repo = "pycangjie";
|
|
|
|
rev = "361bb413203fd43bab624d98edf6f7d20ce6bfd3";
|
|
|
|
sha256 = "sha256-sS0Demzm89WtEIN4Efz0OTsUQ/c3gIX+/koekQGOca4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config libtool autoconf automake cython ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ libcangjie sqlite ];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
find . -name '*.sh' -exec sed -e 's@#!/bin/bash@${bash}/bin/bash@' -i '{}' ';'
|
|
|
|
sed -i 's@/usr@${libcangjie}@' tests/__init__.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureScript = "./autogen.sh";
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python wrapper to libcangjie";
|
|
|
|
homepage = "http://cangjians.github.io/projects/pycangjie/";
|
|
|
|
license = licenses.lgpl3Plus;
|
|
|
|
maintainers = [ maintainers.linquize ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|