about summary refs log tree commit diff
path: root/pkgs/applications/office
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/office')
-rw-r--r--pkgs/applications/office/paperless/default.nix6
-rw-r--r--pkgs/applications/office/paperless/python-modules/django-crispy-forms.nix4
-rw-r--r--pkgs/applications/office/scribus/unstable.nix4
-rw-r--r--pkgs/applications/office/softmaker/desktop_items.nix42
-rw-r--r--pkgs/applications/office/softmaker/freeoffice.nix15
-rw-r--r--pkgs/applications/office/softmaker/generic.nix95
-rw-r--r--pkgs/applications/office/softmaker/softmaker_office.nix15
-rw-r--r--pkgs/applications/office/todoman/default.nix6
8 files changed, 180 insertions, 7 deletions
diff --git a/pkgs/applications/office/paperless/default.nix b/pkgs/applications/office/paperless/default.nix
index af2fd82ddb03..97088f360417 100644
--- a/pkgs/applications/office/paperless/default.nix
+++ b/pkgs/applications/office/paperless/default.nix
@@ -57,6 +57,12 @@ let
       cp -r --no-preserve=mode $src/src/* $src/LICENSE $srcDir
     '';
 
+    postPatch = ''
+      # django-cors-headers 3.x requires a scheme for allowed hosts
+      substituteInPlace $out/share/paperless/paperless/settings.py \
+        --replace "localhost:8080" "http://localhost:8080"
+    '';
+
     buildPhase = let
       # Paperless has explicit runtime checks that expect these binaries to be in PATH
       extraBin = lib.makeBinPath [ imagemagick7 ghostscript optipng tesseract unpaper ];
diff --git a/pkgs/applications/office/paperless/python-modules/django-crispy-forms.nix b/pkgs/applications/office/paperless/python-modules/django-crispy-forms.nix
index c1e0f7da30f6..465da3862471 100644
--- a/pkgs/applications/office/paperless/python-modules/django-crispy-forms.nix
+++ b/pkgs/applications/office/paperless/python-modules/django-crispy-forms.nix
@@ -1,5 +1,5 @@
 { lib, buildPythonPackage, fetchFromGitHub
-, pytest, pytest-django, django }:
+, pytest_4, pytest-django, django }:
 
 buildPythonPackage {
   pname = "django-crispy-forms";
@@ -19,7 +19,7 @@ buildPythonPackage {
     export sourceRoot=source-
   '';
 
-  checkInputs = [ pytest pytest-django django ];
+  checkInputs = [ pytest_4 pytest-django django ];
 
   checkPhase = ''
     PYTHONPATH="$(pwd):$PYTHONPATH" \
diff --git a/pkgs/applications/office/scribus/unstable.nix b/pkgs/applications/office/scribus/unstable.nix
index 2cd441794a46..eef57179b3ea 100644
--- a/pkgs/applications/office/scribus/unstable.nix
+++ b/pkgs/applications/office/scribus/unstable.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, mkDerivation, pkgconfig, cmake, qtbase, cairo, pixman,
 boost, cups, fontconfig, freetype, hunspell, libjpeg, libtiff, libxml2, lcms2,
-podofo, poppler, poppler_data, python2, harfbuzz, qtimageformats, qttools }:
+podofo, poppler, poppler_data, python2, harfbuzz, qtimageformats, qttools, harfbuzzFull }:
 
 let
   pythonEnv = python2.withPackages(ps: [ps.tkinter ps.pillow]);
@@ -20,7 +20,7 @@ mkDerivation rec {
   buildInputs = [
     qtbase cairo pixman boost cups fontconfig
     freetype hunspell libjpeg libtiff libxml2 lcms2 podofo poppler
-    poppler_data pythonEnv harfbuzz qtimageformats qttools
+    poppler_data pythonEnv harfbuzz qtimageformats qttools harfbuzzFull
   ];
 
   meta = {
diff --git a/pkgs/applications/office/softmaker/desktop_items.nix b/pkgs/applications/office/softmaker/desktop_items.nix
new file mode 100644
index 000000000000..6975da064566
--- /dev/null
+++ b/pkgs/applications/office/softmaker/desktop_items.nix
@@ -0,0 +1,42 @@
+{ makeDesktopItem, pname, suiteName }:
+
+{
+  planmaker = makeDesktopItem {
+    name = "${pname}-planmaker";
+    desktopName = "${suiteName} PlanMaker";
+    icon = "${pname}-pml.png";
+    categories = "Application;Office;SpreadSheet;";
+    exec = "${pname}-planmaker %F";
+    mimeType = "application/x-pmd;application/x-pmdx;application/x-pmv;application/excel;application/x-excel;application/x-ms-excel;application/x-msexcel;application/x-sylk;application/x-xls;application/xls;application/vnd.ms-excel;application/vnd.stardivision.calc;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.sheet.macroenabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroEnabled.12;application/x-dif;text/spreadsheet;text/csv;application/x-prn;application/vnd.ms-excel.sheet.binary.macroenabled.12;";
+    extraEntries = ''
+      TryExec=${pname}-planmaker
+      StartupWMClass=pm
+    '';
+  };
+
+  presentations = makeDesktopItem {
+    name = "${pname}-presentations";
+    desktopName = "${suiteName} Presentations";
+    icon = "${pname}-prl.png";
+    categories = "Application;Office;Presentation;";
+    exec = "${pname}-presentations %F";
+    mimeType = "application/x-prdx;application/x-prvx;application/x-prsx;application/x-prd;application/x-prv;application/x-prs;application/ppt;application/mspowerpoint;application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.ms-powerpoint.presentation.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.template;application/vnd.ms-powerpoint.template.macroEnabled.12;application/vnd.ms-powerpoint.slideshow.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.slideshow;";
+    extraEntries = ''
+      TryExec=${pname}-presentations
+      StartupWMClass=pr
+    '';
+  };
+
+  textmaker = makeDesktopItem {
+    name = "${pname}-textmaker";
+    desktopName = "${suiteName} TextMaker";
+    icon = "${pname}-tml.png";
+    categories = "Application;Office;WordProcessor;";
+    exec = "${pname}-textmaker %F";
+    mimeType = "application/x-tmdx;application/x-tmvx;application/x-tmd;application/x-tmv;application/msword;application/vnd.ms-word;application/x-doc;text/rtf;application/rtf;application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.stardivision.writer;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.ms-word.document.macroenabled.12;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.template.macroenabled.12;application/x-pocket-word;application/x-dbf;application/msword-template;";
+    extraEntries = ''
+      TryExec=${pname}-textmaker
+      StartupWMClass=tm
+    '';
+  };
+}
diff --git a/pkgs/applications/office/softmaker/freeoffice.nix b/pkgs/applications/office/softmaker/freeoffice.nix
new file mode 100644
index 000000000000..f3e37943bb66
--- /dev/null
+++ b/pkgs/applications/office/softmaker/freeoffice.nix
@@ -0,0 +1,15 @@
+{ callPackage, fetchurl, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  pname = "freeoffice";
+  version = "970";
+  edition = "2018";
+  suiteName = "FreeOffice";
+
+  src = fetchurl {
+    url = "https://www.softmaker.net/down/softmaker-freeoffice-${version}-amd64.tgz";
+    sha256 = "1maibr4x8mksb32ixvyy2rjn4x9f51191p5fcdj5qwz32pf8h2dr";
+  };
+
+  archive = "freeoffice${edition}.tar.lzma";
+})
diff --git a/pkgs/applications/office/softmaker/generic.nix b/pkgs/applications/office/softmaker/generic.nix
new file mode 100644
index 000000000000..9505271db14c
--- /dev/null
+++ b/pkgs/applications/office/softmaker/generic.nix
@@ -0,0 +1,95 @@
+{ stdenv, fetchurl, autoPatchelfHook, makeDesktopItem, makeWrapper
+
+  # Dynamic Libraries
+, curl, libGL, libX11, libXext, libXmu, libXrandr, libXrender
+
+, pname, version, edition, suiteName, src, archive
+
+, ...
+}:
+
+let
+  desktopItems = import ./desktop_items.nix {
+    inherit makeDesktopItem pname suiteName;
+  };
+  shortEdition = builtins.substring 2 2 edition;
+in stdenv.mkDerivation rec {
+  inherit pname version edition shortEdition src;
+  nativeBuildInputs = [
+    autoPatchelfHook
+    makeWrapper
+  ];
+
+  buildInputs = [
+    curl
+    libGL
+    libX11
+    libXext
+    libXmu
+    libXrandr
+    libXrender
+    stdenv.cc.cc.lib
+  ];
+
+  dontBuild = true;
+  dontConfigure = true;
+
+  unpackPhase = ''
+    runHook preUnpack
+
+    mkdir installer
+    tar -C installer -xf ${src}
+    mkdir ${pname}
+    tar -C ${pname} -xf installer/${archive}
+
+    runHook postUnpack
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/share
+    cp -r ${pname} $out/share/${pname}${edition}
+
+    # Wrap rather than symlinking, so that the programs can determine
+    # their resource path.
+    mkdir -p $out/bin
+    makeWrapper $out/share/${pname}${edition}/planmaker $out/bin/${pname}-planmaker
+    makeWrapper $out/share/${pname}${edition}/presentations $out/bin/${pname}-presentations
+    makeWrapper $out/share/${pname}${edition}/textmaker $out/bin/${pname}-textmaker
+
+    for size in 16 32 48 64 96 128 256 512 1024; do
+      mkdir -p $out/share/icons/hicolor/''${size}x''${size}/apps
+
+      for app in pml prl tml; do
+        ln -s $out/share/${pname}${edition}/icons/''${app}_''${size}.png \
+          $out/share/icons/hicolor/''${size}x''${size}/apps/${pname}-''${app}.png
+      done
+
+      mkdir -p $out/share/icons/hicolor/''${size}x''${size}/mimetypes
+
+      for mimetype in pmd prd tmd; do
+        ln -s $out/share/${pname}${edition}/icons/''${mimetype}_''${size}.png \
+          $out/share/icons/hicolor/''${size}x''${size}/mimetypes/application-x-''${mimetype}.png
+      done
+    done
+
+    # Add desktop items
+    ${desktopItems.planmaker.buildCommand}
+    ${desktopItems.presentations.buildCommand}
+    ${desktopItems.textmaker.buildCommand}
+
+    # Add mime types
+    install -D -t $out/share/mime/packages ${pname}/mime/softmaker-*office*${shortEdition}.xml
+
+    runHook postInstall
+  '';
+
+  meta = with stdenv.lib; {
+    description = "An office suite with a word processor, spreadsheet and presentation program";
+    homepage = "https://www.softmaker.com/";
+    license = licenses.unfree;
+    maintainers = with maintainers; [ danieldk ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/applications/office/softmaker/softmaker_office.nix b/pkgs/applications/office/softmaker/softmaker_office.nix
new file mode 100644
index 000000000000..26fe420d6a3b
--- /dev/null
+++ b/pkgs/applications/office/softmaker/softmaker_office.nix
@@ -0,0 +1,15 @@
+{ callPackage, fetchurl, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  pname = "softmaker-office";
+  version = "970";
+  edition = "2018";
+  suiteName = "SoftMaker Office";
+
+  src = fetchurl {
+    url = "https://www.softmaker.net/down/softmaker-office-${edition}-${version}-amd64.tgz";
+    sha256 = "14f94p1jms41s2iz5sa770rcyfp4mv01r6jjjis9amx37zrc8yid";
+  };
+
+  archive = "office${edition}.tar.lzma";
+})
diff --git a/pkgs/applications/office/todoman/default.nix b/pkgs/applications/office/todoman/default.nix
index 450ee34262b9..7c5c8f724401 100644
--- a/pkgs/applications/office/todoman/default.nix
+++ b/pkgs/applications/office/todoman/default.nix
@@ -5,11 +5,11 @@ let
 in
 buildPythonApplication rec {
   pname = "todoman";
-  version = "3.5.0";
+  version = "3.6.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "051qjdpwif06x7qspnb4pfwdhb8nnmz99yqcp4kla5hv0n3jh0w9";
+    sha256 = "1c0jh9bi2xfjc7w4kka68mygl00zkp2qxhffnipmfvvykfjmlhk0";
   };
 
     LOCALE_ARCHIVE = stdenv.lib.optionalString stdenv.isLinux
@@ -19,7 +19,7 @@ buildPythonApplication rec {
 
   buildInputs = [ glibcLocales ];
   propagatedBuildInputs = with python3.pkgs;
-    [ atomicwrites click click-log configobj humanize icalendar parsedatetime
+    [ atomicwrites click click-log click-repl configobj humanize icalendar parsedatetime
       python-dateutil pyxdg tabulate urwid ];
 
   checkInputs = with python3.pkgs;