summary refs log tree commit diff
path: root/pkgs/development/python-modules/spyder/2.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/spyder/2.nix')
-rw-r--r--pkgs/development/python-modules/spyder/2.nix70
1 files changed, 70 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/spyder/2.nix b/pkgs/development/python-modules/spyder/2.nix
new file mode 100644
index 00000000000..b707d4a0abc
--- /dev/null
+++ b/pkgs/development/python-modules/spyder/2.nix
@@ -0,0 +1,70 @@
+{ stdenv, buildPythonPackage, fetchPypi, makeDesktopItem, jedi, pycodestyle,
+  psutil, pyflakes, rope, numpy, scipy, matplotlib, pylint, keyring, numpydoc,
+  qtconsole, qtawesome, nbconvert, mccabe, pyopengl, cloudpickle, pygments,
+  spyder-kernels, qtpy, pyzmq, chardet
+, pyqtwebengine
+}:
+
+buildPythonPackage rec {
+  pname = "spyder";
+  version = "3.3.6";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1z7qw1h3rhca12ycv8xrzw6z2gf81v0j6lfq9kpwh472w4vk75v1";
+  };
+
+  nativeBuildInputs = [ pyqtwebengine.wrapQtAppsHook ];
+
+  propagatedBuildInputs = [
+    jedi pycodestyle psutil pyflakes rope numpy scipy matplotlib pylint keyring
+    numpydoc qtconsole qtawesome nbconvert mccabe pyopengl cloudpickle spyder-kernels
+    pygments qtpy pyzmq chardet pyqtwebengine
+  ];
+
+  # 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;";
+  };
+
+  postPatch = ''
+    # remove dependency on pyqtwebengine
+    # this is still part of the pyqt 5.11 version we have in nixpkgs
+    sed -i /pyqtwebengine/d setup.py
+    substituteInPlace setup.py --replace "pyqt5<5.13" "pyqt5"
+  '';
+
+  # Create desktop item
+  postInstall = ''
+    mkdir -p $out/share/icons
+    cp spyder/images/spyder.svg $out/share/icons
+    cp -r $desktopItem/share/applications/ $out/share
+  '';
+
+  dontWrapQtApps = true;
+
+  preFixup = ''
+    makeWrapperArgs+=("''${qtWrapperArgs[@]}")
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Scientific python development environment";
+    longDescription = ''
+      Spyder (previously known as Pydee) is a powerful interactive development
+      environment for the Python language with advanced editing, interactive
+      testing, debugging and introspection features.
+    '';
+    homepage = "https://github.com/spyder-ide/spyder/";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ gebner ];
+  };
+}