From 2ce14a8ce9feeb257c87b40df39ab50cceb69560 Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Sat, 15 Jul 2017 12:58:25 +0700 Subject: [PATCH] python.pkgs.altair: move to separate expression --- .../python-modules/altair/default.nix | 30 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 23 +------------- 2 files changed, 31 insertions(+), 22 deletions(-) create mode 100644 pkgs/development/python-modules/altair/default.nix diff --git a/pkgs/development/python-modules/altair/default.nix b/pkgs/development/python-modules/altair/default.nix new file mode 100644 index 000000000000..a0504de4fb81 --- /dev/null +++ b/pkgs/development/python-modules/altair/default.nix @@ -0,0 +1,30 @@ +{ stdenv, buildPythonPackage, fetchPypi +, pytest, vega, pandas, ipython, traitlets }: + +buildPythonPackage rec { + pname = "altair"; + version = "1.2.0"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "05c47dm20p7m0017p2h38il721rxag1q0457dj7whp0k8rc7qd1n"; + }; + + buildInputs = [ pytest ]; + + checkPhase = '' + export LANG=en_US.UTF-8 + py.test altair --doctest-modules + ''; + + propagatedBuildInputs = [ vega pandas ipython traitlets ]; + + meta = with stdenv.lib; { + description = "A declarative statistical visualization library for Python."; + homepage = https://github.com/altair-viz/altair; + license = licenses.bsd3; + maintainers = with maintainers; [ teh ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index dadbf0db86d0..ada5409509db 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -264,28 +264,7 @@ in { aafigure = callPackage ../development/python-modules/aafigure { }; - altair = buildPythonPackage rec { - name = "altair-1.2.0"; - - src = pkgs.fetchurl { - url = "mirror://pypi/a/altair/${name}.tar.gz"; - sha256 = "05c47dm20p7m0017p2h38il721rxag1q0457dj7whp0k8rc7qd1n"; - }; - buildInputs = [ self.pytest ]; - - checkPhase = '' - export LANG=en_US.UTF-8 - py.test altair --doctest-modules - ''; - propagatedBuildInputs = with self; [ vega pandas ipython traitlets ]; - meta = { - description = "A declarative statistical visualization library for Python."; - homepage = https://github.com/altair-viz/altair; - license = licenses.bsd3; - platforms = platforms.linux; - maintainers = with maintainers; [ teh ]; - }; - }; + altair = callPackage ../development/python-modules/altair { }; vega = buildPythonPackage rec { name = "vega-0.4.4";