From 78169ec02089d3d18afcfff24d66b9c93f8ba0c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sun, 5 May 2013 14:38:31 +0200 Subject: [PATCH 1/2] spyder: add recommended and optional dependencies Spyder says about itself that it has ...the support of IPython (enhanced interactive Python interpreter) and popular Python libraries such as NumPy (linear algebra), SciPy (signal and image processing) or matplotlib (interactive 2D/3D plotting). So I think having those available as default is a the right thing to to. (We can easily make a stripped down spyder expression if needed later.) I've added the list of recommended and optional dependencies as described here: http://pythonhosted.org/spyder/installation.html#dependencies --- pkgs/applications/science/spyder/default.nix | 14 +++++++++++--- pkgs/top-level/all-packages.nix | 3 ++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/science/spyder/default.nix b/pkgs/applications/science/spyder/default.nix index 772a25ed4a1..30ef9f0efbc 100644 --- a/pkgs/applications/science/spyder/default.nix +++ b/pkgs/applications/science/spyder/default.nix @@ -1,4 +1,11 @@ -{ stdenv, fetchurl, buildPythonPackage, unzip, sphinx, pyside }: +{ stdenv, fetchurl, unzip, buildPythonPackage +# mandatory +, pyside +# recommended +, pyflakes ? null, rope ? null, sphinx ? null, numpy ? null, scipy ? null, matplotlib ? null +# optional +, ipython ? null, pylint ? null, pep8 ? null +}: buildPythonPackage rec { name = "spyder-2.1.13.1"; @@ -9,8 +16,9 @@ buildPythonPackage rec { sha256 = "1sg88shvw6k2v5428k13mah4pyqng43856rzr6ypz5qgwn0677ya"; }; - buildInputs = [ unzip sphinx ]; - propagatedBuildInputs = [ pyside ]; + buildInputs = [ unzip ]; + propagatedBuildInputs = + [ pyside pyflakes rope sphinx numpy scipy matplotlib ipython pylint pep8 ]; # There is no test for spyder doCheck = false; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d3a7f03e14b..623f1b2c717 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8721,7 +8721,8 @@ let gravit = callPackage ../applications/science/astronomy/gravit { }; spyder = callPackage ../applications/science/spyder { - inherit (pythonPackages) sphinx; + inherit (pythonPackages) pyflakes rope sphinx numpy scipy matplotlib; # recommended + inherit (pythonPackages) ipython pylint pep8; # optional }; stellarium = callPackage ../applications/science/astronomy/stellarium { }; From 36c6a05fd974194139656f80a3c47f6613418fea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sun, 5 May 2013 13:27:28 +0200 Subject: [PATCH 2/2] spyder: create desktop menu item --- pkgs/applications/science/spyder/default.nix | 21 +++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/science/spyder/default.nix b/pkgs/applications/science/spyder/default.nix index 30ef9f0efbc..6c0125e4b85 100644 --- a/pkgs/applications/science/spyder/default.nix +++ b/pkgs/applications/science/spyder/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, unzip, buildPythonPackage +{ stdenv, fetchurl, unzip, buildPythonPackage, makeDesktopItem # mandatory , pyside # recommended @@ -23,6 +23,25 @@ buildPythonPackage rec { # There is no test for spyder doCheck = false; + desktopItem = makeDesktopItem { + name = "Spyder"; + exec = "spyder"; + icon = "spyder"; + comment = "Scientific Python Development Environment"; + desktopName = "Spyder"; + genericName = "Python IDE"; + categories = "Application;Development;Editor;IDE;"; + }; + + # Create desktop item + postInstall = '' + mkdir -p $out/share/applications + cp $desktopItem/share/applications/* $out/share/applications/ + + mkdir -p $out/share/icons + cp spyderlib/images/spyder.svg $out/share/icons/ + ''; + meta = { description = "Scientific PYthon Development EnviRonment (SPYDER)"; longDescription = ''