NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.62k stars 13.77k forks source link

Python - huggingface's neuralcoref for spaCy #88910

Open ConradMearns opened 4 years ago

ConradMearns commented 4 years ago

Project description NeuralCoref is a pipeline extension for spaCy 2.1+ which annotates and resolves coreference clusters using a neural network.

Metadata Related to #87059

ConradMearns commented 4 years ago

I am new to Nix and would like to put in the comment myself - but I got stuck.

I cloned nixpkgs and added nixpkgs/pkgs/development/python-modules/neuralcoref/default.nix

{ lib
, buildPythonPackage
, fetchPypi
, spacy
, cython
, pytest
}:

buildPythonPackage rec {
  pname = "neuralcoref}";
  version = "4.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "23aee7418edf5c2e90b3f9f15931563b07ded8c59de386ae654b403322430ad9";
  };

  propagatedBuildInputs = [
    spacy
    cython
    pytest
  ];

  checkInputs = [
  #  pytest
  ];

  doCheck = false;

  meta = with lib; {
    description = "Neuralcoref: Coreference Resolution in spaCy with Neural Networks";
    homepage = "https://github.com/huggingface/neuralcoref";
    license = licenses.mit;
    maintainers = with maintainers; [ conradmearns ];
  };
}

I then tried nix-build -A neuralcoref from that directory, but I get the following error.

error: cannot auto-call a function that has an argument without a default value ('lib')

FRidh commented 4 years ago

add a callPackage in python-packages.nix and then call it from the top-level, so nix-build -A python3Packages.neuralcoref.

ConradMearns commented 4 years ago

Added #90252

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info