summary refs log tree commit diff
diff options
context:
space:
mode:
authorhqurve <hqurve@outlook.com>2023-04-26 17:40:33 -0400
committerSandro Jäckel <sandro.jaeckel@gmail.com>2023-05-08 14:40:26 +0200
commitabf66be4b2088fbd9cd15df81c3e37405f38c7a7 (patch)
treed1da273bf170c086af8514661eb7c518d5a9d098
parent547071ee6381cf15683c0e1ad97de5e815501888 (diff)
downloadnixpkgs-abf66be4b2088fbd9cd15df81c3e37405f38c7a7.tar
nixpkgs-abf66be4b2088fbd9cd15df81c3e37405f38c7a7.tar.gz
nixpkgs-abf66be4b2088fbd9cd15df81c3e37405f38c7a7.tar.bz2
nixpkgs-abf66be4b2088fbd9cd15df81c3e37405f38c7a7.tar.lz
nixpkgs-abf66be4b2088fbd9cd15df81c3e37405f38c7a7.tar.xz
nixpkgs-abf66be4b2088fbd9cd15df81c3e37405f38c7a7.tar.zst
nixpkgs-abf66be4b2088fbd9cd15df81c3e37405f38c7a7.zip
cantor: init at 23.04.0
-rw-r--r--pkgs/applications/kde/cantor.nix109
-rw-r--r--pkgs/applications/kde/default.nix1
-rw-r--r--pkgs/top-level/all-packages.nix2
3 files changed, 112 insertions, 0 deletions
diff --git a/pkgs/applications/kde/cantor.nix b/pkgs/applications/kde/cantor.nix
new file mode 100644
index 00000000000..1c9a9f718a7
--- /dev/null
+++ b/pkgs/applications/kde/cantor.nix
@@ -0,0 +1,109 @@
+{ lib
+, mkDerivation
+
+, cmake
+, extra-cmake-modules
+, makeWrapper
+, shared-mime-info
+
+, qtbase
+, qtsvg
+, qttools
+, qtwebengine
+, qtxmlpatterns
+
+, poppler
+
+, karchive
+, kcompletion
+, kconfig
+, kcoreaddons
+, kcrash
+, kdoctools
+, ki18n
+, kiconthemes
+, kio
+, knewstuff
+, kparts
+, kpty
+, ktexteditor
+, ktextwidgets
+, kxmlgui
+, syntax-highlighting
+
+, libspectre
+
+# Backends. Set to null if you want to omit from the build
+, withAnalitza ? true, analitza
+, wtihJulia ? true, julia
+, withQalculate ? true, libqalculate
+, withLua ? true, luajit
+, withPython ? true, python3
+, withR ? true, R
+, withSage ? true, sage, sage-with-env ? sage.with-env
+}:
+
+mkDerivation {
+  pname = "cantor";
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+    makeWrapper
+    shared-mime-info
+    qttools
+  ];
+
+  buildInputs = [
+    qtbase
+    qtsvg
+    qtwebengine
+    qtxmlpatterns
+
+    poppler
+
+    karchive
+    kcompletion
+    kconfig
+    kcoreaddons
+    kcrash
+    kdoctools
+    ki18n
+    kiconthemes
+    kio
+    knewstuff
+    kparts
+    kpty
+    ktexteditor
+    ktextwidgets
+    kxmlgui
+    syntax-highlighting
+
+    libspectre
+  ]
+  # backends
+  ++ lib.optional withAnalitza analitza
+  ++ lib.optional wtihJulia julia
+  ++ lib.optional withQalculate libqalculate
+  ++ lib.optional withLua luajit
+  ++ lib.optional withPython python3
+  ++ lib.optional withR R
+  ++ lib.optional withSage sage-with-env
+  ;
+
+  qtWrapperArgs = [
+    "--prefix PATH : ${placeholder "out"}/bin"
+  ];
+
+  postInstall = lib.optionalString withSage ''
+    wrapProgram $out/share/cantor/sagebackend/cantor-execsage \
+      --prefix PATH : ${sage-with-env}/bin
+  '';
+
+  meta = with lib; {
+    description = "Front end to powerful mathematics and statistics packages";
+    homepage = "https://cantor.kde.org/";
+    license = with licenses; [ bsd3 cc0 gpl2Only gpl2Plus gpl3Only ];
+    maintainers = with maintainers; [ hqurve ];
+  };
+}
diff --git a/pkgs/applications/kde/default.nix b/pkgs/applications/kde/default.nix
index 87356823572..f6988f9831d 100644
--- a/pkgs/applications/kde/default.nix
+++ b/pkgs/applications/kde/default.nix
@@ -79,6 +79,7 @@ let
       bovo = callPackage ./bovo.nix {};
       calendarsupport = callPackage ./calendarsupport.nix {};
       colord-kde = callPackage ./colord-kde.nix {};
+      cantor = callPackage ./cantor.nix {};
       dolphin = callPackage ./dolphin.nix {};
       dolphin-plugins = callPackage ./dolphin-plugins.nix {};
       dragon = callPackage ./dragon.nix {};
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index f8b6ffab997..4c11bacfe3d 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -37513,6 +37513,8 @@ with pkgs;
 
   brial = callPackage ../development/libraries/science/math/brial { };
 
+  cantor = libsForQt5.cantor;
+
   clblas = callPackage ../development/libraries/science/math/clblas {
     inherit (darwin.apple_sdk.frameworks) Accelerate CoreGraphics CoreVideo OpenCL;
   };