depot/third_party/nixpkgs/pkgs/development/python-modules/pycangjie/default.nix
Default email ae91cbe6cc Project import generated by Copybara.
GitOrigin-RevId: 536fe36e23ab0fc8b7f35c24603422eee9fc17a2
2021-02-05 18:12:51 +01:00

36 lines
1,020 B
Nix

{ lib, fetchurl, bash, autoconf, automake, libtool, pkg-config, libcangjie
, sqlite, buildPythonPackage, cython
}:
let
rev = "361bb413203fd43bab624d98edf6f7d20ce6bfd3";
in buildPythonPackage {
pname = "pycangjie";
version = "1.3_rev_${rev}";
format = "other";
src = fetchurl {
url = "https://github.com/Cangjians/pycangjie/archive/${rev}.tar.gz";
sha256 = "12yi09nyffmn4va7lzk4irw349qzlbxgsnb89dh15cnw0xmrin05";
};
nativeBuildInputs = [ pkg-config libtool autoconf automake cython ];
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;
meta = with lib; {
description = "Python wrapper to libcangjie";
homepage = "http://cangjians.github.io/projects/pycangjie/";
license = licenses.lgpl3Plus;
maintainers = [ maintainers.linquize ];
platforms = platforms.all;
};
}