Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.4 kB · 73 lines
Nix
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch,
setuptools,
pytestCheckHook,
docopt, fire, numpy, python-crfsuite, pyyaml, six, ssg, torch,}:
buildPythonPackage rec { pname = "attacut"; version = "1.1.0-dev"; pyproject = true;
src = fetchFromGitHub { owner = "PyThaiNLP"; repo = "attacut"; tag = "v${version}"; hash = "sha256-x3JJC1Xd+tsOAHJEHGzIrhIrNGSvLSanAFc7+uXb2Kk="; };
# no more need, see patch... postPatch = '' sed -i "/nptyping>=/d" setup.py '';
patches = [ (fetchpatch { name = "fix-nptyping-deprecated-array.patch"; url = "https://github.com/PyThaiNLP/attacut/commit/a707297b3f08a015d32d8ac241aa8cb11128cbd4.patch"; includes = [ "attacut/evaluation.py" ]; hash = "sha256-k2DJPwiH1Fyf5u6+zavx0bankCXsJVZrw1MGcf8ZL+M="; }) ];
build-system = [ setuptools ];
dependencies = [ docopt fire numpy python-crfsuite pyyaml six ssg torch ];
nativeCheckInputs = [ pytestCheckHook ];
enabledTestPaths = [ "tests/*" ];
pythonImportsCheck = [ "attacut" ];
meta = with lib; { description = "Fast and Accurate Neural Thai Word Segmenter"; homepage = "https://github.com/PyThaiNLP/attacut"; license = licenses.mit; maintainers = with maintainers; [ vizid ]; mainProgram = "attacut-cli"; };}