From 648a03cc7c06e55ea2053d3230aa43e653f311e8 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Wed, 17 Oct 2018 01:29:05 -0400 Subject: [PATCH] pythonPackages.nosejs: refactor move to python-modules --- .../python-modules/nosejs/default.nix | 28 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 14 +--------- 2 files changed, 29 insertions(+), 13 deletions(-) create mode 100644 pkgs/development/python-modules/nosejs/default.nix diff --git a/pkgs/development/python-modules/nosejs/default.nix b/pkgs/development/python-modules/nosejs/default.nix new file mode 100644 index 000000000000..82c01e8643f9 --- /dev/null +++ b/pkgs/development/python-modules/nosejs/default.nix @@ -0,0 +1,28 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, nose +}: + +buildPythonPackage rec { + pname = "NoseJS"; + version = "0.9.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "0qrhkd3sga56qf6k0sqyhwfcladwi05gl6aqmr0xriiq1sgva5dy"; + }; + + buildInputs = [ nose ]; + + checkPhase = '' + nosetests -v + ''; + + meta = with stdenv.lib; { + homepage = https://pypi.org/project/NoseJS/; + description = "A Nose plugin for integrating JavaScript tests into a Python test suite"; + license = licenses.free; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3527a02aead7..504e4265f2be 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2987,19 +2987,7 @@ in { nosexcover = callPackage ../development/python-modules/nosexcover { }; - nosejs = buildPythonPackage { - name = "nosejs-0.9.4"; - src = pkgs.fetchurl { - url = mirror://pypi/N/NoseJS/NoseJS-0.9.4.tar.gz; - sha256 = "0qrhkd3sga56qf6k0sqyhwfcladwi05gl6aqmr0xriiq1sgva5dy"; - }; - buildInputs = with self; [ nose ]; - - checkPhase = '' - nosetests -v - ''; - - }; + nosejs = callPackage ../development/python-modules/nosejs { }; nose-cprof = buildPythonPackage rec { name = "nose-cprof-${version}";