From 173793c63f65cb1d2b602b241d0d8b6886228eee Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Mon, 29 Oct 2018 17:17:56 -0400 Subject: [PATCH] pythonPackages.word2vec: refactor move to python-modules --- .../python-modules/word2vec/default.nix | 32 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 24 +------------- 2 files changed, 33 insertions(+), 23 deletions(-) create mode 100644 pkgs/development/python-modules/word2vec/default.nix diff --git a/pkgs/development/python-modules/word2vec/default.nix b/pkgs/development/python-modules/word2vec/default.nix new file mode 100644 index 00000000000..d3c294308c4 --- /dev/null +++ b/pkgs/development/python-modules/word2vec/default.nix @@ -0,0 +1,32 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, cython +, numpy +, python +}: + +buildPythonPackage rec { + pname = "word2vec"; + version = "0.9.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "a811e3e98a8e6dfe7bc851ebbbc2d6e5ab5142f2a134dd3c03daac997b546faa"; + }; + + propagatedBuildInputs = [ cython numpy ]; + + checkPhase = '' + cd word2vec/tests; + ${python.interpreter} test_word2vec.py + ''; + + meta = with stdenv.lib; { + description = "Tool for computing continuous distributed representations of words"; + homepage = "https://github.com/danielfrg/word2vec"; + license = licenses.asl20; + maintainers = with maintainers; [ NikolaMandic ]; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ab1b1fc04d6..6879d5d5330 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4591,29 +4591,7 @@ in { simpleai = callPackage ../development/python-modules/simpleai { }; - word2vec = buildPythonPackage rec { - name = "word2vec-${version}"; - version = "0.9.1"; - - src = pkgs.fetchurl { - url = "mirror://pypi/w/word2vec/${name}.tar.gz"; - sha256 = "a811e3e98a8e6dfe7bc851ebbbc2d6e5ab5142f2a134dd3c03daac997b546faa"; - }; - - propagatedBuildInputs = with self; [ cython numpy ]; - - checkPhase = '' - cd word2vec/tests; - ${python.interpreter} test_word2vec.py - ''; - - meta = { - description = "Tool for computing continuous distributed representations of words"; - homepage = "https://github.com/danielfrg/word2vec"; - license = licenses.asl20; - maintainers = with maintainers; [ NikolaMandic ]; - }; - }; + word2vec = callPackage ../development/python-modules/word2vec { }; tvdb_api = buildPythonPackage rec { name = "tvdb_api-${version}";