about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/office
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/office')
-rw-r--r--nixpkgs/pkgs/applications/office/abiword/default.nix39
-rw-r--r--nixpkgs/pkgs/applications/office/aesop/default.nix50
-rw-r--r--nixpkgs/pkgs/applications/office/antiword/10_fix_buffer_overflow_wordole_c.patch18
-rw-r--r--nixpkgs/pkgs/applications/office/antiword/default.nix31
-rw-r--r--nixpkgs/pkgs/applications/office/atlassian-cli/default.nix49
-rwxr-xr-xnixpkgs/pkgs/applications/office/atlassian-cli/wrapper.sh20
-rw-r--r--nixpkgs/pkgs/applications/office/autokey/default.nix38
-rw-r--r--nixpkgs/pkgs/applications/office/autokey/remove-requires-dbus-python.patch11
-rw-r--r--nixpkgs/pkgs/applications/office/beancount/bean-add.nix31
-rw-r--r--nixpkgs/pkgs/applications/office/bookworm/default.nix67
-rw-r--r--nixpkgs/pkgs/applications/office/calligra/default.nix69
-rw-r--r--nixpkgs/pkgs/applications/office/calligra/qt5_11.patch98
-rw-r--r--nixpkgs/pkgs/applications/office/cb2bib/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/office/fava/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/office/gnucash/default.nix109
-rw-r--r--nixpkgs/pkgs/applications/office/gnumeric/default.nix42
-rw-r--r--nixpkgs/pkgs/applications/office/grisbi/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/office/homebank/default.nix22
-rw-r--r--nixpkgs/pkgs/applications/office/ib/controller/default.nix162
-rw-r--r--nixpkgs/pkgs/applications/office/ib/tws/default.nix96
-rw-r--r--nixpkgs/pkgs/applications/office/impressive/default.nix68
-rw-r--r--nixpkgs/pkgs/applications/office/jabref/default.nix46
-rw-r--r--nixpkgs/pkgs/applications/office/jameica/default.nix75
-rw-r--r--nixpkgs/pkgs/applications/office/keepnote/default.nix22
-rw-r--r--nixpkgs/pkgs/applications/office/kexi/default.nix54
-rw-r--r--nixpkgs/pkgs/applications/office/kmymoney/default.nix79
-rw-r--r--nixpkgs/pkgs/applications/office/ledger-autosync/default.nix51
-rw-r--r--nixpkgs/pkgs/applications/office/ledger-web/Gemfile3
-rw-r--r--nixpkgs/pkgs/applications/office/ledger-web/Gemfile.lock61
-rw-r--r--nixpkgs/pkgs/applications/office/ledger-web/default.nix23
-rw-r--r--nixpkgs/pkgs/applications/office/ledger-web/gemset.nix172
-rw-r--r--nixpkgs/pkgs/applications/office/ledger/2.6.3.nix41
-rw-r--r--nixpkgs/pkgs/applications/office/ledger/default.nix49
-rw-r--r--nixpkgs/pkgs/applications/office/libreoffice/README.md10
-rw-r--r--nixpkgs/pkgs/applications/office/libreoffice/default-gen-shell.nix29
-rw-r--r--nixpkgs/pkgs/applications/office/libreoffice/default-primary-src.nix17
-rw-r--r--nixpkgs/pkgs/applications/office/libreoffice/default.nix380
-rw-r--r--nixpkgs/pkgs/applications/office/libreoffice/download-list-builder.sh3
-rwxr-xr-xnixpkgs/pkgs/applications/office/libreoffice/generate-libreoffice-srcs.py328
-rw-r--r--nixpkgs/pkgs/applications/office/libreoffice/libreoffice-srcs-additions.json5
-rw-r--r--nixpkgs/pkgs/applications/office/libreoffice/libreoffice-srcs-still.nix856
-rw-r--r--nixpkgs/pkgs/applications/office/libreoffice/libreoffice-srcs.nix856
-rw-r--r--nixpkgs/pkgs/applications/office/libreoffice/still-gen-shell.nix29
-rw-r--r--nixpkgs/pkgs/applications/office/libreoffice/still-primary-src.nix17
-rw-r--r--nixpkgs/pkgs/applications/office/libreoffice/still.nix304
-rw-r--r--nixpkgs/pkgs/applications/office/libreoffice/wrapper.nix19
-rw-r--r--nixpkgs/pkgs/applications/office/libreoffice/wrapper.sh18
-rw-r--r--nixpkgs/pkgs/applications/office/libreoffice/xdg-open-brief.patch13
-rw-r--r--nixpkgs/pkgs/applications/office/libreoffice/xdg-open.patch25
-rw-r--r--nixpkgs/pkgs/applications/office/marp/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/office/mendeley/default.nix144
-rw-r--r--nixpkgs/pkgs/applications/office/mendeley/update.nix61
-rw-r--r--nixpkgs/pkgs/applications/office/mmex/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/office/moneyplex/default.nix122
-rw-r--r--nixpkgs/pkgs/applications/office/mytetra/default.nix38
-rw-r--r--nixpkgs/pkgs/applications/office/notes-up/default.nix46
-rw-r--r--nixpkgs/pkgs/applications/office/osmo/default.nix24
-rw-r--r--nixpkgs/pkgs/applications/office/paperwork/backend.nix47
-rw-r--r--nixpkgs/pkgs/applications/office/paperwork/default.nix81
-rw-r--r--nixpkgs/pkgs/applications/office/pinpoint/default.nix22
-rw-r--r--nixpkgs/pkgs/applications/office/planner/default.nix75
-rw-r--r--nixpkgs/pkgs/applications/office/ppl-address-book/Gemfile2
-rw-r--r--nixpkgs/pkgs/applications/office/ppl-address-book/Gemfile.lock34
-rw-r--r--nixpkgs/pkgs/applications/office/ppl-address-book/default.nix36
-rw-r--r--nixpkgs/pkgs/applications/office/ppl-address-book/gemset.nix90
-rw-r--r--nixpkgs/pkgs/applications/office/qnotero/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/office/qownnotes/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/office/scribus/default.nix46
-rw-r--r--nixpkgs/pkgs/applications/office/scribus/unstable.nix39
-rw-r--r--nixpkgs/pkgs/applications/office/skanlite/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/office/skrooge/default.nix41
-rw-r--r--nixpkgs/pkgs/applications/office/spice-up/default.nix58
-rw-r--r--nixpkgs/pkgs/applications/office/tagainijisho/default.nix22
-rw-r--r--nixpkgs/pkgs/applications/office/timetrap/Gemfile2
-rw-r--r--nixpkgs/pkgs/applications/office/timetrap/Gemfile.lock19
-rw-r--r--nixpkgs/pkgs/applications/office/timetrap/default.nix17
-rw-r--r--nixpkgs/pkgs/applications/office/timetrap/gemset.nix35
-rw-r--r--nixpkgs/pkgs/applications/office/todo.txt-cli/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/office/todoman/default.nix58
-rw-r--r--nixpkgs/pkgs/applications/office/treesheets/default.nix56
-rw-r--r--nixpkgs/pkgs/applications/office/trilium/default.nix66
-rw-r--r--nixpkgs/pkgs/applications/office/tryton/default.nix58
-rw-r--r--nixpkgs/pkgs/applications/office/trytond/default.nix52
-rw-r--r--nixpkgs/pkgs/applications/office/tudu/default.nix20
-rw-r--r--nixpkgs/pkgs/applications/office/watson/default.nix36
-rw-r--r--nixpkgs/pkgs/applications/office/wordgrinder/default.nix55
-rw-r--r--nixpkgs/pkgs/applications/office/wpsoffice/default.nix79
-rw-r--r--nixpkgs/pkgs/applications/office/zanshin/default.nix39
-rw-r--r--nixpkgs/pkgs/applications/office/zim/default.nix47
-rw-r--r--nixpkgs/pkgs/applications/office/zotero/default.nix67
-rw-r--r--nixpkgs/pkgs/applications/office/zotero/zotero.sh3
91 files changed, 6621 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/office/abiword/default.nix b/nixpkgs/pkgs/applications/office/abiword/default.nix
new file mode 100644
index 000000000000..6808a81bec1d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/abiword/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchurl, pkgconfig, gtk3, fribidi
+, libpng, popt, libgsf, enchant, wv, librsvg, bzip2, libjpeg, perl
+, boost, libxslt, goffice, wrapGAppsHook, gnome3
+}:
+
+stdenv.mkDerivation rec {
+  name = "abiword-${version}";
+  version = "3.0.2";
+
+  src = fetchurl {
+    url = "https://www.abisource.com/downloads/abiword/${version}/source/${name}.tar.gz";
+    sha256 = "08imry821g81apdwym3gcs4nss0l9j5blqk31j5rv602zmcd9gxg";
+  };
+
+  enableParallelBuilding = true;
+
+  patches = [
+    # https://bugzilla.abisource.com/show_bug.cgi?id=13791
+    (fetchurl {
+      url = https://bugzilla.abisource.com/attachment.cgi?id=5860;
+      sha256 = "02p8kz02xm1197zcpzjs010mna9hxsbq5lwgxr8b7qhh9yxja7al";
+    })
+  ];
+
+  nativeBuildInputs = [ pkgconfig wrapGAppsHook ];
+
+  buildInputs = [
+    gtk3 librsvg bzip2 fribidi libpng popt
+    libgsf enchant wv libjpeg perl boost libxslt goffice gnome3.adwaita-icon-theme
+  ];
+
+  meta = with stdenv.lib; {
+    description = "Word processing program, similar to Microsoft Word";
+    homepage = https://www.abisource.com/;
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ pSub ylwghst ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/aesop/default.nix b/nixpkgs/pkgs/applications/office/aesop/default.nix
new file mode 100644
index 000000000000..51e2c55ea7d0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/aesop/default.nix
@@ -0,0 +1,50 @@
+{ stdenv, fetchFromGitHub, fetchpatch, pantheon, pkgconfig, meson, ninja, python3, gtk3
+, gnome3, desktop-file-utils, json-glib, libsoup, poppler, gobject-introspection, wrapGAppsHook }:
+
+stdenv.mkDerivation rec {
+  pname = "aesop";
+  version = "1.0.7";
+
+  name = "${pname}-${version}";
+
+  src = fetchFromGitHub {
+    owner = "lainsce";
+    repo = pname;
+    rev = version;
+    sha256 = "17hjg4qcy8q9xl170yapbhn9vdsn3jf537jsggq51pp0fnhvsnqs";
+  };
+
+  nativeBuildInputs = [
+    desktop-file-utils
+    gobject-introspection
+    meson
+    ninja
+    pkgconfig
+    python3
+    pantheon.vala
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    pantheon.elementary-icon-theme
+    gnome3.libgee
+    pantheon.granite
+    gtk3
+    json-glib
+    libsoup
+    poppler
+  ];
+
+  postPatch = ''
+    chmod +x meson/post_install.py
+    patchShebangs meson/post_install.py
+  '';
+
+  meta = with stdenv.lib; {
+    description = "The simplest PDF viewer around";
+    homepage = https://github.com/lainsce/aesop;
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ worldofpeace ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/antiword/10_fix_buffer_overflow_wordole_c.patch b/nixpkgs/pkgs/applications/office/antiword/10_fix_buffer_overflow_wordole_c.patch
new file mode 100644
index 000000000000..ebf2f0900d98
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/antiword/10_fix_buffer_overflow_wordole_c.patch
@@ -0,0 +1,18 @@
+Description: Add check for buffer overflow with malformed input files
+Author: <eriks@debian.org>
+Bug-Debian: http://bugs.debian.org/407015
+Last-Update: 2009-06-03
+
+--- antiword-0.37~/wordole.c	2005-08-26 21:49:57.000000000 +0200
++++ antiword-0.37/wordole.c	2009-06-03 22:31:15.948014682 +0200
+@@ -259,6 +259,10 @@
+ 		}
+ 		tNameSize = (size_t)usGetWord(0x40, aucBytes);
+ 		tNameSize = (tNameSize + 1) / 2;
++		if ( tNameSize > sizeof(atPPSlist[iIndex].szName)) {
++			werr(0, "Name Size of PPS %d is too large", iIndex);
++			tNameSize = sizeof(atPPSlist[iIndex].szName);
++		}
+ 		vName2String(atPPSlist[iIndex].szName, aucBytes, tNameSize);
+ 		atPPSlist[iIndex].ucType = ucGetByte(0x42, aucBytes);
+ 		if (atPPSlist[iIndex].ucType == 5) {
diff --git a/nixpkgs/pkgs/applications/office/antiword/default.nix b/nixpkgs/pkgs/applications/office/antiword/default.nix
new file mode 100644
index 000000000000..96a518a7a28f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/antiword/default.nix
@@ -0,0 +1,31 @@
+{ fetchurl, stdenv }:
+
+let
+  name = "antiword-0.37";
+in
+stdenv.mkDerivation {
+  inherit name;
+
+  src = fetchurl {
+    url = "http://www.winfield.demon.nl/linux/${name}.tar.gz";
+    sha256 = "1b7mi1l20jhj09kyh0bq14qzz8vdhhyf35gzwsq43mn6rc7h0b4f";
+  };
+
+  prePatch = ''
+    sed -i -e "s|/usr/local/bin|$out/bin|g" -e "s|/usr/share|$out/share|g" Makefile antiword.h
+    substituteInPlace Makefile --replace "gcc" "cc"
+  '';
+
+  patches = [ ./10_fix_buffer_overflow_wordole_c.patch ];
+
+  installTargets = "global_install";
+
+  meta = {
+    homepage = http://www.winfield.demon.nl/;
+    description = "Convert MS Word documents to plain text or PostScript";
+    license = stdenv.lib.licenses.gpl2;
+
+    maintainers = [ stdenv.lib.maintainers.peti ];
+    platforms = with stdenv.lib.platforms; linux ++ darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/atlassian-cli/default.nix b/nixpkgs/pkgs/applications/office/atlassian-cli/default.nix
new file mode 100644
index 000000000000..be31f5fd102f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/atlassian-cli/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, fetchzip, jre }:
+
+stdenv.mkDerivation rec {
+  name = "atlassian-cli-${version}";
+  version = "7.8.0";
+  
+  src = fetchzip {
+    url  = "https://bobswift.atlassian.net/wiki/download/attachments/16285777/${name}-distribution.zip";
+    sha256  = "111s4d9m6vxq8jwh1d6ar1f4n5zmyjg7gi2vl3aq63kxbfld9vw7";
+    extraPostFetch = "chmod go-w $out";
+  };
+  
+  tools = [
+    "agile"
+    "bamboo"
+    "bitbucket"
+    "confluence"
+    "csv"
+    "hipchat"
+    "jira"
+    "servicedesk"
+    "structure"
+    "tempo"
+    "trello"
+    "upm"
+  ];
+  
+  installPhase = ''
+    mkdir -p $out/{bin,share/doc/atlassian-cli}
+    cp -r lib $out/share/java
+    cp -r README.txt license $out/share/doc/atlassian-cli
+    for tool in $tools
+    do
+      substitute ${./wrapper.sh} $out/bin/$tool \
+        --subst-var out \
+        --subst-var-by jre ${jre} \
+        --subst-var-by tool $tool
+      chmod +x $out/bin/$tool
+    done
+  '';
+  
+  meta = with stdenv.lib; {
+    description = "An integrated family of CLI’s for various Atlassian applications";
+    homepage = https://bobswift.atlassian.net/wiki/spaces/ACLI/overview;
+    license = licenses.unfreeRedistributable;
+    maintainers = with maintainers; [ twey ];
+    inherit (jre.meta) platforms;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/atlassian-cli/wrapper.sh b/nixpkgs/pkgs/applications/office/atlassian-cli/wrapper.sh
new file mode 100755
index 000000000000..80b60dbc468c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/atlassian-cli/wrapper.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+tool=@tool@
+user=ATLASSIAN_${tool^^}_USER
+host=ATLASSIAN_${tool^^}_HOST
+pass=ATLASSIAN_${tool^^}_PASS
+
+[ -f ~/.atlassian-cli ] && source ~/.atlassian-cli
+if [ x = ${!user-x} ] || [ x = ${!host-x} ] || [ x = ${!pass-x} ]
+then
+    >&2 echo please define $user, $host, and $pass in '~/.atlassian-cli'
+    exit 1
+fi
+
+@jre@/bin/java \
+    -jar @out@/share/java/@tool@-cli-* \
+    --server "${!host}" \
+    --user "${!user}" \
+    --password "${!pass}" \
+    "$@"
diff --git a/nixpkgs/pkgs/applications/office/autokey/default.nix b/nixpkgs/pkgs/applications/office/autokey/default.nix
new file mode 100644
index 000000000000..e4b89ef36100
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/autokey/default.nix
@@ -0,0 +1,38 @@
+{ lib, python3Packages, fetchFromGitHub, wrapGAppsHook, gobject-introspection
+, gnome3, libappindicator-gtk3, libnotify }:
+
+python3Packages.buildPythonApplication rec {
+  name = "autokey-${version}";
+  version = "0.94.1";
+
+  src = fetchFromGitHub {
+    owner = "autokey";
+    repo = "autokey";
+    rev = "v${version}";
+    sha256 = "1syxyciyxzs0khbfs9wjgj03q967p948kipw27j1031q0b5z3jxr";
+  };
+
+  # Arch requires a similar work around—see
+  # https://aur.archlinux.org/packages/autokey-py3/?comments=all
+  patches = [ ./remove-requires-dbus-python.patch ];
+
+  # Tests appear to be broken with import errors within the project structure
+  doCheck = false;
+
+  # Note: no dependencies included for Qt GUI because Qt ui is poorly
+  # maintained—see https://github.com/autokey/autokey/issues/51
+
+  buildInputs = [ wrapGAppsHook gobject-introspection gnome3.gtksourceview
+    libappindicator-gtk3 libnotify ];
+
+  propagatedBuildInputs = with python3Packages; [
+    dbus-python pyinotify xlib pygobject3 ];
+
+  meta = {
+    homepage = https://github.com/autokey/autokey;
+    description = "Desktop automation utility for Linux and X11";
+    license = with lib.licenses; [ gpl3 ];
+    maintainers = with lib.maintainers; [ pneumaticat ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/autokey/remove-requires-dbus-python.patch b/nixpkgs/pkgs/applications/office/autokey/remove-requires-dbus-python.patch
new file mode 100644
index 000000000000..73372e435291
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/autokey/remove-requires-dbus-python.patch
@@ -0,0 +1,11 @@
+--- a/setup.py
++++ b/setup.py
+@@ -71,7 +71,7 @@
+         'console_scripts': ['autokey-gtk=autokey.gtkui.__main__:main']
+     },
+     scripts=['autokey-qt', 'autokey-run', 'autokey-shell'],
+-    install_requires=['dbus-python', 'pyinotify', 'python3-xlib'],
++    install_requires=['pyinotify', 'python-xlib'],
+     classifiers=[
+         'Development Status :: 4 - Beta',
+         'Intended Audience :: Developers',
diff --git a/nixpkgs/pkgs/applications/office/beancount/bean-add.nix b/nixpkgs/pkgs/applications/office/beancount/bean-add.nix
new file mode 100644
index 000000000000..9eec315217cb
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/beancount/bean-add.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchFromGitHub, python3Packages }:
+
+stdenv.mkDerivation rec {
+  name = "bean-add-2018-01-08";
+
+  src = fetchFromGitHub {
+    owner = "simon-v";
+    repo = "bean-add";
+    rev = "660c657f295b019d8dbc26375924eb17bf654341";
+    sha256 = "0vzff2hdng8ybwd5frflhxpak0yqg0985p1dy7vpvhr8kbqqzwdz";
+  };
+
+  propagatedBuildInputs = with python3Packages; [ python ];
+
+  installPhase = ''
+    mkdir -p $out/bin/
+    cp bean-add $out/bin/bean-add
+    chmod +x $out/bin/bean-add
+  '';
+
+  meta = {
+    homepage = https://github.com/simon-v/bean-add/;
+    description = "beancount transaction entry assistant";
+
+    # The (only) source file states:
+    #   License: "Do what you feel is right, but don't be a jerk" public license.
+
+    maintainers = with stdenv.lib.maintainers; [ matthiasbeyer ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/applications/office/bookworm/default.nix b/nixpkgs/pkgs/applications/office/bookworm/default.nix
new file mode 100644
index 000000000000..63199945f2b1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/bookworm/default.nix
@@ -0,0 +1,67 @@
+{ stdenv, fetchFromGitHub, fetchpatch, pantheon, python3, python2, pkgconfig, libxml2, meson, ninja, gtk3, gnome3, glib, webkitgtk
+, gobject-introspection, sqlite, poppler, poppler_utils, html2text, curl, gnugrep, coreutils, bash, unzip, unar, wrapGAppsHook }:
+
+stdenv.mkDerivation rec {
+  pname = "bookworm";
+  version = "unstable-2018-11-19";
+
+  src = fetchFromGitHub {
+    owner = "babluboy";
+    repo = pname;
+    rev = "4c3061784ff42151cac77d12bf2a28bf831fdfc5";
+    sha256 = "0yrqxa60xlvz249kx966z5krx8i7h17ac0hjgq9p8f0irzy5yp0n";
+  };
+
+  nativeBuildInputs = [
+    bash
+    gobject-introspection
+    libxml2
+    meson
+    ninja
+    pkgconfig
+    python3
+    pantheon.vala
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    pantheon.elementary-icon-theme
+    pantheon.granite
+    glib
+    gnome3.libgee
+    gtk3
+    html2text
+    poppler
+    python2
+    sqlite
+    webkitgtk
+  ];
+
+  postPatch = ''
+    chmod +x meson/post_install.py
+    patchShebangs meson/post_install.py
+  '';
+
+  # These programs are expected in PATH from the source code and scripts
+  preFixup = ''
+    gappsWrapperArgs+=(
+      --prefix PATH : "${stdenv.lib.makeBinPath [ unzip unar poppler_utils html2text coreutils curl gnugrep ]}"
+      --prefix PATH : $out/bin
+    )
+  '';
+
+  postFixup = ''
+    patchShebangs $out/share/bookworm/scripts/mobi_lib/*.py
+    patchShebangs $out/share/bookworm/scripts/tasks/*.sh
+  '';
+
+   meta = with stdenv.lib; {
+     description = "A simple, focused eBook reader";
+     longDescription = ''
+       Read the books you love without having to worry about different format complexities like epub, pdf, mobi, cbr, etc.
+     '';
+     homepage = https://babluboy.github.io/bookworm/;
+     license = licenses.gpl3Plus;
+     platforms = platforms.linux;
+   };
+ }
diff --git a/nixpkgs/pkgs/applications/office/calligra/default.nix b/nixpkgs/pkgs/applications/office/calligra/default.nix
new file mode 100644
index 000000000000..a7c6165bdd2b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/calligra/default.nix
@@ -0,0 +1,69 @@
+{
+  mkDerivation, lib, fetchurl, extra-cmake-modules, kdoctools, makeWrapper,
+  boost, qtwebkit, qtx11extras, shared-mime-info,
+  breeze-icons, kactivities, karchive, kcodecs, kcompletion, kconfig, kconfigwidgets,
+  kcoreaddons, kdbusaddons, kdiagram, kguiaddons, khtml, ki18n,
+  kiconthemes, kitemviews, kjobwidgets, kcmutils, kdelibs4support, kio, kross,
+  knotifications, knotifyconfig, kparts, ktextwidgets, kwallet, kwidgetsaddons,
+  kwindowsystem, kxmlgui, sonnet, threadweaver,
+  kcontacts, akonadi, akonadi-calendar, akonadi-contacts,
+  eigen, git, gsl, ilmbase, kproperty, kreport, lcms2, marble, libgit2, libodfgen,
+  librevenge, libvisio, libwpd, libwpg, libwps, okular, openexr, openjpeg, phonon,
+  poppler, pstoedit, qca-qt5, vc
+# TODO: package Spnav, m2mml LibEtonyek, Libqgit2
+}:
+
+mkDerivation rec {
+  pname = "calligra";
+  version = "3.1.0";
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "mirror://kde/stable/${pname}/${version}/${name}.tar.xz";
+    sha256 = "0w782k0hprpb6viixnqz34sp0z5csv3prdby46z22qqkcipcs638";
+  };
+
+  patches = [ ./qt5_11.patch ];
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ extra-cmake-modules kdoctools makeWrapper ];
+
+  buildInputs = [
+    boost qtwebkit qtx11extras shared-mime-info
+    kactivities karchive kcodecs kcompletion kconfig kconfigwidgets kcoreaddons
+    kdbusaddons kdiagram kguiaddons khtml ki18n kiconthemes kitemviews
+    kjobwidgets kcmutils kdelibs4support kio kross knotifications knotifyconfig kparts
+    ktextwidgets kwallet kwidgetsaddons kwindowsystem kxmlgui sonnet threadweaver
+    kcontacts akonadi akonadi-calendar akonadi-contacts
+    eigen git gsl ilmbase kproperty kreport lcms2 marble libgit2 libodfgen librevenge
+    libvisio libwpd libwpg libwps okular openexr openjpeg phonon poppler qca-qt5 vc
+  ];
+
+  propagatedUserEnvPkgs = [ kproperty ];
+
+  NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR";
+
+  postInstall = ''
+    for i in $out/bin/*; do
+      wrapProgram $i \
+        --prefix PATH ':' "${pstoedit.out}/bin" \
+        --prefix XDG_DATA_DIRS ':' "${breeze-icons}/share"
+    done
+  '';
+
+  meta = with lib; {
+    description = "A suite of productivity applications";
+    longDescription = ''
+      Calligra Suite is a set of applications written to help
+      you to accomplish your work. Calligra includes efficient
+      and capable office components: Words for text processing,
+      Sheets for computations, Plan for planning, and Karbon for
+      vector graphics.
+    '';
+    homepage = https://www.calligra.org/;
+    maintainers = with maintainers; [ phreedom ebzzry zraexy ];
+    platforms = platforms.linux;
+    license = with licenses; [ gpl2 lgpl2 ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/calligra/qt5_11.patch b/nixpkgs/pkgs/applications/office/calligra/qt5_11.patch
new file mode 100644
index 000000000000..66ff8c6eedcd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/calligra/qt5_11.patch
@@ -0,0 +1,98 @@
+diff --git a/libs/widgets/KoCsvImportDialog.cpp b/libs/widgets/KoCsvImportDialog.cpp
+index 0ffdcf6..cdca006 100644
+--- a/libs/widgets/KoCsvImportDialog.cpp
++++ b/libs/widgets/KoCsvImportDialog.cpp
+@@ -21,6 +21,7 @@
+ #include "KoCsvImportDialog.h"
+ 
+ // Qt
++#include <QButtonGroup>
+ #include <QTextCodec>
+ #include <QTextStream>
+ 
+diff --git a/libs/widgets/KoPageLayoutWidget.cpp b/libs/widgets/KoPageLayoutWidget.cpp
+index f91555c..a3816f9 100644
+--- a/libs/widgets/KoPageLayoutWidget.cpp
++++ b/libs/widgets/KoPageLayoutWidget.cpp
+@@ -23,6 +23,8 @@
+ 
+ #include <KoUnit.h>
+ 
++#include <QButtonGroup>
++
+ class Q_DECL_HIDDEN KoPageLayoutWidget::Private
+ {
+ public:
+diff --git a/plugins/chartshape/dialogs/TableEditorDialog.cpp b/plugins/chartshape/dialogs/TableEditorDialog.cpp
+index c0d5136..d2a772e 100644
+--- a/plugins/chartshape/dialogs/TableEditorDialog.cpp
++++ b/plugins/chartshape/dialogs/TableEditorDialog.cpp
+@@ -24,6 +24,7 @@
+ 
+ // Qt
+ #include <QAbstractItemModel>
++#include <QAction>
+ 
+ // Calligra
+ #include <KoIcon.h>
+diff --git a/plugins/formulashape/FormulaToolWidget.cpp b/plugins/formulashape/FormulaToolWidget.cpp
+index ed10919..8f52177 100644
+--- a/plugins/formulashape/FormulaToolWidget.cpp
++++ b/plugins/formulashape/FormulaToolWidget.cpp
+@@ -30,6 +30,7 @@
+ #include <QWidgetAction>
+ #include <QTableWidget>
+ #include <QAction>
++#include <QHeaderView>
+ #include <QMenu>
+ 
+ FormulaToolWidget::FormulaToolWidget( KoFormulaTool* tool, QWidget* parent )
+diff --git a/sheets/dialogs/LayoutDialog.cpp b/sheets/dialogs/LayoutDialog.cpp
+index a0a9832..7d7db53 100644
+--- a/sheets/dialogs/LayoutDialog.cpp
++++ b/sheets/dialogs/LayoutDialog.cpp
+@@ -36,6 +36,7 @@
+ #include <math.h>
+ 
+ #include <QIntValidator>
++#include <QButtonGroup>
+ #include <QCheckBox>
+ #include <QFrame>
+ #include <QLabel>
+diff --git a/words/part/dialogs/KWAnchoringProperties.cpp b/words/part/dialogs/KWAnchoringProperties.cpp
+index d64208c..bfddb3a 100644
+--- a/words/part/dialogs/KWAnchoringProperties.cpp
++++ b/words/part/dialogs/KWAnchoringProperties.cpp
+@@ -35,6 +35,7 @@
+ 
+ #include <kundo2command.h>
+ 
++#include <QButtonGroup>
+ #include <QComboBox>
+ 
+ const int KWAnchoringProperties::vertRels[4][20] = {
+diff --git a/words/part/dialogs/KWRunAroundProperties.cpp b/words/part/dialogs/KWRunAroundProperties.cpp
+index e38599a..7e8b2d5 100644
+--- a/words/part/dialogs/KWRunAroundProperties.cpp
++++ b/words/part/dialogs/KWRunAroundProperties.cpp
+@@ -28,6 +28,8 @@
+ 
+ #include <kundo2command.h>
+ 
++#include <QButtonGroup>
++
+ KWRunAroundProperties::KWRunAroundProperties(FrameConfigSharedState *state)
+         : m_state(state)
+ {
+diff --git a/stage/part/KPrPresentationTool.cpp b/stage/part/KPrPresentationTool.cpp
+index ae743da..3007f91 100644
+--- a/stage/part/KPrPresentationTool.cpp
++++ b/stage/part/KPrPresentationTool.cpp
+@@ -32,6 +32,7 @@
+ #include <QDesktopServices>
+ #include <QUrl>
+ #include <QDBusConnection>
++#include <QFrame>
+ 
+ #include <KoShape.h>
+ #include <KoShapeManager.h>
diff --git a/nixpkgs/pkgs/applications/office/cb2bib/default.nix b/nixpkgs/pkgs/applications/office/cb2bib/default.nix
new file mode 100644
index 000000000000..461d428787b9
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/cb2bib/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, qmake, qtbase, qtwebkit, qtx11extras, lzo, libX11 }:
+
+stdenv.mkDerivation rec {
+  name = pname + "-" + version;
+  pname = "cb2bib";
+  version = "2.0.0";
+  src = fetchurl {
+    url = "https://www.molspaces.com/dl/progs/${name}.tar.gz";
+    sha256 = "0gv7cnxi84lr6d5y71pd67h0ilmf5c88j1jxgyn9dvj19smrv99h";
+  };
+  buildInputs = [ qtbase qtwebkit qtx11extras lzo libX11 ];
+  nativeBuildInputs = [ qmake ];
+
+  configurePhase = ''
+    runHook preConfigure
+    ./configure --prefix $out --qmakepath $QMAKE
+    runHook postConfigure
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Rapidly extract unformatted, or unstandardized bibliographic references from email alerts, journal Web pages and PDF files";
+    homepage = http://www.molspaces.com/d_cb2bib-overview.php;
+    maintainers = with maintainers; [ edwtjo ];
+    license = licenses.gpl3;
+  };
+
+}
diff --git a/nixpkgs/pkgs/applications/office/fava/default.nix b/nixpkgs/pkgs/applications/office/fava/default.nix
new file mode 100644
index 000000000000..e33a0b202da0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/fava/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, python3, beancount }:
+
+let
+  inherit (python3.pkgs) buildPythonApplication fetchPypi;
+in
+buildPythonApplication rec {
+  pname = "fava";
+  version = "1.10";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "145995nzgr06qsn619zap0xqa8ckfrp5azga41smyszq97pd01sj";
+  };
+
+  doCheck = false;
+
+  propagatedBuildInputs = with python3.pkgs;
+    [ 
+      Babel
+      cheroot
+      flaskbabel
+      flask
+      jinja2
+      beancount
+      click
+      markdown2
+      ply
+      simplejson
+    ];
+
+  meta = {
+    homepage = https://beancount.github.io/fava;
+    description = "Web interface for beancount";
+    license = stdenv.lib.licenses.mit;
+    maintainers = with stdenv.lib.maintainers; [ matthiasbeyer ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/gnucash/default.nix b/nixpkgs/pkgs/applications/office/gnucash/default.nix
new file mode 100644
index 000000000000..e7aacb9de0f3
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/gnucash/default.nix
@@ -0,0 +1,109 @@
+{ fetchurl, stdenv, pkgconfig, makeWrapper, cmake, gtest
+, boost, icu, libxml2, libxslt, gettext, swig, isocodes, gtk3, glibcLocales
+, webkitgtk, dconf, hicolor-icon-theme, libofx, aqbanking, gwenhywfar, libdbi
+, libdbiDrivers, guile, perl, perlPackages
+}:
+
+let
+
+  # Enable gnc-fq-* to run in command line.
+  perlWrapper = stdenv.mkDerivation {
+    name = perl.name + "-wrapper-for-gnucash";
+    nativeBuildInputs = [ makeWrapper ];
+    buildInputs = [ perl ] ++ (with perlPackages; [ FinanceQuote DateManip ]);
+    phases = [ "installPhase" ];
+    installPhase = ''
+      mkdir -p $out/bin
+      for script in ${perl}/bin/*; do
+        makeWrapper $script $out''${script#${perl}} \
+          --prefix "PERL5LIB" ":" "$PERL5LIB"
+      done
+    '';
+  };
+
+in
+
+stdenv.mkDerivation rec {
+  name = "gnucash-${version}";
+  version = "3.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/gnucash/${name}.tar.bz2";
+    sha256 = "1ms2wg4sh5gq3rpjmmnp85rh5nc9ahca1imxkvhz4d3yiwy8hm52";
+  };
+
+  nativeBuildInputs = [ pkgconfig makeWrapper cmake gtest ];
+
+  buildInputs = [
+    boost icu libxml2 libxslt gettext swig isocodes gtk3 glibcLocales
+    webkitgtk dconf hicolor-icon-theme libofx aqbanking gwenhywfar libdbi
+    libdbiDrivers guile
+    perlWrapper perl
+  ] ++ (with perlPackages; [ FinanceQuote DateManip ]);
+
+  propagatedUserEnvPkgs = [ dconf ];
+
+  # glib-2.58 deprecrated g_type_class_add_private
+  # Should probably be removed next version bump
+  CXXFLAGS = [ "-Wno-deprecated-declarations" ];
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  makeFlags = [ "GUILE_AUTO_COMPILE=0" ];
+
+  postInstall = ''
+    # Auto-updaters don't make sense in Nix.
+    rm $out/bin/gnc-fq-update
+
+    # Unnecessary in the release build.
+    rm $out/bin/gnucash-valgrind
+
+    wrapProgram "$out/bin/gnucash" \
+      --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share/gsettings-schemas/${name}" \
+      --prefix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \
+      --prefix PERL5LIB ":" "$PERL5LIB" \
+      --prefix GIO_EXTRA_MODULES : "${stdenv.lib.getLib dconf}/lib/gio/modules"
+  '';
+
+  # TODO: The following tests FAILED:
+  #   61 - test-gnc-timezone (Failed)
+  #   70 - test-load-c (Failed)
+  #   71 - test-modsysver (Failed)
+  #   72 - test-incompatdep (Failed)
+  #   73 - test-agedver (Failed)
+  #   77 - test-gnc-module-swigged-c (Failed)
+  #   78 - test-gnc-module-load-deps (Failed)
+  #   80 - test-gnc-module-scm-module (Failed)
+  #   81 - test-gnc-module-scm-multi (Failed)
+  preCheck = ''
+    export LD_LIBRARY_PATH=$PWD/lib:$PWD/lib/gnucash:$PWD/lib/gnucash/test:$LD_LIBRARY_PATH
+    export NIX_CFLAGS_LINK="-lgtest -lgtest_main"
+  '';
+  doCheck = false;
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Personal and small-business financial-accounting application";
+
+    longDescription = ''
+      GnuCash is personal and small-business financial-accounting software,
+      freely licensed under the GNU GPL and available for GNU/Linux, BSD,
+      Solaris, macOS and Microsoft Windows.
+
+      Designed to be easy to use, yet powerful and flexible, GnuCash allows
+      you to track bank accounts, stocks, income and expenses.  As quick and
+      intuitive to use as a checkbook register, it is based on professional
+      accounting principles to ensure balanced books and accurate reports.
+    '';
+
+    license = stdenv.lib.licenses.gpl2Plus;
+
+    homepage = http://www.gnucash.org/;
+
+    maintainers = [ stdenv.lib.maintainers.peti stdenv.lib.maintainers.domenkozar ];
+    platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/gnumeric/default.nix b/nixpkgs/pkgs/applications/office/gnumeric/default.nix
new file mode 100644
index 000000000000..87aaf85d950c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/gnumeric/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, fetchurl, pkgconfig, intltool, perlPackages
+, goffice, gnome3, wrapGAppsHook, gtk3, bison, pythonPackages
+, itstool
+}:
+
+let
+  inherit (pythonPackages) python pygobject3;
+in stdenv.mkDerivation rec {
+  pname = "gnumeric";
+  version = "1.12.44";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "0147962c6ybdsj57rz95nla0rls7g545wc2n7pz59zmzyd5pksk0";
+  };
+
+  configureFlags = [ "--disable-component" ];
+
+  nativeBuildInputs = [ pkgconfig intltool bison itstool wrapGAppsHook ];
+
+  # ToDo: optional libgda, introspection?
+  buildInputs = [
+    goffice gtk3 gnome3.adwaita-icon-theme
+    python pygobject3
+  ] ++ (with perlPackages; [ perl XMLParser ]);
+
+  enableParallelBuilding = true;
+
+  passthru = {
+    updateScript = gnome3.updateScript {
+      packageName = pname;
+    };
+  };
+
+  meta = with stdenv.lib; {
+    description = "The GNOME Office Spreadsheet";
+    license = stdenv.lib.licenses.gpl2Plus;
+    homepage = http://projects.gnome.org/gnumeric/;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.vcunat ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/grisbi/default.nix b/nixpkgs/pkgs/applications/office/grisbi/default.nix
new file mode 100644
index 000000000000..f901123065fa
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/grisbi/default.nix
@@ -0,0 +1,32 @@
+{ fetchurl, stdenv, gtk, pkgconfig, libofx, intltool, wrapGAppsHook
+, hicolor-icon-theme, libsoup, gnome3 }:
+
+stdenv.mkDerivation rec {
+  name = "grisbi-${version}";
+  version = "1.0.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/grisbi/${name}.tar.bz2";
+    sha256 = "1rh2iqvi7lpz5l57vn7qk9azil3y1g65mfbi9hhbx956knh9bpf6";
+  };
+
+  nativeBuildInputs = [ pkgconfig wrapGAppsHook ];
+  buildInputs = [ gtk libofx intltool hicolor-icon-theme libsoup
+    gnome3.adwaita-icon-theme ];
+
+  meta = with stdenv.lib; {
+    description = "A personnal accounting application.";
+    longDescription = ''
+      Grisbi is an application written by French developers, so it perfectly
+      respects French accounting rules. Grisbi can manage multiple accounts,
+      currencies and users. It manages third party, expenditure and receipt
+      categories, budgetary lines, financial years, budget estimates, bankcard
+      management and other information that make Grisbi adapted for
+      associations.
+    '';
+    homepage = "http://grisbi.org";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ layus ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/homebank/default.nix b/nixpkgs/pkgs/applications/office/homebank/default.nix
new file mode 100644
index 000000000000..f93b7f42c68a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/homebank/default.nix
@@ -0,0 +1,22 @@
+{ fetchurl, stdenv, gtk, pkgconfig, libofx, intltool, wrapGAppsHook
+, hicolor-icon-theme, libsoup, gnome3 }:
+
+stdenv.mkDerivation rec {
+  name = "homebank-5.2.2";
+  src = fetchurl {
+    url = "http://homebank.free.fr/public/${name}.tar.gz";
+    sha256 = "19cm49p2x6nwia2yvwj3fv7jxbhw0vx4bs1zqbfvdr5vzwgj5j5c";
+  };
+
+  nativeBuildInputs = [ pkgconfig wrapGAppsHook ];
+  buildInputs = [ gtk libofx intltool hicolor-icon-theme libsoup
+    gnome3.adwaita-icon-theme ];
+
+  meta = with stdenv.lib; {
+    description = "Free, easy, personal accounting for everyone";
+    homepage = http://homebank.free.fr/;
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ pSub ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/ib/controller/default.nix b/nixpkgs/pkgs/applications/office/ib/controller/default.nix
new file mode 100644
index 000000000000..b39617e02db2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/ib/controller/default.nix
@@ -0,0 +1,162 @@
+{ stdenv, fetchurl, unzip, jdk, ib-tws, xpra }:
+
+stdenv.mkDerivation rec {
+  version = "2.14.0";
+  name = "ib-controller-${version}";
+
+  src = fetchurl {
+    url = "https://github.com/ib-controller/ib-controller/archive/${version}.tar.gz";
+    sha256 = "17a8bcgg9z3b4y38k035hm2lgvhmf8srlz59c7n2q3fdw2i95i68";
+  };
+
+  phases = [ "unpackPhase" "installPhase" ];
+
+  buildInputs = [ unzip jdk ib-tws ];
+
+  installPhase = ''
+    mkdir -p $out $out/bin $out/etc/ib/controller $out/share/IBController
+    cp resources/*.jar $out/share/IBController/.
+    cp resources/*.ini $out/etc/ib/controller/.
+    classpath=""
+    for jar in ${ib-tws}/share/IBJts/*.jar; do
+      classpath="$classpath:$jar"
+    done
+    for jar in $out/share/IBController/*.jar; do
+      classpath="$classpath:$jar"
+    done
+    # strings to use below; separated to avoid nix specific substitutions
+    javaOptions={JAVA_OPTIONS:--Xmx1024M}
+    ibProfileDir={IB_PROFILE_DIR:-~/IB/}
+    cat<<EOF > $out/bin/ib-tws-c
+    #!$SHELL
+    if [[ \$1 == /* ]] || [[ \$1 == ./* ]]; then
+      IB_USER_PROFILE=\`realpath \$1\`
+      IB_USER_PROFILE_TITLE=\`basename \$1\`
+    else
+      if [[ x\$1 != "x" ]] && [[ \$1 != -* ]]; then
+        IB_USER_PROFILE=\`realpath \$$ibProfileDir\$1\`
+        IB_USER_PROFILE_TITLE=\$1
+      else
+        echo "ERROR: \"\$1\" is not a valid name of a profile."
+        exit 1
+      fi
+    fi
+    shift
+    if [ ! -e \$IB_USER_PROFILE ]; then mkdir -p \$IB_USER_PROFILE; fi
+    if [ ! -d \$IB_USER_PROFILE ]; then echo "ERROR: \$IB_USER_PROFILE must be a directory!" && echo 1; fi
+    if [ ! -e \$IB_USER_PROFILE/jts.ini ]; then cp ${ib-tws}/etc/ib/tws/jts.ini \$IB_USER_PROFILE/. && chmod +w \$IB_USER_PROFILE/jts.ini; fi
+    if [ ! -e \$IB_USER_PROFILE/IBController.ini ]; then cp $out/etc/ib/controller/IBController.ini \$IB_USER_PROFILE/. && chmod +w \$IB_USER_PROFILE/IBController.ini; fi
+    if [[ \$1 == "-q" ]]; then
+      if [ -f \$IB_USER_PROFILE/xpra/run ]; then
+        ${xpra}/bin/xpra stop \`cat \$IB_USER_PROFILE/xpra/run\` --socket-dir=\$IB_USER_PROFILE/xpra/ &> /dev/null
+      fi
+      exit 0
+    fi
+    if [[ \$1 == "-d" ]] && [ ! -f \$IB_USER_PROFILE/xpra/run ]; then
+      ( sleep infinity ) &
+      WAIT_DUMMY_PID=\$!
+      ( trap "" INT;
+        DISPLAYNUM=100
+        while [ -f /tmp/.X\$DISPLAYNUM-lock ]; do DISPLAYNUM=\$((\$DISPLAYNUM + 1)); done
+        mkdir -p \$IB_USER_PROFILE/xpra
+        cd \$IB_USER_PROFILE
+        nohup ${xpra}/bin/xpra start :\$DISPLAYNUM \
+          --socket-dir=\$IB_USER_PROFILE/xpra/ \
+          --start-child="echo -n :\$DISPLAYNUM > \$IB_USER_PROFILE/xpra/run \
+                         && kill \$WAIT_DUMMY_PID &> /dev/null \
+                         && ${jdk}/bin/java -cp $classpath \$$javaOptions ibcontroller.IBController \$IB_USER_PROFILE/IBController.ini" \
+          --exit-with-children \
+          --no-pulseaudio \
+          --no-mdns \
+          --no-notification \
+          --no-daemon \
+          &> \$IB_USER_PROFILE/xpra/server.log
+        rm -f \$IB_USER_PROFILE/xpra/run
+        rm -f /tmp/.X\$DISPLAYNUM-lock
+      ) &
+      wait \$WAIT_DUMMY_PID
+      exit 0
+    fi
+    if [ -f \$IB_USER_PROFILE/xpra/run ]; then
+      ${xpra}/bin/xpra attach \`cat \$IB_USER_PROFILE/xpra/run\` --socket-dir=\$IB_USER_PROFILE/xpra/ \
+      --windows \
+      --no-speaker \
+      --no-microphone \
+      --no-tray \
+      --title="\$IB_USER_PROFILE_TITLE: @title@" \
+      &> \$IB_USER_PROFILE/xpra/client.log
+    fi
+    EOF
+    chmod u+x $out/bin/ib-tws-c
+    cat<<EOF > $out/bin/ib-gw-c
+    #!$SHELL
+    if [[ \$1 == /* ]] || [[ \$1 == ./* ]]; then
+      IB_USER_PROFILE=\`realpath \$1\`
+      IB_USER_PROFILE_TITLE=\`basename \$1\`
+    else
+      if [[ x\$1 != "x" ]] && [[ \$1 != -* ]]; then
+        IB_USER_PROFILE=\`realpath \$$ibProfileDir\$1\`
+        IB_USER_PROFILE_TITLE=\$1
+      else
+        echo "ERROR: \"\$1\" is not a valid name of a profile."
+        exit 1
+      fi
+    fi
+    shift
+    if [ ! -e \$IB_USER_PROFILE ]; then mkdir -p \$IB_USER_PROFILE; fi
+    if [ ! -d \$IB_USER_PROFILE ]; then echo "ERROR: \$IB_USER_PROFILE must be a directory!" && echo 1; fi
+    if [ ! -e \$IB_USER_PROFILE/jts.ini ]; then cp ${ib-tws}/etc/ib/tws/jts.ini \$IB_USER_PROFILE/. && chmod +w \$IB_USER_PROFILE/jts.ini; fi
+    if [ ! -e \$IB_USER_PROFILE/IBController.ini ]; then cp $out/etc/ib/controller/IBController.ini \$IB_USER_PROFILE/. && chmod +w \$IB_USER_PROFILE/IBController.ini; fi
+    if [[ \$1 == "-q" ]]; then
+      if [ -f \$IB_USER_PROFILE/xpra/run ]; then
+        ${xpra}/bin/xpra stop \`cat \$IB_USER_PROFILE/xpra/run\` --socket-dir=\$IB_USER_PROFILE/xpra/ &> /dev/null
+      fi
+      exit 0
+    fi
+    if [[ \$1 == "-d" ]] && [ ! -f \$IB_USER_PROFILE/xpra/run ]; then
+      ( sleep infinity ) &
+      WAIT_DUMMY_PID=\$!
+      ( trap "" INT;
+        DISPLAYNUM=100
+        while [ -f /tmp/.X\$DISPLAYNUM-lock ]; do DISPLAYNUM=\$((\$DISPLAYNUM + 1)); done
+        mkdir -p \$IB_USER_PROFILE/xpra
+        cd \$IB_USER_PROFILE
+        nohup ${xpra}/bin/xpra start :\$DISPLAYNUM \
+          --socket-dir=\$IB_USER_PROFILE/xpra/ \
+          --start-child="echo -n :\$DISPLAYNUM > \$IB_USER_PROFILE/xpra/run \
+                         && kill \$WAIT_DUMMY_PID &> /dev/null \
+                         && ${jdk}/bin/java -cp $classpath \$$javaOptions ibcontroller.IBGatewayController \$IB_USER_PROFILE/IBController.ini" \
+          --exit-with-children \
+          --no-pulseaudio \
+          --no-mdns \
+          --no-notification \
+          --no-daemon \
+          &> \$IB_USER_PROFILE/xpra/server.log
+        rm -f \$IB_USER_PROFILE/xpra/run
+        rm -f /tmp/.X\$DISPLAYNUM-lock
+      ) &
+      wait \$WAIT_DUMMY_PID
+      exit 0
+    fi
+    if [ -f \$IB_USER_PROFILE/xpra/run ]; then
+      ${xpra}/bin/xpra attach \`cat \$IB_USER_PROFILE/xpra/run\` --socket-dir=\$IB_USER_PROFILE/xpra/ \
+      --windows \
+      --no-speaker \
+      --no-microphone \
+      --no-tray \
+      --title="\$IB_USER_PROFILE_TITLE: @title@" \
+      &> \$IB_USER_PROFILE/xpra/client.log
+    fi
+    EOF
+    chmod u+x $out/bin/ib-gw-c
+    '';
+
+
+  meta = with stdenv.lib; {
+    description = "Automation Controller for the Trader Work Station of Interactive Brokers";
+    homepage = https://github.com/ib-controller/ib-controller;
+    license = licenses.gpl3;
+    maintainers = [ maintainers.tstrobel ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/ib/tws/default.nix b/nixpkgs/pkgs/applications/office/ib/tws/default.nix
new file mode 100644
index 000000000000..59ecb5a5c3b7
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/ib/tws/default.nix
@@ -0,0 +1,96 @@
+{ stdenv, requireFile, jdk }:
+
+stdenv.mkDerivation rec {
+  version = "9542";
+  name = "ib-tws-${version}";
+
+  src = requireFile rec {
+    name = "ibtws_${version}.jar";
+    message = ''
+      This nix expression requires that ${name} is already part of the store.
+      Download the TWS from
+      https://download2.interactivebrokers.com/download/unixmacosx_latest.jar,
+      rename the file to ${name}, and add it to the nix store with
+      "nix-prefetch-url file://\$PWD/${name}".
+    '';
+    sha256 = "1a2jiwwnr5g3xfba1a89c257bdbnq4zglri8hz021vk7f6s4rlrf";
+  };
+
+  phases = [ "unpackPhase" "buildPhase" "installPhase" ];
+
+  buildInputs = [ jdk ];
+
+  buildPhase = ''
+    jar -xf IBJts/jts.jar
+    cp trader/common/images/ibapp_icon.gif ibtws_icon.gif
+    '';
+
+  unpackPhase = ''
+    jar xf ${src}
+    '';
+
+  installPhase = ''
+    mkdir -p $out $out/bin $out/etc/ib/tws $out/share/IBJts $out/share/icons
+    cp IBJts/*.jar $out/share/IBJts/.
+    cp IBJts/*.ini $out/etc/ib/tws/.
+    cp ibtws_icon.gif $out/share/icons/.
+    classpath=""
+    for jar in $out/share/IBJts/*.jar; do
+      classpath="$classpath:$jar"
+    done
+    # strings to use below; separated to avoid nix specific substitutions
+    javaOptions={JAVA_OPTIONS:-'-Xmx1024M -Dawt.useSystemAAFontSettings=lcd -Dsun.java2d.xrender=True -Dsun.java2d.opengl=False'}
+    # OTHER JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java
+    ibProfileDir={IB_PROFILE_DIR:-~/IB/}
+    cat<<EOF > $out/bin/ib-tws
+    #!$SHELL
+    if [[ \$1 == /* ]] || [[ \$1 == ./* ]]; then
+      IB_USER_PROFILE=\`realpath \$1\`
+      IB_USER_PROFILE_TITLE=\`basename \$1\`
+    else
+      if [[ x\$1 != "x" ]] && [[ \$1 != -* ]]; then
+        IB_USER_PROFILE=\`realpath \$$ibProfileDir\$1\`
+        IB_USER_PROFILE_TITLE=\$1
+      else
+        echo "ERROR: \"\$1\" is not a valid name of a profile."
+        exit 1
+      fi
+    fi
+    shift
+    if [ ! -e \$IB_USER_PROFILE ]; then mkdir -p \$IB_USER_PROFILE; fi
+    if [ ! -d \$IB_USER_PROFILE ]; then echo "ERROR: \$IB_USER_PROFILE must be a directory!" && echo 1; fi
+    if [ ! -e \$IB_USER_PROFILE/jts.ini ]; then cp $out/etc/ib/tws/jts.ini \$IB_USER_PROFILE/. && chmod +w \$IB_USER_PROFILE/jts.ini; fi
+    ${jdk}/bin/java -cp $classpath \$$javaOptions jclient.LoginFrame \$IB_USER_PROFILE
+    EOF
+    chmod u+x $out/bin/ib-tws
+    cat<<EOF > $out/bin/ib-gw
+    #!$SHELL
+    if [[ \$1 == /* ]] || [[ \$1 == ./* ]]; then
+      IB_USER_PROFILE=\`realpath \$1\`
+      IB_USER_PROFILE_TITLE=\`basename \$1\`
+    else
+      if [[ x\$1 != "x" ]] && [[ \$1 != -* ]]; then
+        IB_USER_PROFILE=\`realpath \$$ibProfileDir\$1\`
+        IB_USER_PROFILE_TITLE=\$1
+      else
+        echo "ERROR: \"\$1\" is not a valid name of a profile."
+        exit 1
+      fi
+    fi
+    shift
+    if [ ! -e \$IB_USER_PROFILE ]; then mkdir -p \$IB_USER_PROFILE; fi
+    if [ ! -d \$IB_USER_PROFILE ]; then echo "ERROR: \$IB_USER_PROFILE must be a directory!" && echo 1; fi
+    if [ ! -e \$IB_USER_PROFILE/jts.ini ]; then cp $out/etc/ib/tws/jts.ini \$IB_USER_PROFILE/. && chmod +w \$IB_USER_PROFILE/jts.ini; fi
+    ${jdk}/bin/java -cp $classpath -Dsun.java2d.noddraw=true \$$javaOptions ibgateway.GWClient \$IB_USER_PROFILE
+    EOF
+    chmod u+x $out/bin/ib-gw
+    '';
+
+  meta = with stdenv.lib; {
+    description = "Trader Work Station of Interactive Brokers";
+    homepage = https://www.interactivebrokers.com;
+    license = licenses.unfree;
+    maintainers = [ maintainers.tstrobel ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/impressive/default.nix b/nixpkgs/pkgs/applications/office/impressive/default.nix
new file mode 100644
index 000000000000..8946bbab9316
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/impressive/default.nix
@@ -0,0 +1,68 @@
+{ fetchurl, stdenv, python2, makeWrapper, lib
+, SDL, ghostscript, pdftk, dejavu_fonts }:
+
+let
+  version = "0.12.0";
+  pythonEnv = python2.withPackages (ps: with ps; [pyopengl pygame pillow]);
+in stdenv.mkDerivation {
+    # This project was formerly known as KeyJNote.
+    # See http://keyj.emphy.de/apple-lawsuit/ for details.
+
+    name = "impressive-${version}";
+
+    src = fetchurl {
+      url = "mirror://sourceforge/impressive/Impressive-${version}.tar.gz";
+      sha256 = "0zaqq3yvd296mfr5bxpj2hqlk7vrb0rsbgd4dc1l5ag46giqvivx";
+    };
+
+    buildInputs = [ makeWrapper pythonEnv ];
+
+    configurePhase = ''
+      # Let's fail at build time if the library we're substituting in doesn't
+      # exist/isn't marked as executable
+      test -x ${SDL}/lib/libSDL.so
+      sed -i "impressive.py" \
+          -e '/^__website__/a SDL_LIBRARY = "${SDL}/lib/libSDL.so"' \
+          -e 's/sdl = CDLL.*/sdl = CDLL(SDL_LIBRARY)/' \
+          -e 's^FontPath =.*/usr/.*$^FontPath = ["${dejavu_fonts}/share/fonts", ""]^'
+    '';
+
+    installPhase = ''
+      mkdir -p "$out/bin" "$out/share/doc/impressive" "$out/share/man/man1"
+      mv impressive.py "$out/bin/impressive"
+      mv impressive.1 "$out/share/man/man1"
+      mv changelog.txt impressive.html license.txt "$out/share/doc/impressive"
+
+      wrapProgram "$out/bin/impressive" \
+         --prefix PATH ":" "${ghostscript}/bin:${pdftk}/bin"
+    '';
+
+    meta = {
+      description = "Impressive, an effect-rich presentation tool for PDFs";
+
+      longDescription = ''
+        Impressive is a program that displays presentation slides.
+        But unlike OpenOffice.org Impress or other similar
+        applications, it does so with style.  Smooth alpha-blended
+        slide transitions are provided for the sake of eye candy, but
+        in addition to this, Impressive offers some unique tools that
+        are really useful for presentations.  Read below if you want
+        to know more about these features.
+
+        Creating presentations for Impressive is very simple: You just
+        need to export a PDF file from your presentation software.
+        This means that you can create slides in the application of
+        your choice and use Impressive for displaying them.  If your
+        application does not support PDF output, you can alternatively
+        use a set of pre-rendered image files – or you use Impressive
+        to make a slideshow with your favorite photos.
+      '';
+
+      homepage = http://impressive.sourceforge.net/;
+
+      license = stdenv.lib.licenses.gpl2;
+
+      maintainers = with lib.maintainers; [ lheckemann ];
+      platforms = stdenv.lib.platforms.mesaPlatforms;
+    };
+  }
diff --git a/nixpkgs/pkgs/applications/office/jabref/default.nix b/nixpkgs/pkgs/applications/office/jabref/default.nix
new file mode 100644
index 000000000000..5dfd03570121
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/jabref/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, fetchurl, makeWrapper, makeDesktopItem, jdk, jre, wrapGAppsHook, gtk3, gsettings-desktop-schemas }:
+
+stdenv.mkDerivation rec {
+  version = "3.8.1";
+  name = "jabref-${version}";
+
+  src = fetchurl {
+    url = "https://github.com/JabRef/jabref/releases/download/v${version}/JabRef-${version}.jar";
+    sha256 = "11asfym74zdq46i217z5n6vc79gylcx8xn7nvwacfqmym0bz79cg";
+  };
+
+  desktopItem = makeDesktopItem {
+    comment =  meta.description;
+    name = "jabref";
+    desktopName = "JabRef";
+    genericName = "Bibliography manager";
+    categories = "Application;Office;";
+    icon = "jabref";
+    exec = "jabref";
+  };
+
+  buildInputs = [ makeWrapper jdk wrapGAppsHook gtk3 gsettings-desktop-schemas ];
+
+  unpackPhase = "#";
+
+  installPhase = ''
+    mkdir -p $out/bin $out/share/java $out/share/icons
+
+    cp -r ${desktopItem}/share/applications $out/share/
+
+    jar xf $src images/icons/JabRef-icon-mac.svg
+    cp images/icons/JabRef-icon-mac.svg $out/share/icons/jabref.svg
+
+    ln -s $src $out/share/java/jabref-${version}.jar
+    makeWrapper ${jre}/bin/java $out/bin/jabref \
+      --add-flags "-jar $out/share/java/jabref-${version}.jar"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Open source bibliography reference manager";
+    homepage = http://jabref.sourceforge.net;
+    license = licenses.gpl2;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.gebner ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/jameica/default.nix b/nixpkgs/pkgs/applications/office/jameica/default.nix
new file mode 100644
index 000000000000..61cc3ea78f05
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/jameica/default.nix
@@ -0,0 +1,75 @@
+{ stdenv, fetchFromGitHub, makeDesktopItem, makeWrapper, ant, jdk, jre, gtk2, glib, xorg, Cocoa }:
+
+let
+  _version = "2.8.2";
+  _build = "450";
+  version = "${_version}-${_build}";
+  name = "jameica-${version}";
+
+  swtSystem = if stdenv.hostPlatform.system == "i686-linux" then "linux"
+  else if stdenv.hostPlatform.system == "x86_64-linux" then "linux64"
+  else if stdenv.hostPlatform.system == "x86_64-darwin" then "macos64"
+  else throw "Unsupported system: ${stdenv.hostPlatform.system}";
+
+  desktopItem = makeDesktopItem {
+    name = "jameica";
+    exec = "jameica";
+    comment = "Free Runtime Environment for Java Applications.";
+    desktopName = "Jameica";
+    genericName = "Jameica";
+    categories = "Application;Office;";
+  };
+in
+stdenv.mkDerivation rec {
+  inherit name version;
+
+  nativeBuildInputs = [ ant jdk makeWrapper ];
+  buildInputs = stdenv.lib.optionals stdenv.isLinux [ gtk2 glib xorg.libXtst ]
+                ++ stdenv.lib.optional stdenv.isDarwin Cocoa;
+
+  src = fetchFromGitHub {
+    owner = "willuhn";
+    repo = "jameica";
+    rev = "V_${builtins.replaceStrings ["."] ["_"] _version}_BUILD_${_build}";
+    sha256 = "197n35lvx51k6cbp3fhndvfb38sikl4mjqcd42fgvn2khy2sij68";
+  };
+
+  # there is also a build.gradle, but it only seems to be used to vendor 3rd party libraries
+  # and is not able to build the application itself
+  buildPhase = ''
+    (cd build; ant -Dsystem.version=${version} init compile jar)
+  '';
+
+  installPhase = ''
+    mkdir -p $out/libexec $out/lib $out/bin $out/share/{applications,${name},java}/
+
+    # copy libraries except SWT
+    cp $(find lib -type f -iname '*.jar' | grep -ve 'swt/.*/swt.jar') $out/share/${name}/
+    # copy platform-specific SWT
+    cp lib/swt/${swtSystem}/swt.jar $out/share/${name}/
+
+    install -Dm644 releases/${_version}-*/jameica/jameica.jar $out/share/java/
+    install -Dm644 plugin.xml $out/share/java/
+    install -Dm644 build/jameica-icon.png $out/share/pixmaps/jameica.png
+    cp ${desktopItem}/share/applications/* $out/share/applications/
+
+    makeWrapper ${jre}/bin/java $out/bin/jameica \
+      --add-flags "-cp $out/share/java/jameica.jar:$out/share/${name}/* ${
+        stdenv.lib.optionalString stdenv.isDarwin ''-Xdock:name="Jameica" -XstartOnFirstThread''
+      } de.willuhn.jameica.Main" \
+      --prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath buildInputs} \
+      --run "cd $out/share/java/"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://www.willuhn.de/products/jameica/;
+    description = "Free Runtime Environment for Java Applications";
+    longDescription = ''
+      Runtime Environment for plugins like Hibiscus (HBCI Online Banking),
+      SynTAX (accounting) and JVerein (club management).
+    '';
+    license = licenses.gpl2Plus;
+    platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
+    maintainers = with maintainers; [ flokli ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/keepnote/default.nix b/nixpkgs/pkgs/applications/office/keepnote/default.nix
new file mode 100644
index 000000000000..2e0b3f3fed7d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/keepnote/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchurl, python2Packages }:
+
+python2Packages.buildPythonApplication {
+  name = "keepnote-0.7.8";
+  namePrefix = "";
+
+  src = fetchurl {
+    url = "http://keepnote.org/download/keepnote-0.7.8.tar.gz";
+    sha256 = "0nhkkv1n0lqf3zn17pxg5cgryv1wwlj4hfmhixwd76rcy8gs45dh";
+  };
+
+  propagatedBuildInputs = with python2Packages; [ pyGtkGlade ];
+
+  # Testing fails.
+  doCheck = false;
+
+  meta = {
+    description = "Note taking application";
+    homepage = http://keepnote.org;
+    license = stdenv.lib.licenses.gpl2Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/kexi/default.nix b/nixpkgs/pkgs/applications/office/kexi/default.nix
new file mode 100644
index 000000000000..66fde2497e3f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/kexi/default.nix
@@ -0,0 +1,54 @@
+{
+  mkDerivation, lib, fetchurl, fetchpatch, extra-cmake-modules, kdoctools,
+  boost, qttools, qtwebkit,
+  breeze-icons, karchive, kcodecs, kcompletion, kconfig, kconfigwidgets, kcoreaddons,
+  kcrash, kguiaddons, ki18n, kiconthemes, kitemviews, kio, ktexteditor, ktextwidgets,
+  kwidgetsaddons, kxmlgui,
+  kdb, kproperty, kreport, lcms2, mysql, marble, postgresql
+}:
+
+mkDerivation rec {
+  pname = "kexi";
+  version = "3.1.0";
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "mirror://kde/stable/${pname}/src/${name}.tar.xz";
+    sha256 = "1ysj44qq75wglw4d080l3gfw47695gapf29scxhb1g3py55csmbd";
+  };
+
+  nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+
+  buildInputs = [
+    boost qttools qtwebkit
+    breeze-icons karchive kcodecs kcompletion kconfig kconfigwidgets kcoreaddons
+    kcrash kguiaddons ki18n kiconthemes kitemviews kio ktexteditor ktextwidgets
+    kwidgetsaddons kxmlgui
+    kdb kproperty kreport lcms2 mysql.connector-c marble postgresql
+  ];
+
+  propagatedUserEnvPkgs = [ kproperty ];
+
+  patches = [
+    (fetchpatch {
+      url = "https://phabricator.kde.org/file/data/6iwzltiifyqwjnzbvyo6/PHID-FILE-li4a7j35wkdkm2qdtnp4/D11503.diff";
+      sha256 = "0yj717m4x1zb4xjy1ayhz78xkxpawxgsvjgvf5iw81jnlr8absq9";
+    })
+  ];
+
+  meta = with lib; {
+    description = "A open source visual database applications creator, a long-awaited competitor for programs like MS Access or Filemaker";
+    longDescription = ''
+      Kexi is a visual database applications creator.
+      It can be used for creating database schemas,
+      inserting data, performing queries, and processing data.
+      Forms can be created to provide a custom interface to your data.
+      All database objects - tables, queries and forms - are stored in the database,
+      making it easy to share data and design.
+    '';
+    homepage = http://kexi-project.org/;
+    maintainers = with maintainers; [ zraexy ];
+    platforms = platforms.linux;
+    license = with licenses; [ gpl2 lgpl2 ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/kmymoney/default.nix b/nixpkgs/pkgs/applications/office/kmymoney/default.nix
new file mode 100644
index 000000000000..4a91840077ce
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/kmymoney/default.nix
@@ -0,0 +1,79 @@
+{ stdenv, lib, fetchurl, doxygen, extra-cmake-modules, graphviz, kdoctools
+, fetchpatch
+
+, akonadi, alkimia, aqbanking, gmp, gwenhywfar, kactivities, karchive
+, kcmutils, kcontacts, kdewebkit, kdiagram, kholidays, kidentitymanagement
+, kitemmodels, libical, libofx, qgpgme
+
+# Needed for running tests:
+, qtbase, xvfb_run
+
+# For weboob, which only supports Python 2.x:
+, python2Packages
+}:
+
+stdenv.mkDerivation rec {
+  name = "kmymoney-${version}";
+  version = "5.0.1";
+
+  src = fetchurl {
+    url = "mirror://kde/stable/kmymoney/${version}/src/${name}.tar.xz";
+    sha256 = "1c9apnvc07y17pzy4vygry1dai5ass2z7j354lrcppa85b18yvnx";
+  };
+
+  # Fix build with Qt 5.11.
+  patches = lib.singleton (fetchpatch {
+    url = "https://cgit.kde.org/kmymoney.git/patch/?id="
+        + "e5198a902996b27bf9abde0ad24af82d55ab5dc1";
+    sha256 = "1h2f1xznf7343s26fh94x8n2ci0pijk5j86f24lvghawsw848316";
+  });
+
+  # Hidden dependency that wasn't included in CMakeLists.txt:
+  NIX_CFLAGS_COMPILE = "-I${kitemmodels.dev}/include/KF5";
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [
+    doxygen extra-cmake-modules graphviz kdoctools python2Packages.wrapPython
+  ];
+
+  buildInputs = [
+    akonadi alkimia aqbanking gmp gwenhywfar kactivities karchive kcmutils
+    kcontacts kdewebkit kdiagram kholidays kidentitymanagement kitemmodels
+    libical libofx qgpgme
+
+    # Put it into buildInputs so that CMake can find it, even though we patch
+    # it into the interface later.
+    python2Packages.weboob
+  ];
+
+  weboobPythonPath = [ python2Packages.weboob ];
+
+  postInstall = ''
+    buildPythonPath "$weboobPythonPath"
+    patchPythonScript "$out/share/kmymoney/weboob/kmymoneyweboob.py"
+
+    # Within the embedded Python interpreter, sys.argv is unavailable, so let's
+    # assign it to a dummy value so that the assignment of sys.argv[0] injected
+    # by patchPythonScript doesn't fail:
+    sed -i -e '1i import sys; sys.argv = [""]' \
+      "$out/share/kmymoney/weboob/kmymoneyweboob.py"
+  '';
+
+  doInstallCheck = stdenv.hostPlatform == stdenv.buildPlatform;
+  installCheckInputs = [ xvfb_run ];
+  installCheckPhase = let
+    pluginPath = "${qtbase.bin}/${qtbase.qtPluginPrefix}";
+  in lib.optionalString doInstallCheck ''
+    QT_PLUGIN_PATH=${lib.escapeShellArg pluginPath} \
+      xvfb-run -s '-screen 0 1024x768x24' make test \
+      ARGS="-E '(reports-chart-test)'" # Test fails, so exclude it for now.
+  '';
+
+  meta = {
+    description = "Personal finance manager for KDE";
+    homepage = https://kmymoney.org/;
+    platforms = lib.platforms.linux;
+    license = lib.licenses.gpl2Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/ledger-autosync/default.nix b/nixpkgs/pkgs/applications/office/ledger-autosync/default.nix
new file mode 100644
index 000000000000..4c126fc2f919
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/ledger-autosync/default.nix
@@ -0,0 +1,51 @@
+{ stdenv, python3Packages, fetchFromGitHub, ledger, hledger, useLedger ? true, useHledger ? true }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "ledger-autosync";
+  version = "1.0.0";
+
+# no tests included in PyPI tarball
+  src = fetchFromGitHub {
+    owner = "egh";
+    repo = "ledger-autosync";
+    rev = "v${version}";
+    sha256 = "1fn32c02idccdmf9906pxn248qc9basjy2kr2g600806k3qvw84a";
+  };
+
+  propagatedBuildInputs = with python3Packages; [
+    asn1crypto
+    beautifulsoup4
+    cffi
+    cryptography
+    entrypoints
+    fuzzywuzzy
+    idna
+    jeepney
+    keyring
+    lxml
+    mock
+    nose
+    ofxclient
+    ofxhome
+    ofxparse
+    pbr
+    pycparser
+    secretstorage
+    six
+  ] ++ stdenv.lib.optional useLedger ledger
+    ++ stdenv.lib.optional useHledger hledger;
+
+  # Checks require ledger as a python package,
+  # ledger does not support python3 while ledger-autosync requires it.
+  checkInputs = with python3Packages; [ ledger hledger nose mock ];
+  checkPhase = ''
+    nosetests -a generic -a ledger -a hledger
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/egh/ledger-autosync;
+    description = "OFX/CSV autosync for ledger and hledger";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ eamsden ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/ledger-web/Gemfile b/nixpkgs/pkgs/applications/office/ledger-web/Gemfile
new file mode 100644
index 000000000000..77e8024da3a3
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/ledger-web/Gemfile
@@ -0,0 +1,3 @@
+source 'https://rubygems.org'
+
+gem 'ledger_web'
diff --git a/nixpkgs/pkgs/applications/office/ledger-web/Gemfile.lock b/nixpkgs/pkgs/applications/office/ledger-web/Gemfile.lock
new file mode 100644
index 000000000000..290adb0e8e3d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/ledger-web/Gemfile.lock
@@ -0,0 +1,61 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    backports (3.6.8)
+    database_cleaner (1.5.3)
+    diff-lcs (1.2.5)
+    directory_watcher (1.5.1)
+    ledger_web (1.5.2)
+      database_cleaner
+      directory_watcher (~> 1.5.1)
+      pg
+      rack (>= 1.3.6)
+      rspec
+      sequel
+      sinatra
+      sinatra-contrib
+      sinatra-session
+    multi_json (1.12.1)
+    pg (0.18.4)
+    rack (1.6.11)
+    rack-protection (1.5.3)
+      rack
+    rack-test (0.6.3)
+      rack (>= 1.0)
+    rspec (3.5.0)
+      rspec-core (~> 3.5.0)
+      rspec-expectations (~> 3.5.0)
+      rspec-mocks (~> 3.5.0)
+    rspec-core (3.5.2)
+      rspec-support (~> 3.5.0)
+    rspec-expectations (3.5.0)
+      diff-lcs (>= 1.2.0, < 2.0)
+      rspec-support (~> 3.5.0)
+    rspec-mocks (3.5.0)
+      diff-lcs (>= 1.2.0, < 2.0)
+      rspec-support (~> 3.5.0)
+    rspec-support (3.5.0)
+    sequel (4.37.0)
+    sinatra (1.4.7)
+      rack (~> 1.5)
+      rack-protection (~> 1.4)
+      tilt (>= 1.3, < 3)
+    sinatra-contrib (1.4.7)
+      backports (>= 2.0)
+      multi_json
+      rack-protection
+      rack-test
+      sinatra (~> 1.4.0)
+      tilt (>= 1.3, < 3)
+    sinatra-session (1.0.0)
+      sinatra (>= 1.0)
+    tilt (2.0.5)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  ledger_web
+
+BUNDLED WITH
+   1.16.4
diff --git a/nixpkgs/pkgs/applications/office/ledger-web/default.nix b/nixpkgs/pkgs/applications/office/ledger-web/default.nix
new file mode 100644
index 000000000000..6f571bd2a1b0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/ledger-web/default.nix
@@ -0,0 +1,23 @@
+{ lib, bundlerEnv, ruby
+, withPostgresql ? true, postgresql
+, withSqlite ? false, sqlite
+}:
+
+bundlerEnv rec {
+  name = "ledger-web-${version}";
+
+  version = (import ./gemset.nix).ledger_web.version;
+  inherit ruby;
+  gemdir = ./.;
+
+  buildInputs =    lib.optional withPostgresql postgresql
+                ++ lib.optional withSqlite sqlite;
+
+  meta = with lib; {
+    description = "A web frontend to the Ledger CLI tool";
+    homepage = https://github.com/peterkeen/ledger-web;
+    license = licenses.mit;
+    maintainers = with maintainers; [ peterhoeg ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/ledger-web/gemset.nix b/nixpkgs/pkgs/applications/office/ledger-web/gemset.nix
new file mode 100644
index 000000000000..acd1bed25a08
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/ledger-web/gemset.nix
@@ -0,0 +1,172 @@
+{
+  backports = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1zcgqw7m7jb8n7b2jwla5cq0nw9wsgddxfmn0a9v89ihzd4i1a5k";
+      type = "gem";
+    };
+    version = "3.6.8";
+  };
+  database_cleaner = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0fx6zmqznklmkbjl6f713jyl11d4g9q220rcl86m2jp82r8kfwjj";
+      type = "gem";
+    };
+    version = "1.5.3";
+  };
+  diff-lcs = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1vf9civd41bnqi6brr5d9jifdw73j9khc6fkhfl1f8r9cpkdvlx1";
+      type = "gem";
+    };
+    version = "1.2.5";
+  };
+  directory_watcher = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0fwc2shba7vks262ind74y3g76qp7znjq5q8b2dvza0yidgywhcq";
+      type = "gem";
+    };
+    version = "1.5.1";
+  };
+  ledger_web = {
+    dependencies = ["database_cleaner" "directory_watcher" "pg" "rack" "rspec" "sequel" "sinatra" "sinatra-contrib" "sinatra-session"];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0i4vagaiyayymlr41rsy4lg2cl1r011ib0ql9dgjadfy6imb4kqh";
+      type = "gem";
+    };
+    version = "1.5.2";
+  };
+  multi_json = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1wpc23ls6v2xbk3l1qncsbz16npvmw8p0b38l8czdzri18mp51xk";
+      type = "gem";
+    };
+    version = "1.12.1";
+  };
+  pg = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "07dv4ma9xd75xpsnnwwg1yrpwpji7ydy0q1d9dl0yfqbzpidrw32";
+      type = "gem";
+    };
+    version = "0.18.4";
+  };
+  rack = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1g9926ln2lw12lfxm4ylq1h6nl0rafl10za3xvjzc87qvnqic87f";
+      type = "gem";
+    };
+    version = "1.6.11";
+  };
+  rack-protection = {
+    dependencies = ["rack"];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0cvb21zz7p9wy23wdav63z5qzfn4nialik22yqp6gihkgfqqrh5r";
+      type = "gem";
+    };
+    version = "1.5.3";
+  };
+  rack-test = {
+    dependencies = ["rack"];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0h6x5jq24makgv2fq5qqgjlrk74dxfy62jif9blk43llw8ib2q7z";
+      type = "gem";
+    };
+    version = "0.6.3";
+  };
+  rspec = {
+    dependencies = ["rspec-core" "rspec-expectations" "rspec-mocks"];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "16g3mmih999f0b6vcz2c3qsc7ks5zy4lj1rzjh8hf6wk531nvc6s";
+      type = "gem";
+    };
+    version = "3.5.0";
+  };
+  rspec-core = {
+    dependencies = ["rspec-support"];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "12yndf7y6g3s1306bv1aycsmd0gjy5m172spdhx54svca2fcpzy1";
+      type = "gem";
+    };
+    version = "3.5.2";
+  };
+  rspec-expectations = {
+    dependencies = ["diff-lcs" "rspec-support"];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0bbqfrb1x8gmwf8x2xhhwvvlhwbbafq4isbvlibxi6jk602f09gs";
+      type = "gem";
+    };
+    version = "3.5.0";
+  };
+  rspec-mocks = {
+    dependencies = ["diff-lcs" "rspec-support"];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0nl3ksivh9wwrjjd47z5dggrwx40v6gpb3a0gzbp1gs06a5dmk24";
+      type = "gem";
+    };
+    version = "3.5.0";
+  };
+  rspec-support = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "10vf3k3d472y573mag2kzfsfrf6rv355s13kadnpryk8d36yq5r0";
+      type = "gem";
+    };
+    version = "3.5.0";
+  };
+  sequel = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "11vdpr3r4dwhcan16gs4gjm2k21y9qz7ri5w2zz54pmnxp499cjw";
+      type = "gem";
+    };
+    version = "4.37.0";
+  };
+  sinatra = {
+    dependencies = ["rack" "rack-protection" "tilt"];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1b81kbr65mmcl9cdq2r6yc16wklyp798rxkgmm5pr9fvsj7jwmxp";
+      type = "gem";
+    };
+    version = "1.4.7";
+  };
+  sinatra-contrib = {
+    dependencies = ["backports" "multi_json" "rack-protection" "rack-test" "sinatra" "tilt"];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0vi3i0icbi2figiayxpvxbqpbn1syma7w4p4zw5mav1ln4c7jnfr";
+      type = "gem";
+    };
+    version = "1.4.7";
+  };
+  sinatra-session = {
+    dependencies = ["sinatra"];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "183xl8i4d2hc03afd1i52gwn2xi3vzrv02g22llhfy5wkmm44gmq";
+      type = "gem";
+    };
+    version = "1.0.0";
+  };
+  tilt = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0lgk8bfx24959yq1cn55php3321wddw947mgj07bxfnwyipy9hqf";
+      type = "gem";
+    };
+    version = "2.0.5";
+  };
+}
\ No newline at end of file
diff --git a/nixpkgs/pkgs/applications/office/ledger/2.6.3.nix b/nixpkgs/pkgs/applications/office/ledger/2.6.3.nix
new file mode 100644
index 000000000000..49b258c43fdb
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/ledger/2.6.3.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchurl, emacs, gmp, pcre, expat }:
+
+stdenv.mkDerivation rec {
+  name = "ledger2-2.6.3";
+
+  src = fetchurl {
+    url = "https://github.com/downloads/ledger/ledger/${name}.tar.gz";
+    sha256 = "05zpnypcwgck7lwk00pbdlcwa347xsqifxh4zsbbn01m98bx1v5k";
+  };
+
+  buildInputs = [ emacs gmp pcre expat ];
+
+  configureFlags = [
+    "CPPFLAGS=-DNDEBUG"
+    "CFLAGS=-O3"
+    "CXXFLAGS=-O3"
+  ];
+
+  doCheck = true;
+
+  # Patchelf breaks the hard-coded rpath to ledger's libamounts.0.so and
+  # libledger-2.6.3.so. Fortunately, libtool chooses proper rpaths to
+  # begin with, so we can just disable patchelf to avoid the issue.
+  dontPatchELF = true;
+
+  meta = {
+    homepage = http://ledger-cli.org/;
+    description = "A double-entry accounting system with a command-line reporting interface";
+    license = "BSD";
+
+    longDescription = ''
+      Ledger is a powerful, double-entry accounting system that is accessed
+      from the UNIX command-line. This may put off some users, as there is
+      no flashy UI, but for those who want unparalleled reporting access to
+      their data, there really is no alternative.
+    '';
+
+    platforms = stdenv.lib.platforms.all;
+    broken = true; # https://hydra.nixos.org/build/59124559/nixlog/1
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/ledger/default.nix b/nixpkgs/pkgs/applications/office/ledger/default.nix
new file mode 100644
index 000000000000..643d9ed894fd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/ledger/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, fetchFromGitHub, cmake, boost, gmp, mpfr, libedit, python
+, texinfo, gnused, usePython ? true }:
+
+stdenv.mkDerivation rec {
+  name = "ledger-${version}";
+  version = "3.1.2";
+
+  src = fetchFromGitHub {
+    owner  = "ledger";
+    repo   = "ledger";
+    rev    = version;
+    sha256 = "0hwnipj2m9p95hhyv6kyq54m27g14r58gnsy2my883kxhpcyb2vc";
+  };
+
+  buildInputs = [
+    (boost.override { enablePython = usePython; })
+    gmp mpfr libedit python texinfo gnused
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  enableParallelBuilding = true;
+
+  cmakeFlags = [
+    "-DCMAKE_INSTALL_LIBDIR=lib"
+    "-DBUILD_DOCS:BOOL=ON"
+    (stdenv.lib.optionalString usePython "-DUSE_PYTHON=true")
+   ];
+
+  postBuild = ''
+    make doc
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://ledger-cli.org/;
+    description = "A double-entry accounting system with a command-line reporting interface";
+    license = licenses.bsd3;
+
+    longDescription = ''
+      Ledger is a powerful, double-entry accounting system that is accessed
+      from the UNIX command-line. This may put off some users, as there is
+      no flashy UI, but for those who want unparalleled reporting access to
+      their data, there really is no alternative.
+    '';
+
+    platforms = platforms.all;
+    maintainers = with maintainers; [ the-kenny jwiegley ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/libreoffice/README.md b/nixpkgs/pkgs/applications/office/libreoffice/README.md
new file mode 100644
index 000000000000..eb21fe2f441e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/libreoffice/README.md
@@ -0,0 +1,10 @@
+LibreOffice
+===========
+
+To generate `libreoffice-srcs.nix`:
+
+    nix-shell default-gen-shell.nix --run generate
+
+To generate `libreoffice-srcs-still.nix`:
+
+    nix-shell still-gen-shell.nix --run generate
diff --git a/nixpkgs/pkgs/applications/office/libreoffice/default-gen-shell.nix b/nixpkgs/pkgs/applications/office/libreoffice/default-gen-shell.nix
new file mode 100644
index 000000000000..366030971237
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/libreoffice/default-gen-shell.nix
@@ -0,0 +1,29 @@
+{ pkgs ? (import <nixpkgs> {}) }:
+
+with pkgs;
+
+let
+
+  primary-src = callPackage ./default-primary-src.nix {};
+
+in
+
+stdenv.mkDerivation {
+  name = "generate-libreoffice-srcs-shell";
+
+  buildCommand = "exit 1";
+
+  downloadList = stdenv.mkDerivation {
+    name = "libreoffice-${primary-src.version}-download-list";
+    inherit (primary-src) src version;
+    builder = ./download-list-builder.sh;
+  };
+
+  buildInputs = [ python3 ];
+
+  shellHook = ''
+    function generate {
+      python3 generate-libreoffice-srcs.py > libreoffice-srcs.nix
+    }
+  '';
+}
diff --git a/nixpkgs/pkgs/applications/office/libreoffice/default-primary-src.nix b/nixpkgs/pkgs/applications/office/libreoffice/default-primary-src.nix
new file mode 100644
index 000000000000..f5fc705eed4c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/libreoffice/default-primary-src.nix
@@ -0,0 +1,17 @@
+{ fetchurl }:
+
+rec {
+  major = "6";
+  minor = "2";
+  patch = "1";
+  tweak = "2";
+
+  subdir = "${major}.${minor}.${patch}";
+
+  version = "${subdir}${if tweak == "" then "" else "."}${tweak}";
+
+  src = fetchurl {
+    url = "https://download.documentfoundation.org/libreoffice/src/${subdir}/libreoffice-${version}.tar.xz";
+    sha256 = "0p2r48n27v5ifbj3cb9bs38nb6699awmdqx4shy1c6p28b24y78f";
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/libreoffice/default.nix b/nixpkgs/pkgs/applications/office/libreoffice/default.nix
new file mode 100644
index 000000000000..9113eedc06cd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/libreoffice/default.nix
@@ -0,0 +1,380 @@
+{ stdenv, fetchurl, pam, python3, libxslt, perl, ArchiveZip, gettext
+, IOCompress, zlib, libjpeg, expat, freetype, libwpd
+, libxml2, db, sablotron, curl, fontconfig, libsndfile, neon
+, bison, flex, zip, unzip, gtk3, gtk2, libmspack, getopt, file, cairo, which
+, icu, boost, jdk, ant, cups, xorg, libcmis, fontforge
+, openssl, gperf, cppunit, GConf, ORBit2, poppler, utillinux
+, librsvg, gnome_vfs, libGLU_combined, bsh, CoinMP, libwps, libabw, mariadb
+, autoconf, automake, openldap, bash, hunspell, librdf_redland, nss, nspr
+, libwpg, dbus-glib, qt4, clucene_core, libcdr, lcms, vigra
+, unixODBC, mdds, sane-backends, mythes, libexttextcat, libvisio
+, fontsConf, pkgconfig, bluez5, libtool, carlito
+, libatomic_ops, graphite2, harfbuzz, libodfgen, libzmf
+, librevenge, libe-book, libmwaw, glm, glew, gst_all_1
+, gdb, commonsLogging, librdf_rasqal, wrapGAppsHook
+, gnome3, glib, ncurses, epoxy, gpgme
+, langs ? [ "ca" "cs" "de" "en-GB" "en-US" "eo" "es" "fr" "hu" "it" "nl" "pl" "ru" "sl" "zh-CN" ]
+, withHelp ? true
+, kdeIntegration ? false
+}:
+
+let
+  primary-src = import ./default-primary-src.nix { inherit fetchurl; };
+in
+
+let inherit (primary-src) major minor subdir version; in
+
+let
+  lib = stdenv.lib;
+  langsSpaces = lib.concatStringsSep " " langs;
+
+  fetchSrc = {name, sha256}: fetchurl {
+    url = "https://download.documentfoundation.org/libreoffice/src/${subdir}/libreoffice-${name}-${version}.tar.xz";
+    inherit sha256;
+  };
+
+  srcs = {
+    third_party =
+      map (x : ((fetchurl {inherit (x) url sha256 name;}) // {inherit (x) md5name md5;}))
+      ((import ./libreoffice-srcs.nix) ++ [
+        (rec {
+          name = "unowinreg.dll";
+          url = "https://dev-www.libreoffice.org/extern/${md5name}";
+          sha256 = "1infwvv1p6i21scywrldsxs22f62x85mns4iq8h6vr6vlx3fdzga";
+          md5 = "185d60944ea767075d27247c3162b3bc";
+          md5name = "${md5}-${name}";
+        })
+      ]);
+
+    translations = fetchSrc {
+      name = "translations";
+      sha256 = "180d4rrzb3lq7g2w7x512fn8chfkjg4ld20ikrj6hkg11kj4hbmy";
+    };
+
+    # TODO: dictionaries
+
+    help = fetchSrc {
+      name = "help";
+      sha256 = "06fgd5jkqqbvskyj1ywmsmb4crsj064s8r45nrv0r8j6ydn0hi1l";
+    };
+
+  };
+in stdenv.mkDerivation rec {
+  name = "libreoffice-${version}";
+
+  inherit (primary-src) src;
+
+  # For some reason librdf_redland sometimes refers to rasqal.h instead
+  # of rasqal/rasqal.h
+  NIX_CFLAGS_COMPILE = [ "-I${librdf_rasqal}/include/rasqal" ];
+
+  patches = [
+    ./xdg-open-brief.patch
+  ];
+
+  tarballPath = "external/tarballs";
+
+  postUnpack = ''
+    mkdir -v $sourceRoot/${tarballPath}
+  '' + (lib.flip lib.concatMapStrings srcs.third_party (f: ''
+      ln -sfv ${f} $sourceRoot/${tarballPath}/${f.md5name}
+      ln -sfv ${f} $sourceRoot/${tarballPath}/${f.name}
+    ''))
+  + ''
+    ln -sv ${srcs.help} $sourceRoot/${tarballPath}/${srcs.help.name}
+    ln -svf ${srcs.translations} $sourceRoot/${tarballPath}/${srcs.translations.name}
+    tar -xf ${srcs.help}
+    tar -xf ${srcs.translations}
+  '';
+
+  postPatch = ''
+    sed -e 's@/usr/bin/xdg-open@xdg-open@g' -i shell/source/unix/exec/shellexec.cxx
+
+    # configure checks for header 'gpgme++/gpgmepp_version.h',
+    # and if it is found (no matter where) uses a hardcoded path
+    # in what presumably is an effort to make it possible to write
+    # '#include <context.h>' instead of '#include <gpgmepp/context.h>'.
+    #
+    # Fix this path to point to where the headers can actually be found instead.
+    substituteInPlace configure.ac --replace \
+      'GPGMEPP_CFLAGS=-I/usr/include/gpgme++' \
+      'GPGMEPP_CFLAGS=-I${gpgme.dev}/include/gpgme++'
+  '';
+
+  QT4DIR = qt4;
+
+  preConfigure = ''
+    configureFlagsArray=(
+      "--with-parallelism=$NIX_BUILD_CORES"
+      "--with-lang=${langsSpaces}"
+    );
+
+    chmod a+x ./bin/unpack-sources
+    patchShebangs .
+
+    # This is required as some cppunittests require fontconfig configured
+    cp "${fontsConf}" fonts.conf
+    sed -e '/include/i<include>${carlito}/etc/fonts/conf.d</include>' -i fonts.conf
+    export FONTCONFIG_FILE="$PWD/fonts.conf"
+
+    NOCONFIGURE=1 ./autogen.sh
+  '';
+
+  postConfigure =
+    # fetch_Download_item tries to interpret the name as a variable name, let it do so...
+    ''
+      sed -e '1ilibreoffice-translations-${version}.tar.xz=libreoffice-translations-${version}.tar.xz' -i Makefile
+      sed -e '1ilibreoffice-help-${version}.tar.xz=libreoffice-help-${version}.tar.xz' -i Makefile
+    ''
+    # Test fixups
+    # May need to be revisited/pruned, left alone for now.
+    + ''
+      # unit test sd_tiledrendering seems to be fragile
+      # https://nabble.documentfoundation.org/libreoffice-5-0-failure-in-CUT-libreofficekit-tiledrendering-td4150319.html
+      echo > ./sd/CppunitTest_sd_tiledrendering.mk
+      sed -e /CppunitTest_sd_tiledrendering/d -i sd/Module_sd.mk
+      # Pivot chart tests. Fragile.
+      sed -e '/CPPUNIT_TEST(testRoundtrip)/d' -i chart2/qa/extras/PivotChartTest.cxx
+      sed -e '/CPPUNIT_TEST(testPivotTableMedianODS)/d' -i sc/qa/unit/pivottable_filters_test.cxx
+      # one more fragile test?
+      sed -e '/CPPUNIT_TEST(testTdf96536);/d' -i sw/qa/extras/uiwriter/uiwriter.cxx
+      # this I actually hate, this should be a data consistency test!
+      sed -e '/CPPUNIT_TEST(testTdf115013);/d' -i sw/qa/extras/uiwriter/uiwriter.cxx
+      # rendering-dependent test
+      sed -e '/CPPUNIT_ASSERT_EQUAL(11148L, pOleObj->GetLogicRect().getWidth());/d ' -i sc/qa/unit/subsequent_filters-test.cxx
+      # tilde expansion in path processing checks the existence of $HOME
+      sed -e 's@OString sSysPath("~/tmp");@& return ; @' -i sal/qa/osl/file/osl_File.cxx
+      # rendering-dependent: on my computer the test table actually doesn't fit…
+      # interesting fact: test disabled on macOS by upstream
+      sed -re '/DECLARE_WW8EXPORT_TEST[(]testTableKeep, "tdf91083.odt"[)]/,+5d' -i ./sw/qa/extras/ww8export/ww8export.cxx
+      # Segfault on DB access — maybe temporarily acceptable for a new version of Fresh?
+      sed -e 's/CppunitTest_dbaccess_empty_stdlib_save//' -i ./dbaccess/Module_dbaccess.mk
+      # one more fragile test?
+      sed -e '/CPPUNIT_TEST(testTdf77014);/d' -i sw/qa/extras/uiwriter/uiwriter.cxx
+      # rendering-dependent tests
+      sed -e '/CPPUNIT_TEST(testCustomColumnWidthExportXLSX)/d' -i sc/qa/unit/subsequent_export-test.cxx
+      sed -e '/CPPUNIT_TEST(testColumnWidthExportFromODStoXLSX)/d' -i sc/qa/unit/subsequent_export-test.cxx
+      sed -e '/CPPUNIT_TEST(testChartImportXLS)/d' -i sc/qa/unit/subsequent_filters-test.cxx
+      sed -e '/CPPUNIT_TEST(testLegacyCellAnchoredRotatedShape)/d' -i sc/qa/unit/filters-test.cxx
+      sed -zre 's/DesktopLOKTest::testGetFontSubset[^{]*[{]/& return; /' -i desktop/qa/desktop_lib/test_desktop_lib.cxx
+      sed -z -r -e 's/DECLARE_OOXMLEXPORT_TEST[(]testFlipAndRotateCustomShape,[^)]*[)].[{]/& return;/' -i sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+      sed -z -r -e 's/DECLARE_OOXMLEXPORT_TEST[(]tdf105490_negativeMargins,[^)]*[)].[{]/& return;/' -i sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+      sed -z -r -e 's/DECLARE_OOXMLIMPORT_TEST[(]testTdf112443,[^)]*[)].[{]/& return;/' -i sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+      sed -z -r -e 's/DECLARE_RTFIMPORT_TEST[(]testTdf108947,[^)]*[)].[{]/& return;/' -i sw/qa/extras/rtfimport/rtfimport.cxx
+      # not sure about this fragile test
+      sed -z -r -e 's/DECLARE_OOXMLEXPORT_TEST[(]testTDF87348,[^)]*[)].[{]/& return;/' -i sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+      # bunch of new Fresh failures. Sigh.
+      sed -e '/CPPUNIT_TEST(testDocumentLayout);/d' -i './sd/qa/unit/import-tests.cxx'
+      sed -e '/CPPUNIT_TEST(testErrorBarDataRangeODS);/d' -i './chart2/qa/extras/chart2export.cxx'
+      sed -e '/CPPUNIT_TEST(testLabelStringODS);/d' -i './chart2/qa/extras/chart2export.cxx'
+      sed -e '/CPPUNIT_TEST(testAxisNumberFormatODS);/d' -i './chart2/qa/extras/chart2export.cxx'
+      sed -e '/CPPUNIT_TEST(testBackgroundImage);/d' -i './sd/qa/unit/export-tests.cxx'
+      sed -e '/CPPUNIT_TEST(testFdo84043);/d' -i './sd/qa/unit/export-tests.cxx'
+      sed -e '/CPPUNIT_TEST(testTdf97630);/d' -i './sd/qa/unit/export-tests.cxx'
+      sed -e '/CPPUNIT_TEST(testTdf80020);/d' -i './sd/qa/unit/export-tests.cxx'
+      sed -e '/CPPUNIT_TEST(testTdf62176);/d' -i './sd/qa/unit/export-tests.cxx'
+      sed -e '/CPPUNIT_TEST(testTransparentBackground);/d' -i './sd/qa/unit/export-tests.cxx'
+      sed -e '/CPPUNIT_TEST(testEmbeddedPdf);/d' -i './sd/qa/unit/export-tests.cxx'
+      sed -e '/CPPUNIT_TEST(testEmbeddedText);/d' -i './sd/qa/unit/export-tests.cxx'
+      sed -e '/CPPUNIT_TEST(testTdf98477);/d' -i './sd/qa/unit/export-tests.cxx'
+      sed -e '/CPPUNIT_TEST(testAuthorField);/d' -i './sd/qa/unit/export-tests-ooxml2.cxx'
+      sed -e '/CPPUNIT_TEST(testTdf50499);/d' -i './sd/qa/unit/export-tests.cxx'
+      sed -e '/CPPUNIT_TEST(testTdf100926);/d' -i './sd/qa/unit/export-tests.cxx'
+      sed -e '/CPPUNIT_TEST(testPageWithTransparentBackground);/d' -i './sd/qa/unit/export-tests.cxx'
+      sed -e '/CPPUNIT_TEST(testTextRotation);/d' -i './sd/qa/unit/export-tests.cxx'
+      sed -e '/CPPUNIT_TEST(testTdf113818);/d' -i './sd/qa/unit/export-tests.cxx'
+      sed -e '/CPPUNIT_TEST(testTdf119629);/d' -i './sd/qa/unit/export-tests.cxx'
+      sed -e '/CPPUNIT_TEST(testTdf113822);/d' -i './sd/qa/unit/export-tests.cxx'
+      sed -e '/CPPUNIT_TEST(test);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testConditionalFormatExportODS);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testProtectionKeyODS_UTF16LErtlSHA1);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testProtectionKeyODS_UTF8SHA1);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testProtectionKeyODS_UTF8SHA256ODF12);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testProtectionKeyODS_UTF8SHA256W3C);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testProtectionKeyODS_XL_SHA1);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testColorScaleExportODS);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testDataBarExportODS);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testNamedRangeBugfdo62729);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testRichTextExportODS);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testFormulaRefSheetNameODS);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testCellValuesExportODS);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testCellNoteExportODS);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testFormatExportODS);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testEmbeddedChartODS);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testCellAnchoredGroupXLS);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testCeilingFloorODS);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testRelativePathsODS);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testSheetProtectionODS);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testSwappedOutImageExport);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testLinkedGraphicRT);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testImageWithSpecialID);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testAbsNamedRangeHTML);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testMoveCellAnchoredShapesODS);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testRefStringUnspecified);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testHeaderImageODS);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testTdf88657ODS);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testExponentWithoutSignFormatXLSX);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testHiddenRepeatedRowsODS);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testHyperlinkTargetFrameODS);/d' -i './sc/qa/unit/subsequent_export-test.cxx'
+      sed -e '/CPPUNIT_TEST(testTdf105739);/d' -i './sd/qa/unit/export-tests-ooxml2.cxx'
+      sed -e '/CPPUNIT_TEST(testPageBitmapWithTransparency);/d' -i './sd/qa/unit/export-tests-ooxml2.cxx'
+      sed -e '/CPPUNIT_TEST(testTdf115005);/d' -i './sd/qa/unit/export-tests-ooxml2.cxx'
+      sed -e '/CPPUNIT_TEST(testTdf115005_FallBack_Images_On);/d' -i './sd/qa/unit/export-tests-ooxml2.cxx'
+      sed -e '/CPPUNIT_TEST(testTdf115005_FallBack_Images_Off);/d' -i './sd/qa/unit/export-tests-ooxml2.cxx'
+      sed -e '/CPPUNIT_TEST(testTdf44774);/d' -i './sd/qa/unit/misc-tests.cxx'
+      sed -e '/CPPUNIT_TEST(testTdf38225);/d' -i './sd/qa/unit/misc-tests.cxx'
+      sed -e '/CPPUNIT_TEST(testAuthorField);/d' -i './sd/qa/unit/export-tests-ooxml2.cxx'
+      sed -e '/CPPUNIT_TEST(testAuthorField);/d' -i './sd/qa/unit/export-tests.cxx'
+      sed -e '/CPPUNIT_TEST(testFdo85554);/d' -i './sw/qa/extras/uiwriter/uiwriter.cxx'
+      sed -e '/CPPUNIT_TEST(testEmbeddedDataSource);/d' -i './sw/qa/extras/uiwriter/uiwriter.cxx'
+      sed -e '/CPPUNIT_TEST(testTdf96479);/d' -i './sw/qa/extras/uiwriter/uiwriter.cxx'
+      sed -e '/CPPUNIT_TEST(testInconsistentBookmark);/d' -i './sw/qa/extras/uiwriter/uiwriter.cxx'
+      sed -e '/CPPUNIT_TEST(Import_Export_Import);/d' -i './sw/qa/extras/inc/swmodeltestbase.hxx'
+      sed -e "s/DECLARE_SW_ROUNDTRIP_TEST(\([_a-zA-Z0-9.]\+\)[, ].*, *\([_a-zA-Z0-9.]\+\))/class \\1: public \\2 { public: void verify() override; }; void \\1::verify() /" -i "sw/qa/extras/ooxmlexport/ooxmlexport9.cxx"
+      sed -e "s/DECLARE_SW_ROUNDTRIP_TEST(\([_a-zA-Z0-9.]\+\)[, ].*, *\([_a-zA-Z0-9.]\+\))/class \\1: public \\2 { public: void verify() override; }; void \\1::verify() /" -i "sw/qa/extras/ooxmlexport/ooxmlencryption.cxx"
+      sed -e "s/DECLARE_SW_ROUNDTRIP_TEST(\([_a-zA-Z0-9.]\+\)[, ].*, *\([_a-zA-Z0-9.]\+\))/class \\1: public \\2 { public: void verify() override; }; void \\1::verify() /" -i "sw/qa/extras/odfexport/odfexport.cxx"
+      sed -e "s/DECLARE_SW_ROUNDTRIP_TEST(\([_a-zA-Z0-9.]\+\)[, ].*, *\([_a-zA-Z0-9.]\+\))/class \\1: public \\2 { public: void verify() override; }; void \\1::verify() /" -i "sw/qa/extras/unowriter/unowriter.cxx"
+    ''
+    # This to avoid using /lib:/usr/lib at linking
+    + ''
+    sed -i '/gb_LinkTarget_LDFLAGS/{ n; /rpath-link/d;}' solenv/gbuild/platform/unxgcc.mk
+
+    find -name "*.cmd" -exec sed -i s,/lib:/usr/lib,, {} \;
+    '';
+
+  makeFlags = "SHELL=${bash}/bin/bash";
+
+  enableParallelBuilding = true;
+
+  buildPhase = ''
+    make build-nocheck
+  '';
+
+  doCheck = true;
+
+  # It installs only things to $out/lib/libreoffice
+  postInstall = ''
+    mkdir -p $out/bin $out/share/desktop
+
+    mkdir -p "$out/share/gsettings-schemas/collected-for-libreoffice/glib-2.0/schemas/"
+
+    for a in sbase scalc sdraw smath swriter simpress soffice; do
+      ln -s $out/lib/libreoffice/program/$a $out/bin/$a
+    done
+
+    ln -s $out/bin/soffice $out/bin/libreoffice
+    ln -s $out/lib/libreoffice/share/xdg $out/share/applications
+
+    for f in $out/share/applications/*.desktop; do
+      substituteInPlace "$f" --replace "Exec=libreofficedev${major}.${minor}" "Exec=libreoffice"
+      substituteInPlace "$f" --replace "Exec=libreoffice${major}.${minor}" "Exec=libreoffice"
+      substituteInPlace "$f" --replace "Exec=libreoffice" "Exec=libreoffice"
+    done
+
+    cp -r sysui/desktop/icons  "$out/share"
+    sed -re 's@Icon=libreoffice(dev)?[0-9.]*-?@Icon=@' -i "$out/share/applications/"*.desktop
+  '';
+
+  configureFlags = [
+    "${if withHelp then "" else "--without-help"}"
+    "--with-boost=${boost.dev}"
+    "--with-boost-libdir=${boost.out}/lib"
+    "--with-beanshell-jar=${bsh}"
+    "--with-vendor=NixOS"
+    "--with-commons-logging-jar=${commonsLogging}/share/java/commons-logging-1.2.jar"
+    "--disable-report-builder"
+    "--disable-online-update"
+    "--enable-python=system"
+    "--enable-dbus"
+    "--enable-release-build"
+    (lib.enableFeature kdeIntegration "kde4")
+    "--enable-epm"
+    "--with-jdk-home=${jdk.home}"
+    "--with-ant-home=${ant}/lib/ant"
+    "--with-system-cairo"
+    "--with-system-libs"
+    "--with-system-headers"
+    "--with-system-openssl"
+    "--with-system-libabw"
+    "--with-system-libcmis"
+    "--with-system-libwps"
+    "--with-system-openldap"
+    "--with-system-coinmp"
+
+    "--with-alloc=system"
+
+    # Without these, configure does not finish
+    "--without-junit"
+
+    "--disable-libnumbertext" # system-libnumbertext"
+
+    # We do tarball prefetching ourselves
+    "--disable-fetch-external"
+    "--enable-build-opensymbol"
+
+    # I imagine this helps. Copied from go-oo.
+    # Modified on every upgrade, though
+    "--disable-odk"
+    "--disable-postgresql-sdbc"
+    "--disable-firebird-sdbc"
+    "--without-fonts"
+    "--without-myspell-dicts"
+    "--without-doxygen"
+
+    # TODO: package these as system libraries
+    "--with-system-beanshell"
+    "--without-system-hsqldb"
+    "--without-system-altlinuxhyph"
+    "--without-system-lpsolve"
+    "--without-system-libetonyek"
+    "--without-system-libfreehand"
+    "--without-system-liblangtag"
+    "--without-system-libmspub"
+    "--without-system-libpagemaker"
+    "--without-system-libstaroffice"
+    "--without-system-libepubgen"
+    "--without-system-libqxp"
+    "--without-system-mdds"
+    # https://github.com/NixOS/nixpkgs/commit/5c5362427a3fa9aefccfca9e531492a8735d4e6f
+    "--without-system-orcus"
+    "--without-system-xmlsec"
+  ];
+
+  checkPhase = ''
+    make unitcheck
+    make slowcheck
+  '';
+
+  buildInputs = with xorg;
+    [ ant ArchiveZip autoconf automake bison boost cairo clucene_core
+      IOCompress cppunit cups curl db dbus-glib expat file flex fontconfig
+      freetype GConf getopt gnome_vfs gperf gtk3 gtk2
+      hunspell icu jdk lcms libcdr libexttextcat unixODBC libjpeg
+      libmspack librdf_redland librsvg libsndfile libvisio libwpd libwpg libX11
+      libXaw libXext libXi libXinerama libxml2 libxslt libXtst
+      libXdmcp libpthreadstubs libGLU_combined mythes gst_all_1.gstreamer
+      gst_all_1.gst-plugins-base glib mariadb
+      neon nspr nss openldap openssl ORBit2 pam perl pkgconfig poppler
+      python3 sablotron sane-backends unzip vigra which zip zlib
+      mdds bluez5 libcmis libwps libabw libzmf libtool
+      libxshmfence libatomic_ops graphite2 harfbuzz gpgme utillinux
+      librevenge libe-book libmwaw glm glew ncurses epoxy
+      libodfgen CoinMP librdf_rasqal gnome3.adwaita-icon-theme gettext
+    ]
+    ++ lib.optional kdeIntegration kdelibs4;
+  nativeBuildInputs = [ wrapGAppsHook gdb fontforge ];
+
+  passthru = {
+    inherit srcs jdk;
+  };
+
+  requiredSystemFeatures = [ "big-parallel" ];
+
+  meta = with lib; {
+    description = "Comprehensive, professional-quality productivity suite, a variant of openoffice.org";
+    homepage = https://libreoffice.org/;
+    license = licenses.lgpl3;
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/libreoffice/download-list-builder.sh b/nixpkgs/pkgs/applications/office/libreoffice/download-list-builder.sh
new file mode 100644
index 000000000000..c054e2c72cbe
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/libreoffice/download-list-builder.sh
@@ -0,0 +1,3 @@
+source $stdenv/setup
+
+tar --extract --file=$src libreoffice-$version/download.lst -O > $out
diff --git a/nixpkgs/pkgs/applications/office/libreoffice/generate-libreoffice-srcs.py b/nixpkgs/pkgs/applications/office/libreoffice/generate-libreoffice-srcs.py
new file mode 100755
index 000000000000..636f36cb383b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/libreoffice/generate-libreoffice-srcs.py
@@ -0,0 +1,328 @@
+#!/usr/bin/env python3
+
+"""
+Converts the LibreOffice `download.lst` file into a Nix expression.
+
+Requires an environment variable named `downloadList` identifying the path
+of the input file, and writes the result to stdout.
+
+todo - Ideally we would move as much as possible into derivation dependencies.
+"""
+import collections, itertools, json, re, subprocess, sys, os
+
+def main():
+
+    packages = list(get_packages())
+
+    for x in packages:
+        print(x, file=sys.stderr)
+
+    print('[')
+
+    for x in packages:
+
+        md5 = x['md5']
+        upstream_sha256 = x['sha256']
+        if upstream_sha256:
+            hash = upstream_sha256
+            hashtype = 'sha256'
+        else:
+            hash = md5
+            hashtype = 'md5'
+        tarball = x['tarball']
+
+        url = construct_url(x)
+        print('url: {}'.format(url), file=sys.stderr)
+
+        path = download(url, tarball, hash, hashtype)
+        print('path: {}'.format(path), file=sys.stderr)
+
+        sha256 = get_sha256(path)
+        print('sha256: {}'.format(sha256), file=sys.stderr)
+
+        print('  {')
+        print('    name = "{}";'.format(tarball))
+        print('    url = "{}";'.format(url))
+        print('    sha256 = "{}";'.format(sha256))
+        print('    md5 = "{}";'.format(md5))
+        print('    md5name = "{}-{}";'.format(md5 or upstream_sha256,tarball))
+        print('  }')
+
+    print(']')
+
+
+def construct_url(x):
+    if x['brief']:
+        return 'http://dev-www.libreoffice.org/src/{}{}'.format(
+            x.get('subdir', ''), x['tarball'])
+    else:
+        return 'http://dev-www.libreoffice.org/src/{}{}-{}'.format(
+            x.get('subdir', ''), x['md5'], x['tarball'])
+
+
+def download(url, name, hash, hashtype):
+    cmd = ['nix-prefetch-url', url, hash, '--print-path',
+           '--type', hashtype, '--name', name]
+    proc = subprocess.run(cmd, stdout=subprocess.PIPE, check=True,
+                          universal_newlines=True)
+    return proc.stdout.split('\n')[1].strip()
+
+
+def get_sha256(path):
+    cmd = ['sha256sum', path]
+    proc = subprocess.run(cmd, stdout=subprocess.PIPE, check=True,
+                          universal_newlines=True)
+    return proc.stdout.split(' ')[0].strip()
+
+
+def get_packages():
+    """
+    All of the package data: What's parsed from download.lst,
+    plus our additions.
+    """
+    return apply_additions(get_packages_from_download_list(),
+                           get_additions())
+
+
+def get_additions():
+    """
+    A mapping from package name (the all-caps identifiers used in
+    `download.lst`) to a dict of additional attributes to set on the package.
+    """
+    with open('./libreoffice-srcs-additions.json') as f:
+        return json.load(f)
+
+
+def apply_additions(xs, additions):
+    for x in xs:
+        yield dict_merge([x,
+                          additions.get(x['name'], {})])
+
+
+def get_packages_from_download_list():
+    """
+    The result of parsing `download.lst`: A list of dicts containing keys
+    'name', 'tarball', 'md5', 'brief'.
+    """
+
+    def lines():
+        for x in sub_symbols(parse_lines(get_lines())):
+
+            interpretation = interpret(x)
+
+            if interpretation == 'unrecognized':
+                print_skipped_line(x)
+            else:
+                yield dict_merge([x,
+                                  interpretation])
+
+    def cluster(xs):
+        """
+        Groups lines according to their order within the file, to support
+        packages that are listed in `download.lst` more than once.
+        """
+        keys = ['tarball', 'md5', 'sha256', 'brief']
+        a = {k: [x for x in xs if k in x['attrs']] for k in keys}
+        return zip(*[a[k] for k in keys])
+
+    def packages():
+        for (name, group) in groupby(lines(), lambda x: x['name']):
+            for xs in cluster(group):
+                yield {'name': name,
+                       'attrs': dict_merge(x['attrs'] for x in xs),
+                       'index': min(x['index'] for x in xs)}
+
+    for x in sorted(packages(), key=lambda x: x['index']):
+        yield dict_merge([{'name': x['name']},
+                          x['attrs']])
+
+
+def dict_merge(xs):
+    """
+    >>> dict_merge([{1: 2}, {3: 4}, {3: 5}])
+    {1: 2, 3: 4}
+    """
+    return dict(collections.ChainMap(*xs))
+
+
+def groupby(xs, f):
+    """
+    >>> groupby([1, 2, 3, 4], lambda x: x % 2)
+    [(0, [2, 4]), (1, [1, 3])]
+    """
+    for (k, iter) in itertools.groupby(sorted(xs, key=f), f):
+        group = list(iter)
+        yield (f(group[0]), group)
+
+
+def get_lines():
+
+    download_list = os.getenv('downloadList')
+
+    with open(download_list) as f:
+        return f.read().splitlines()
+
+
+def print_skipped_line(x):
+
+    print('Skipped line {}: {}'.format(x['index'],
+                                       x['original']),
+          file=sys.stderr)
+
+
+def parse_lines(lines):
+    """
+    Input: List of strings (the lines from `download.lst`
+    Output: Iterator of dicts with keys 'key', 'value', and 'index'
+    """
+    for (index, line) in enumerate(lines):
+
+        x = { 'index': index, 'original': line }
+
+        result = parse_line(line)
+
+        if result == 'nothing':
+            pass
+        elif result == 'unrecognized':
+            print_skipped_line(x)
+        else:
+            yield dict_merge([x,
+                             result])
+
+
+def parse_line(line):
+    """
+    Input: A string
+    Output: One of 1. A dict with keys 'key', 'value'
+                   2. 'nothing' (if the line contains no information)
+                   2. 'unrecognized' (if parsing failed)
+    """
+
+    if re.match('\s*(#.*)?$', line):
+        return 'nothing'
+
+    match = re.match('\s*export\s+([^:\s]+)\s*:=\s*(.*)$', line)
+
+    if match:
+        return {
+            'key': match.group(1),
+            'value': match.group(2).strip()
+        }
+    else:
+        return 'unrecognized'
+
+
+def sub_symbols(xs):
+    """
+    Do substitution of variables across all lines.
+
+    >>> sub_symbols([{'key': 'a', 'value': 'x'},
+    ...              {'key': 'c': 'value': '$(a)yz'}])
+    [{'key': 'a', 'value': 'x'}, {'key': 'c': 'value': 'xyz'}]
+    """
+
+    xs = list(xs)
+
+    symbols = {x['key']: x for x in xs}
+
+    def get_value(k):
+        x = symbols.get(k)
+        return x['value'] if x is not None else ''
+
+    for x in xs:
+        yield dict_merge([{'value': sub_str(x['value'], get_value)},
+                          x])
+
+
+def sub_str(string, func):
+    """
+    Do substitution of variables in a single line.
+
+    >>> sub_str("x = $(x)", lambda k: {'x': 'a'}[k])
+    "x = a"
+    """
+
+    def func2(m):
+        x = m.group(1)
+        result = func(x)
+        return result if result is not None else x
+
+    return re.sub(r'\$\(([^\$\(\)]+)\)', func2, string)
+
+
+def interpret(x):
+    """
+    Input: Dict with keys 'key' and 'value'
+    Output: One of 1. Dict with keys 'name' and 'attrs'
+                   2. 'unrecognized' (if interpretation failed)
+    """
+    for f in [interpret_md5, interpret_sha256, interpret_tarball_with_md5, interpret_tarball, interpret_jar]:
+        result = f(x)
+        if result is not None:
+            return result
+
+    return 'unrecognized'
+
+
+def interpret_md5(x):
+    """
+    >>> interpret_md5("ODFGEN_MD5SUM", "32572ea48d9021bbd6fa317ddb697abc")
+    {'name': 'ODFGEN', 'attrs': {'md5': '32572ea48d9021bbd6fa317ddb697abc'}}
+    """
+
+    match = re.match('^(.*)_MD5SUM$', x['key'])
+
+    if match:
+        return {'name': match.group(1),
+                'attrs': {'md5': x['value'], 'sha256': ''}}
+
+def interpret_sha256(x):
+    match = re.match('^(.*)_SHA256SUM$', x['key'])
+
+    if match:
+        return {'name': match.group(1),
+                'attrs': {'sha256': x['value'], 'md5': ''}}
+
+def interpret_tarball(x):
+    """
+    >>> interpret_tarball("FREEHAND_TARBALL", "libfreehand-0.1.1.tar.bz2")
+    {'name': 'FREEHAND',
+     'attrs': {'tarball': 'libfreehand-0.1.1.tar.bz2', 'brief': True}}
+    """
+
+    match = re.match('^(.*)_TARBALL$', x['key'])
+
+    if match:
+        return {'name': match.group(1),
+                'attrs': {'tarball': x['value'], 'brief': True}}
+
+def interpret_jar(x):
+    match = re.match('^(.*)_JAR$', x['key'])
+
+    if match:
+        return {'name': match.group(1),
+                'attrs': {'tarball': x['value'], 'brief': True}}
+
+
+def interpret_tarball_with_md5(x):
+    """
+    >>> interpret_tarball_with_md5("CLUCENE_TARBALL",\
+        "48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz")
+    {'name': 'CLUCENE',
+     'attrs': {'tarball': 'clucene-core-2.3.3.4.tar.gz',
+               'md5': '48d647fbd8ef8889e5a7f422c1bfda94', 'brief': False}}
+    """
+
+    match = {'key': re.match('^(.*)_(TARBALL|JAR)$', x['key']),
+             'value': re.match('(?P<md5>[0-9a-fA-F]{32})-(?P<tarball>.+)$',
+                               x['value'])}
+
+    if match['key'] and match['value']:
+        return {'name': match['key'].group(1),
+                'attrs': {'tarball': match['value'].group('tarball'),
+                          'md5': match['value'].group('md5'),
+                          'sha256': '',
+                          'brief': False}}
+
+
+main()
diff --git a/nixpkgs/pkgs/applications/office/libreoffice/libreoffice-srcs-additions.json b/nixpkgs/pkgs/applications/office/libreoffice/libreoffice-srcs-additions.json
new file mode 100644
index 000000000000..5b4363189f7f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/libreoffice/libreoffice-srcs-additions.json
@@ -0,0 +1,5 @@
+{
+  "LIBGLTF": {"subdir": "libgltf/"},
+  "ODFVALIDATOR": {"subdir": "../extern/"},
+  "OFFICEOTRON": {"subdir": "../extern/"}
+}
diff --git a/nixpkgs/pkgs/applications/office/libreoffice/libreoffice-srcs-still.nix b/nixpkgs/pkgs/applications/office/libreoffice/libreoffice-srcs-still.nix
new file mode 100644
index 000000000000..adec14748088
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/libreoffice/libreoffice-srcs-still.nix
@@ -0,0 +1,856 @@
+[
+  {
+    name = "libabw-0.1.2.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libabw-0.1.2.tar.xz";
+    sha256 = "0b72944d5af81dda0a5c5803ee84cbac4b81441a4d767aa57029adc6744c2485";
+    md5 = "";
+    md5name = "0b72944d5af81dda0a5c5803ee84cbac4b81441a4d767aa57029adc6744c2485-libabw-0.1.2.tar.xz";
+  }
+  {
+    name = "commons-logging-1.2-src.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/commons-logging-1.2-src.tar.gz";
+    sha256 = "49665da5a60d033e6dff40fe0a7f9173e886ae859ce6096c1afe34c48b677c81";
+    md5 = "";
+    md5name = "49665da5a60d033e6dff40fe0a7f9173e886ae859ce6096c1afe34c48b677c81-commons-logging-1.2-src.tar.gz";
+  }
+  {
+    name = "apr-1.5.2.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/apr-1.5.2.tar.gz";
+    sha256 = "1af06e1720a58851d90694a984af18355b65bb0d047be03ec7d659c746d6dbdb";
+    md5 = "";
+    md5name = "1af06e1720a58851d90694a984af18355b65bb0d047be03ec7d659c746d6dbdb-apr-1.5.2.tar.gz";
+  }
+  {
+    name = "apr-util-1.5.4.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/apr-util-1.5.4.tar.gz";
+    sha256 = "976a12a59bc286d634a21d7be0841cc74289ea9077aa1af46be19d1a6e844c19";
+    md5 = "";
+    md5name = "976a12a59bc286d634a21d7be0841cc74289ea9077aa1af46be19d1a6e844c19-apr-util-1.5.4.tar.gz";
+  }
+  {
+    name = "boost_1_66_0.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/boost_1_66_0.tar.bz2";
+    sha256 = "5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9";
+    md5 = "";
+    md5name = "5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9-boost_1_66_0.tar.bz2";
+  }
+  {
+    name = "breakpad.zip";
+    url = "http://dev-www.libreoffice.org/src/breakpad.zip";
+    sha256 = "7060149be16a8789b0ccf596bdeaf63115f03f520acb508f72a14686fb311cb9";
+    md5 = "";
+    md5name = "7060149be16a8789b0ccf596bdeaf63115f03f520acb508f72a14686fb311cb9-breakpad.zip";
+  }
+  {
+    name = "bsh-2.0b6-src.zip";
+    url = "http://dev-www.libreoffice.org/src/beeca87be45ec87d241ddd0e1bad80c1-bsh-2.0b6-src.zip";
+    sha256 = "9e93c73e23aff644b17dfff656444474c14150e7f3b38b19635e622235e01c96";
+    md5 = "beeca87be45ec87d241ddd0e1bad80c1";
+    md5name = "beeca87be45ec87d241ddd0e1bad80c1-bsh-2.0b6-src.zip";
+  }
+  {
+    name = "bzip2-1.0.6.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/00b516f4704d4a7cb50a1d97e6e8e15b-bzip2-1.0.6.tar.gz";
+    sha256 = "a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd";
+    md5 = "00b516f4704d4a7cb50a1d97e6e8e15b";
+    md5name = "00b516f4704d4a7cb50a1d97e6e8e15b-bzip2-1.0.6.tar.gz";
+  }
+  {
+    name = "cairo-1.14.10.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/cairo-1.14.10.tar.xz";
+    sha256 = "7e87878658f2c9951a14fc64114d4958c0e65ac47530b8ac3078b2ce41b66a09";
+    md5 = "";
+    md5name = "7e87878658f2c9951a14fc64114d4958c0e65ac47530b8ac3078b2ce41b66a09-cairo-1.14.10.tar.xz";
+  }
+  {
+    name = "libcdr-0.1.4.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libcdr-0.1.4.tar.xz";
+    sha256 = "e7a7e8b00a3df5798110024d7061fe9d1c3330277d2e4fa9213294f966a4a66d";
+    md5 = "";
+    md5name = "e7a7e8b00a3df5798110024d7061fe9d1c3330277d2e4fa9213294f966a4a66d-libcdr-0.1.4.tar.xz";
+  }
+  {
+    name = "clucene-core-2.3.3.4.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz";
+    sha256 = "ddfdc433dd8ad31b5c5819cc4404a8d2127472a3b720d3e744e8c51d79732eab";
+    md5 = "48d647fbd8ef8889e5a7f422c1bfda94";
+    md5name = "48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz";
+  }
+  {
+    name = "libcmis-0.5.1.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/libcmis-0.5.1.tar.gz";
+    sha256 = "6acbdf22ecdbaba37728729b75bfc085ee5a4b49a6024757cfb86ccd3da27b0e";
+    md5 = "";
+    md5name = "6acbdf22ecdbaba37728729b75bfc085ee5a4b49a6024757cfb86ccd3da27b0e-libcmis-0.5.1.tar.gz";
+  }
+  {
+    name = "CoinMP-1.7.6.tgz";
+    url = "http://dev-www.libreoffice.org/src/CoinMP-1.7.6.tgz";
+    sha256 = "86c798780b9e1f5921fe4efe651a93cb420623b45aa1fdff57af8c37f116113f";
+    md5 = "";
+    md5name = "86c798780b9e1f5921fe4efe651a93cb420623b45aa1fdff57af8c37f116113f-CoinMP-1.7.6.tgz";
+  }
+  {
+    name = "cppunit-1.14.0.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/cppunit-1.14.0.tar.gz";
+    sha256 = "3d569869d27b48860210c758c4f313082103a5e58219a7669b52bfd29d674780";
+    md5 = "";
+    md5name = "3d569869d27b48860210c758c4f313082103a5e58219a7669b52bfd29d674780-cppunit-1.14.0.tar.gz";
+  }
+  {
+    name = "converttexttonumber-1-5-0.oxt";
+    url = "http://dev-www.libreoffice.org/src/1f467e5bb703f12cbbb09d5cf67ecf4a-converttexttonumber-1-5-0.oxt";
+    sha256 = "71b238efd2734be9800af07566daea8d6685aeed28db5eb5fa0e6453f4d85de3";
+    md5 = "1f467e5bb703f12cbbb09d5cf67ecf4a";
+    md5name = "1f467e5bb703f12cbbb09d5cf67ecf4a-converttexttonumber-1-5-0.oxt";
+  }
+  {
+    name = "curl-7.63.0.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/curl-7.63.0.tar.gz";
+    sha256 = "d483b89062832e211c887d7cf1b65c902d591b48c11fe7d174af781681580b41";
+    md5 = "";
+    md5name = "d483b89062832e211c887d7cf1b65c902d591b48c11fe7d174af781681580b41-curl-7.63.0.tar.gz";
+  }
+  {
+    name = "libe-book-0.1.3.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libe-book-0.1.3.tar.xz";
+    sha256 = "7e8d8ff34f27831aca3bc6f9cc532c2f90d2057c778963b884ff3d1e34dfe1f9";
+    md5 = "";
+    md5name = "7e8d8ff34f27831aca3bc6f9cc532c2f90d2057c778963b884ff3d1e34dfe1f9-libe-book-0.1.3.tar.xz";
+  }
+  {
+    name = "libepoxy-1.3.1.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/libepoxy-1.3.1.tar.bz2";
+    sha256 = "1d8668b0a259c709899e1c4bab62d756d9002d546ce4f59c9665e2fc5f001a64";
+    md5 = "";
+    md5name = "1d8668b0a259c709899e1c4bab62d756d9002d546ce4f59c9665e2fc5f001a64-libepoxy-1.3.1.tar.bz2";
+  }
+  {
+    name = "epm-3.7.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/3ade8cfe7e59ca8e65052644fed9fca4-epm-3.7.tar.gz";
+    sha256 = "b3fc4c5445de6c9a801504a3ea3efb2d4ea9d5a622c9427e716736e7713ddb91";
+    md5 = "3ade8cfe7e59ca8e65052644fed9fca4";
+    md5name = "3ade8cfe7e59ca8e65052644fed9fca4-epm-3.7.tar.gz";
+  }
+  {
+    name = "libepubgen-0.1.1.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libepubgen-0.1.1.tar.xz";
+    sha256 = "03e084b994cbeffc8c3dd13303b2cb805f44d8f2c3b79f7690d7e3fc7f6215ad";
+    md5 = "";
+    md5name = "03e084b994cbeffc8c3dd13303b2cb805f44d8f2c3b79f7690d7e3fc7f6215ad-libepubgen-0.1.1.tar.xz";
+  }
+  {
+    name = "libetonyek-0.1.8.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libetonyek-0.1.8.tar.xz";
+    sha256 = "9dc92347aee0cc9ed57b175a3e21f9d96ebe55d30fecb10e841d1050794ed82d";
+    md5 = "";
+    md5name = "9dc92347aee0cc9ed57b175a3e21f9d96ebe55d30fecb10e841d1050794ed82d-libetonyek-0.1.8.tar.xz";
+  }
+  {
+    name = "expat-2.2.5.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/expat-2.2.5.tar.bz2";
+    sha256 = "d9dc32efba7e74f788fcc4f212a43216fc37cf5f23f4c2339664d473353aedf6";
+    md5 = "";
+    md5name = "d9dc32efba7e74f788fcc4f212a43216fc37cf5f23f4c2339664d473353aedf6-expat-2.2.5.tar.bz2";
+  }
+  {
+    name = "Firebird-3.0.0.32483-0.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/Firebird-3.0.0.32483-0.tar.bz2";
+    sha256 = "6994be3555e23226630c587444be19d309b25b0fcf1f87df3b4e3f88943e5860";
+    md5 = "";
+    md5name = "6994be3555e23226630c587444be19d309b25b0fcf1f87df3b4e3f88943e5860-Firebird-3.0.0.32483-0.tar.bz2";
+  }
+  {
+    name = "fontconfig-2.12.6.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/fontconfig-2.12.6.tar.bz2";
+    sha256 = "cf0c30807d08f6a28ab46c61b8dbd55c97d2f292cf88f3a07d3384687f31f017";
+    md5 = "";
+    md5name = "cf0c30807d08f6a28ab46c61b8dbd55c97d2f292cf88f3a07d3384687f31f017-fontconfig-2.12.6.tar.bz2";
+  }
+  {
+    name = "crosextrafonts-20130214.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/368f114c078f94214a308a74c7e991bc-crosextrafonts-20130214.tar.gz";
+    sha256 = "c48d1c2fd613c9c06c959c34da7b8388059e2408d2bb19845dc3ed35f76e4d09";
+    md5 = "368f114c078f94214a308a74c7e991bc";
+    md5name = "368f114c078f94214a308a74c7e991bc-crosextrafonts-20130214.tar.gz";
+  }
+  {
+    name = "crosextrafonts-carlito-20130920.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/c74b7223abe75949b4af367942d96c7a-crosextrafonts-carlito-20130920.tar.gz";
+    sha256 = "4bd12b6cbc321c1cf16da76e2c585c925ce956a08067ae6f6c64eff6ccfdaf5a";
+    md5 = "c74b7223abe75949b4af367942d96c7a";
+    md5name = "c74b7223abe75949b4af367942d96c7a-crosextrafonts-carlito-20130920.tar.gz";
+  }
+  {
+    name = "dejavu-fonts-ttf-2.37.zip";
+    url = "http://dev-www.libreoffice.org/src/33e1e61fab06a547851ed308b4ffef42-dejavu-fonts-ttf-2.37.zip";
+    sha256 = "7576310b219e04159d35ff61dd4a4ec4cdba4f35c00e002a136f00e96a908b0a";
+    md5 = "33e1e61fab06a547851ed308b4ffef42";
+    md5name = "33e1e61fab06a547851ed308b4ffef42-dejavu-fonts-ttf-2.37.zip";
+  }
+  {
+    name = "GentiumBasic_1102.zip";
+    url = "http://dev-www.libreoffice.org/src/1725634df4bb3dcb1b2c91a6175f8789-GentiumBasic_1102.zip";
+    sha256 = "2f1a2c5491d7305dffd3520c6375d2f3e14931ee35c6d8ae1e8f098bf1a7b3cc";
+    md5 = "1725634df4bb3dcb1b2c91a6175f8789";
+    md5name = "1725634df4bb3dcb1b2c91a6175f8789-GentiumBasic_1102.zip";
+  }
+  {
+    name = "liberation-fonts-ttf-1.07.4.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/134d8262145fc793c6af494dcace3e71-liberation-fonts-ttf-1.07.4.tar.gz";
+    sha256 = "61a7e2b6742a43c73e8762cdfeaf6dfcf9abdd2cfa0b099a9854d69bc4cfee5c";
+    md5 = "134d8262145fc793c6af494dcace3e71";
+    md5name = "134d8262145fc793c6af494dcace3e71-liberation-fonts-ttf-1.07.4.tar.gz";
+  }
+  {
+    name = "liberation-fonts-ttf-2.00.1.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/5c781723a0d9ed6188960defba8e91cf-liberation-fonts-ttf-2.00.1.tar.gz";
+    sha256 = "7890278a6cd17873c57d9cd785c2d230d9abdea837e96516019c5885dd271504";
+    md5 = "5c781723a0d9ed6188960defba8e91cf";
+    md5name = "5c781723a0d9ed6188960defba8e91cf-liberation-fonts-ttf-2.00.1.tar.gz";
+  }
+  {
+    name = "LinLibertineG-20120116.zip";
+    url = "http://dev-www.libreoffice.org/src/e7a384790b13c29113e22e596ade9687-LinLibertineG-20120116.zip";
+    sha256 = "54adcb2bc8cac0927a647fbd9362f45eff48130ce6e2379dc3867643019e08c5";
+    md5 = "e7a384790b13c29113e22e596ade9687";
+    md5name = "e7a384790b13c29113e22e596ade9687-LinLibertineG-20120116.zip";
+  }
+  {
+    name = "source-code-pro-2.030R-ro-1.050R-it.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/907d6e99f241876695c19ff3db0b8923-source-code-pro-2.030R-ro-1.050R-it.tar.gz";
+    sha256 = "09466dce87653333f189acd8358c60c6736dcd95f042dee0b644bdcf65b6ae2f";
+    md5 = "907d6e99f241876695c19ff3db0b8923";
+    md5name = "907d6e99f241876695c19ff3db0b8923-source-code-pro-2.030R-ro-1.050R-it.tar.gz";
+  }
+  {
+    name = "source-sans-pro-2.010R-ro-1.065R-it.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/edc4d741888bc0d38e32dbaa17149596-source-sans-pro-2.010R-ro-1.065R-it.tar.gz";
+    sha256 = "e7bc9a1fec787a529e49f5a26b93dcdcf41506449dfc70f92cdef6d17eb6fb61";
+    md5 = "edc4d741888bc0d38e32dbaa17149596";
+    md5name = "edc4d741888bc0d38e32dbaa17149596-source-sans-pro-2.010R-ro-1.065R-it.tar.gz";
+  }
+  {
+    name = "EmojiOneColor-SVGinOT-1.3.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/EmojiOneColor-SVGinOT-1.3.tar.gz";
+    sha256 = "d1a08f7c10589f22740231017694af0a7a270760c8dec33d8d1c038e2be0a0c7";
+    md5 = "";
+    md5name = "d1a08f7c10589f22740231017694af0a7a270760c8dec33d8d1c038e2be0a0c7-EmojiOneColor-SVGinOT-1.3.tar.gz";
+  }
+  {
+    name = "noto-fonts-20171024.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/noto-fonts-20171024.tar.gz";
+    sha256 = "29acc15a4c4d6b51201ba5d60f303dfbc2e5acbfdb70413c9ae1ed34fa259994";
+    md5 = "";
+    md5name = "29acc15a4c4d6b51201ba5d60f303dfbc2e5acbfdb70413c9ae1ed34fa259994-noto-fonts-20171024.tar.gz";
+  }
+  {
+    name = "culmus-0.131.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/culmus-0.131.tar.gz";
+    sha256 = "dcf112cfcccb76328dcfc095f4d7c7f4d2f7e48d0eed5e78b100d1d77ce2ed1b";
+    md5 = "";
+    md5name = "dcf112cfcccb76328dcfc095f4d7c7f4d2f7e48d0eed5e78b100d1d77ce2ed1b-culmus-0.131.tar.gz";
+  }
+  {
+    name = "libre-hebrew-1.0.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/libre-hebrew-1.0.tar.gz";
+    sha256 = "f596257c1db706ce35795b18d7f66a4db99d427725f20e9384914b534142579a";
+    md5 = "";
+    md5name = "f596257c1db706ce35795b18d7f66a4db99d427725f20e9384914b534142579a-libre-hebrew-1.0.tar.gz";
+  }
+  {
+    name = "alef-1.001.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/alef-1.001.tar.gz";
+    sha256 = "b98b67602a2c8880a1770f0b9e37c190f29a7e2ade5616784f0b89fbdb75bf52";
+    md5 = "";
+    md5name = "b98b67602a2c8880a1770f0b9e37c190f29a7e2ade5616784f0b89fbdb75bf52-alef-1.001.tar.gz";
+  }
+  {
+    name = "Amiri-0.111.zip";
+    url = "http://dev-www.libreoffice.org/src/Amiri-0.111.zip";
+    sha256 = "1fbfccced6348b5db2c1c21d5b319cd488e14d055702fa817a0f6cb83d882166";
+    md5 = "";
+    md5name = "1fbfccced6348b5db2c1c21d5b319cd488e14d055702fa817a0f6cb83d882166-Amiri-0.111.zip";
+  }
+  {
+    name = "ttf-kacst_2.01+mry.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/ttf-kacst_2.01+mry.tar.gz";
+    sha256 = "dca00f5e655f2f217a766faa73a81f542c5c204aa3a47017c3c2be0b31d00a56";
+    md5 = "";
+    md5name = "dca00f5e655f2f217a766faa73a81f542c5c204aa3a47017c3c2be0b31d00a56-ttf-kacst_2.01+mry.tar.gz";
+  }
+  {
+    name = "ReemKufi-0.7.zip";
+    url = "http://dev-www.libreoffice.org/src/ReemKufi-0.7.zip";
+    sha256 = "f60c6508d209ce4236d2d7324256c2ffddd480be7e3d6023770b93dc391a605f";
+    md5 = "";
+    md5name = "f60c6508d209ce4236d2d7324256c2ffddd480be7e3d6023770b93dc391a605f-ReemKufi-0.7.zip";
+  }
+  {
+    name = "Scheherazade-2.100.zip";
+    url = "http://dev-www.libreoffice.org/src/Scheherazade-2.100.zip";
+    sha256 = "251c8817ceb87d9b661ce1d5b49e732a0116add10abc046be4b8ba5196e149b5";
+    md5 = "";
+    md5name = "251c8817ceb87d9b661ce1d5b49e732a0116add10abc046be4b8ba5196e149b5-Scheherazade-2.100.zip";
+  }
+  {
+    name = "libfreehand-0.1.2.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libfreehand-0.1.2.tar.xz";
+    sha256 = "0e422d1564a6dbf22a9af598535425271e583514c0f7ba7d9091676420de34ac";
+    md5 = "";
+    md5name = "0e422d1564a6dbf22a9af598535425271e583514c0f7ba7d9091676420de34ac-libfreehand-0.1.2.tar.xz";
+  }
+  {
+    name = "freetype-2.8.1.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/freetype-2.8.1.tar.bz2";
+    sha256 = "e5435f02e02d2b87bb8e4efdcaa14b1f78c9cf3ab1ed80f94b6382fb6acc7d78";
+    md5 = "";
+    md5name = "e5435f02e02d2b87bb8e4efdcaa14b1f78c9cf3ab1ed80f94b6382fb6acc7d78-freetype-2.8.1.tar.bz2";
+  }
+  {
+    name = "glm-0.9.4.6-libreoffice.zip";
+    url = "http://dev-www.libreoffice.org/src/bae83fa5dc7f081768daace6e199adc3-glm-0.9.4.6-libreoffice.zip";
+    sha256 = "d0312c360efe04dd048b3311fe375ff36f1993b4c2e3cb58c81062990532904a";
+    md5 = "bae83fa5dc7f081768daace6e199adc3";
+    md5name = "bae83fa5dc7f081768daace6e199adc3-glm-0.9.4.6-libreoffice.zip";
+  }
+  {
+    name = "gpgme-1.9.0.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/gpgme-1.9.0.tar.bz2";
+    sha256 = "1b29fedb8bfad775e70eafac5b0590621683b2d9869db994568e6401f4034ceb";
+    md5 = "";
+    md5name = "1b29fedb8bfad775e70eafac5b0590621683b2d9869db994568e6401f4034ceb-gpgme-1.9.0.tar.bz2";
+  }
+  {
+    name = "graphite2-minimal-1.3.10.tgz";
+    url = "http://dev-www.libreoffice.org/src/graphite2-minimal-1.3.10.tgz";
+    sha256 = "aa5e58356cd084000609ebbd93fef456a1bc0ab9e46fea20e81552fb286232a9";
+    md5 = "";
+    md5name = "aa5e58356cd084000609ebbd93fef456a1bc0ab9e46fea20e81552fb286232a9-graphite2-minimal-1.3.10.tgz";
+  }
+  {
+    name = "harfbuzz-1.8.4.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/harfbuzz-1.8.4.tar.bz2";
+    sha256 = "3c592f86fa0da69e2e0e98cae9f5d5b61def3bb7948aa00ca45748f27fa545fd";
+    md5 = "";
+    md5name = "3c592f86fa0da69e2e0e98cae9f5d5b61def3bb7948aa00ca45748f27fa545fd-harfbuzz-1.8.4.tar.bz2";
+  }
+  {
+    name = "hsqldb_1_8_0.zip";
+    url = "http://dev-www.libreoffice.org/src/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip";
+    sha256 = "d30b13f4ba2e3b6a2d4f020c0dee0a9fb9fc6fbcc2d561f36b78da4bf3802370";
+    md5 = "17410483b5b5f267aa18b7e00b65e6e0";
+    md5name = "17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip";
+  }
+  {
+    name = "hunspell-1.6.2.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/hunspell-1.6.2.tar.gz";
+    sha256 = "3cd9ceb062fe5814f668e4f22b2fa6e3ba0b339b921739541ce180cac4d6f4c4";
+    md5 = "";
+    md5name = "3cd9ceb062fe5814f668e4f22b2fa6e3ba0b339b921739541ce180cac4d6f4c4-hunspell-1.6.2.tar.gz";
+  }
+  {
+    name = "hyphen-2.8.8.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/5ade6ae2a99bc1e9e57031ca88d36dad-hyphen-2.8.8.tar.gz";
+    sha256 = "304636d4eccd81a14b6914d07b84c79ebb815288c76fe027b9ebff6ff24d5705";
+    md5 = "5ade6ae2a99bc1e9e57031ca88d36dad";
+    md5name = "5ade6ae2a99bc1e9e57031ca88d36dad-hyphen-2.8.8.tar.gz";
+  }
+  {
+    name = "icu4c-61_1-src.tgz";
+    url = "http://dev-www.libreoffice.org/src/icu4c-61_1-src.tgz";
+    sha256 = "d007f89ae8a2543a53525c74359b65b36412fa84b3349f1400be6dcf409fafef";
+    md5 = "";
+    md5name = "d007f89ae8a2543a53525c74359b65b36412fa84b3349f1400be6dcf409fafef-icu4c-61_1-src.tgz";
+  }
+  {
+    name = "icu4c-61_1-data.zip";
+    url = "http://dev-www.libreoffice.org/src/icu4c-61_1-data.zip";
+    sha256 = "d149ed0985b5a6e16a9d8ed66f105dd58fd334c276779f74241cfa656ed2830a";
+    md5 = "";
+    md5name = "d149ed0985b5a6e16a9d8ed66f105dd58fd334c276779f74241cfa656ed2830a-icu4c-61_1-data.zip";
+  }
+  {
+    name = "flow-engine-0.9.4.zip";
+    url = "http://dev-www.libreoffice.org/src/ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip";
+    sha256 = "233f66e8d25c5dd971716d4200203a612a407649686ef3b52075d04b4c9df0dd";
+    md5 = "ba2930200c9f019c2d93a8c88c651a0f";
+    md5name = "ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip";
+  }
+  {
+    name = "flute-1.1.6.zip";
+    url = "http://dev-www.libreoffice.org/src/d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip";
+    sha256 = "1b5b24f7bc543c0362b667692f78db8bab4ed6dafc6172f104d0bd3757d8a133";
+    md5 = "d8bd5eed178db6e2b18eeed243f85aa8";
+    md5name = "d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip";
+  }
+  {
+    name = "libbase-1.1.6.zip";
+    url = "http://dev-www.libreoffice.org/src/eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip";
+    sha256 = "75c80359c9ce343c20aab8a36a45cb3b9ee7c61cf92c13ae45399d854423a9ba";
+    md5 = "eeb2c7ddf0d302fba4bfc6e97eac9624";
+    md5name = "eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip";
+  }
+  {
+    name = "libfonts-1.1.6.zip";
+    url = "http://dev-www.libreoffice.org/src/3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip";
+    sha256 = "e0531091787c0f16c83965fdcbc49162c059d7f0c64669e7f119699321549743";
+    md5 = "3bdf40c0d199af31923e900d082ca2dd";
+    md5name = "3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip";
+  }
+  {
+    name = "libformula-1.1.7.zip";
+    url = "http://dev-www.libreoffice.org/src/3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip";
+    sha256 = "5826d1551bf599b85742545f6e01a0079b93c1b2c8434bf409eddb3a29e4726b";
+    md5 = "3404ab6b1792ae5f16bbd603bd1e1d03";
+    md5name = "3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip";
+  }
+  {
+    name = "liblayout-0.2.10.zip";
+    url = "http://dev-www.libreoffice.org/src/db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip";
+    sha256 = "e1fb87f3f7b980d33414473279615c4644027e013012d156efa538bc2b031772";
+    md5 = "db60e4fde8dd6d6807523deb71ee34dc";
+    md5name = "db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip";
+  }
+  {
+    name = "libloader-1.1.6.zip";
+    url = "http://dev-www.libreoffice.org/src/97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip";
+    sha256 = "3d853b19b1d94a6efa69e7af90f7f2b09ecf302913bee3da796c15ecfebcfac8";
+    md5 = "97b2d4dba862397f446b217e2b623e71";
+    md5name = "97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip";
+  }
+  {
+    name = "librepository-1.1.6.zip";
+    url = "http://dev-www.libreoffice.org/src/8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip";
+    sha256 = "abe2c57ac12ba45d83563b02e240fa95d973376de2f720aab8fe11f2e621c095";
+    md5 = "8ce2fcd72becf06c41f7201d15373ed9";
+    md5name = "8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip";
+  }
+  {
+    name = "libserializer-1.1.6.zip";
+    url = "http://dev-www.libreoffice.org/src/f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip";
+    sha256 = "05640a1f6805b2b2d7e2cb9c50db9a5cb084e3c52ab1a71ce015239b4a1d4343";
+    md5 = "f94d9870737518e3b597f9265f4e9803";
+    md5name = "f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip";
+  }
+  {
+    name = "libxml-1.1.7.zip";
+    url = "http://dev-www.libreoffice.org/src/ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip";
+    sha256 = "7d2797fe9f79a77009721e3f14fa4a1dec17a6d706bdc93f85f1f01d124fab66";
+    md5 = "ace6ab49184e329db254e454a010f56d";
+    md5name = "ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip";
+  }
+  {
+    name = "sacjava-1.3.zip";
+    url = "http://dev-www.libreoffice.org/src/39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip";
+    sha256 = "085f2112c51fa8c1783fac12fbd452650596415121348393bb51f0f7e85a9045";
+    md5 = "39bb3fcea1514f1369fcfc87542390fd";
+    md5name = "39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip";
+  }
+  {
+    name = "libjpeg-turbo-1.5.2.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/libjpeg-turbo-1.5.2.tar.gz";
+    sha256 = "9098943b270388727ae61de82adec73cf9f0dbb240b3bc8b172595ebf405b528";
+    md5 = "";
+    md5name = "9098943b270388727ae61de82adec73cf9f0dbb240b3bc8b172595ebf405b528-libjpeg-turbo-1.5.2.tar.gz";
+  }
+  {
+    name = "language-subtag-registry-2018-04-23.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/language-subtag-registry-2018-04-23.tar.bz2";
+    sha256 = "14c21f4533ca74e3af9e09184d6756a750d0cd46099015ba8c595e48499aa878";
+    md5 = "";
+    md5name = "14c21f4533ca74e3af9e09184d6756a750d0cd46099015ba8c595e48499aa878-language-subtag-registry-2018-04-23.tar.bz2";
+  }
+  {
+    name = "JLanguageTool-1.7.0.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/b63e6340a02ff1cacfeadb2c42286161-JLanguageTool-1.7.0.tar.bz2";
+    sha256 = "48c87e41636783bba438b65fd895821e369ed139e1465fac654323ad93c5a82d";
+    md5 = "b63e6340a02ff1cacfeadb2c42286161";
+    md5name = "b63e6340a02ff1cacfeadb2c42286161-JLanguageTool-1.7.0.tar.bz2";
+  }
+  {
+    name = "lcms2-2.9.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/lcms2-2.9.tar.gz";
+    sha256 = "48c6fdf98396fa245ed86e622028caf49b96fa22f3e5734f853f806fbc8e7d20";
+    md5 = "";
+    md5name = "48c6fdf98396fa245ed86e622028caf49b96fa22f3e5734f853f806fbc8e7d20-lcms2-2.9.tar.gz";
+  }
+  {
+    name = "libassuan-2.5.1.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/libassuan-2.5.1.tar.bz2";
+    sha256 = "47f96c37b4f2aac289f0bc1bacfa8bd8b4b209a488d3d15e2229cb6cc9b26449";
+    md5 = "";
+    md5name = "47f96c37b4f2aac289f0bc1bacfa8bd8b4b209a488d3d15e2229cb6cc9b26449-libassuan-2.5.1.tar.bz2";
+  }
+  {
+    name = "libatomic_ops-7_2d.zip";
+    url = "http://dev-www.libreoffice.org/src/libatomic_ops-7_2d.zip";
+    sha256 = "cf5c52f08a2067ae4fe7c8919e3c1ccf3ee917f1749e0bcc7efffff59c68d9ad";
+    md5 = "";
+    md5name = "cf5c52f08a2067ae4fe7c8919e3c1ccf3ee917f1749e0bcc7efffff59c68d9ad-libatomic_ops-7_2d.zip";
+  }
+  {
+    name = "libeot-0.01.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/libeot-0.01.tar.bz2";
+    sha256 = "cf5091fa8e7dcdbe667335eb90a2cfdd0a3fe8f8c7c8d1ece44d9d055736a06a";
+    md5 = "";
+    md5name = "cf5091fa8e7dcdbe667335eb90a2cfdd0a3fe8f8c7c8d1ece44d9d055736a06a-libeot-0.01.tar.bz2";
+  }
+  {
+    name = "libexttextcat-3.4.5.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libexttextcat-3.4.5.tar.xz";
+    sha256 = "13fdbc9d4c489a4d0519e51933a1aa21fe3fb9eb7da191b87f7a63e82797dac8";
+    md5 = "";
+    md5name = "13fdbc9d4c489a4d0519e51933a1aa21fe3fb9eb7da191b87f7a63e82797dac8-libexttextcat-3.4.5.tar.xz";
+  }
+  {
+    name = "libgpg-error-1.27.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/libgpg-error-1.27.tar.bz2";
+    sha256 = "4f93aac6fecb7da2b92871bb9ee33032be6a87b174f54abf8ddf0911a22d29d2";
+    md5 = "";
+    md5name = "4f93aac6fecb7da2b92871bb9ee33032be6a87b174f54abf8ddf0911a22d29d2-libgpg-error-1.27.tar.bz2";
+  }
+  {
+    name = "liblangtag-0.6.2.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/liblangtag-0.6.2.tar.bz2";
+    sha256 = "d6242790324f1432fb0a6fae71b6851f520b2c5a87675497cf8ea14c2924d52e";
+    md5 = "";
+    md5name = "d6242790324f1432fb0a6fae71b6851f520b2c5a87675497cf8ea14c2924d52e-liblangtag-0.6.2.tar.bz2";
+  }
+  {
+    name = "libnumbertext-1.0.4.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libnumbertext-1.0.4.tar.xz";
+    sha256 = "349258f4c3a8b090893e847b978b22e8dc1343d4ada3bfba811b97144f1dd67b";
+    md5 = "";
+    md5name = "349258f4c3a8b090893e847b978b22e8dc1343d4ada3bfba811b97144f1dd67b-libnumbertext-1.0.4.tar.xz";
+  }
+  {
+    name = "ltm-1.0.zip";
+    url = "http://dev-www.libreoffice.org/src/ltm-1.0.zip";
+    sha256 = "083daa92d8ee6f4af96a6143b12d7fc8fe1a547e14f862304f7281f8f7347483";
+    md5 = "";
+    md5name = "083daa92d8ee6f4af96a6143b12d7fc8fe1a547e14f862304f7281f8f7347483-ltm-1.0.zip";
+  }
+  {
+    name = "xmlsec1-1.2.25.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/xmlsec1-1.2.25.tar.gz";
+    sha256 = "967ca83edf25ccb5b48a3c4a09ad3405a63365576503bf34290a42de1b92fcd2";
+    md5 = "";
+    md5name = "967ca83edf25ccb5b48a3c4a09ad3405a63365576503bf34290a42de1b92fcd2-xmlsec1-1.2.25.tar.gz";
+  }
+  {
+    name = "libxml2-2.9.9.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/libxml2-2.9.9.tar.gz";
+    sha256 = "94fb70890143e3c6549f265cee93ec064c80a84c42ad0f23e85ee1fd6540a871";
+    md5 = "";
+    md5name = "94fb70890143e3c6549f265cee93ec064c80a84c42ad0f23e85ee1fd6540a871-libxml2-2.9.9.tar.gz";
+  }
+  {
+    name = "libxslt-1.1.33.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/libxslt-1.1.33.tar.gz";
+    sha256 = "8e36605144409df979cab43d835002f63988f3dc94d5d3537c12796db90e38c8";
+    md5 = "";
+    md5name = "8e36605144409df979cab43d835002f63988f3dc94d5d3537c12796db90e38c8-libxslt-1.1.33.tar.gz";
+  }
+  {
+    name = "lp_solve_5.5.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz";
+    sha256 = "171816288f14215c69e730f7a4f1c325739873e21f946ff83884b350574e6695";
+    md5 = "26b3e95ddf3d9c077c480ea45874b3b8";
+    md5name = "26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz";
+  }
+  {
+    name = "lxml-4.1.1.tgz";
+    url = "http://dev-www.libreoffice.org/src/lxml-4.1.1.tgz";
+    sha256 = "940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a5cfd0f40e";
+    md5 = "";
+    md5name = "940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a5cfd0f40e-lxml-4.1.1.tgz";
+  }
+  {
+    name = "mariadb_client-2.0.0-src.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/a233181e03d3c307668b4c722d881661-mariadb_client-2.0.0-src.tar.gz";
+    sha256 = "fd2f751dea049c1907735eb236aeace1d811d6a8218118b00bbaa9b84dc5cd60";
+    md5 = "a233181e03d3c307668b4c722d881661";
+    md5name = "a233181e03d3c307668b4c722d881661-mariadb_client-2.0.0-src.tar.gz";
+  }
+  {
+    name = "mdds-1.3.1.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/mdds-1.3.1.tar.bz2";
+    sha256 = "dcb8cd2425567a5a5ec164afea475bce57784bca3e352ad4cbdd3d1a7e08e5a1";
+    md5 = "";
+    md5name = "dcb8cd2425567a5a5ec164afea475bce57784bca3e352ad4cbdd3d1a7e08e5a1-mdds-1.3.1.tar.bz2";
+  }
+  {
+    name = "mDNSResponder-576.30.4.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/mDNSResponder-576.30.4.tar.gz";
+    sha256 = "4737cb51378377e11d0edb7bcdd1bec79cbdaa7b27ea09c13e3006e58f8d92c0";
+    md5 = "";
+    md5name = "4737cb51378377e11d0edb7bcdd1bec79cbdaa7b27ea09c13e3006e58f8d92c0-mDNSResponder-576.30.4.tar.gz";
+  }
+  {
+    name = "libmspub-0.1.4.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libmspub-0.1.4.tar.xz";
+    sha256 = "ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba";
+    md5 = "";
+    md5name = "ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba-libmspub-0.1.4.tar.xz";
+  }
+  {
+    name = "libmwaw-0.3.14.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libmwaw-0.3.14.tar.xz";
+    sha256 = "aca8bf1ce55ed83adbea82c70d4c8bebe8139f334b3481bf5a6e407f91f33ce9";
+    md5 = "";
+    md5name = "aca8bf1ce55ed83adbea82c70d4c8bebe8139f334b3481bf5a6e407f91f33ce9-libmwaw-0.3.14.tar.xz";
+  }
+  {
+    name = "mysql-connector-c++-1.1.4.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/7239a4430efd4d0189c4f24df67f08e5-mysql-connector-c++-1.1.4.tar.gz";
+    sha256 = "a25f14dad39e93a2f9cdf09166ee53981f7212dce829e4208e07a522963a8585";
+    md5 = "7239a4430efd4d0189c4f24df67f08e5";
+    md5name = "7239a4430efd4d0189c4f24df67f08e5-mysql-connector-c++-1.1.4.tar.gz";
+  }
+  {
+    name = "mythes-1.2.4.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz";
+    sha256 = "1e81f395d8c851c3e4e75b568e20fa2fa549354e75ab397f9de4b0e0790a305f";
+    md5 = "a8c2c5b8f09e7ede322d5c602ff6a4b6";
+    md5name = "a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz";
+  }
+  {
+    name = "neon-0.30.2.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/neon-0.30.2.tar.gz";
+    sha256 = "db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d3d967fbca";
+    md5 = "";
+    md5name = "db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d3d967fbca-neon-0.30.2.tar.gz";
+  }
+  {
+    name = "nss-3.38-with-nspr-4.19.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/nss-3.38-with-nspr-4.19.tar.gz";
+    sha256 = "f271ec73291fa3e4bd4b59109f8035cc3a192fc33886f40ed4f9ee4b31c746e9";
+    md5 = "";
+    md5name = "f271ec73291fa3e4bd4b59109f8035cc3a192fc33886f40ed4f9ee4b31c746e9-nss-3.38-with-nspr-4.19.tar.gz";
+  }
+  {
+    name = "libodfgen-0.1.6.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/libodfgen-0.1.6.tar.bz2";
+    sha256 = "2c7b21892f84a4c67546f84611eccdad6259875c971e98ddb027da66ea0ac9c2";
+    md5 = "";
+    md5name = "2c7b21892f84a4c67546f84611eccdad6259875c971e98ddb027da66ea0ac9c2-libodfgen-0.1.6.tar.bz2";
+  }
+  {
+    name = "odfvalidator-1.2.0-incubating-SNAPSHOT-jar-with-dependencies+ODFTOOLKIT-460+ODFTOOLKIT-475.jar";
+    url = "http://dev-www.libreoffice.org/src/../extern/odfvalidator-1.2.0-incubating-SNAPSHOT-jar-with-dependencies+ODFTOOLKIT-460+ODFTOOLKIT-475.jar";
+    sha256 = "702413413a5d8076c17fe79c0808dfba145a7260020f6c8627ea529a0cf83769";
+    md5 = "";
+    md5name = "702413413a5d8076c17fe79c0808dfba145a7260020f6c8627ea529a0cf83769-odfvalidator-1.2.0-incubating-SNAPSHOT-jar-with-dependencies+ODFTOOLKIT-460+ODFTOOLKIT-475.jar";
+  }
+  {
+    name = "officeotron-0.7.4-master.jar";
+    url = "http://dev-www.libreoffice.org/src/../extern/8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar";
+    sha256 = "f2443f27561af52324eee03a1892d9f569adc8db9e7bca55614898bc2a13a770";
+    md5 = "8249374c274932a21846fa7629c2aa9b";
+    md5name = "8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar";
+  }
+  {
+    name = "openldap-2.4.45.tgz";
+    url = "http://dev-www.libreoffice.org/src/openldap-2.4.45.tgz";
+    sha256 = "cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb897cd5626df3824";
+    md5 = "";
+    md5name = "cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb897cd5626df3824-openldap-2.4.45.tgz";
+  }
+  {
+    name = "openssl-1.0.2p.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/openssl-1.0.2p.tar.gz";
+    sha256 = "50a98e07b1a89eb8f6a99477f262df71c6fa7bef77df4dc83025a2845c827d00";
+    md5 = "";
+    md5name = "50a98e07b1a89eb8f6a99477f262df71c6fa7bef77df4dc83025a2845c827d00-openssl-1.0.2p.tar.gz";
+  }
+  {
+    name = "liborcus-0.13.4.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/liborcus-0.13.4.tar.gz";
+    sha256 = "bc01b1b3e9091416f498840d3c19a1aa2704b448100e7f6b80eefe88aab06d5b";
+    md5 = "";
+    md5name = "bc01b1b3e9091416f498840d3c19a1aa2704b448100e7f6b80eefe88aab06d5b-liborcus-0.13.4.tar.gz";
+  }
+  {
+    name = "owncloud-android-library-0.9.4-no-binary-deps.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/owncloud-android-library-0.9.4-no-binary-deps.tar.gz";
+    sha256 = "b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb";
+    md5 = "";
+    md5name = "b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb-owncloud-android-library-0.9.4-no-binary-deps.tar.gz";
+  }
+  {
+    name = "libpagemaker-0.0.4.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libpagemaker-0.0.4.tar.xz";
+    sha256 = "66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d";
+    md5 = "";
+    md5name = "66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d-libpagemaker-0.0.4.tar.xz";
+  }
+  {
+    name = "pdfium-3426.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/pdfium-3426.tar.bz2";
+    sha256 = "80331b48166501a192d65476932f17044eeb5f10faa6ea50f4f175169475c957";
+    md5 = "";
+    md5name = "80331b48166501a192d65476932f17044eeb5f10faa6ea50f4f175169475c957-pdfium-3426.tar.bz2";
+  }
+  {
+    name = "pixman-0.34.0.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz";
+    sha256 = "21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e";
+    md5 = "e80ebae4da01e77f68744319f01d52a3";
+    md5name = "e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz";
+  }
+  {
+    name = "libpng-1.6.34.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libpng-1.6.34.tar.xz";
+    sha256 = "2f1e960d92ce3b3abd03d06dfec9637dfbd22febf107a536b44f7a47c60659f6";
+    md5 = "";
+    md5name = "2f1e960d92ce3b3abd03d06dfec9637dfbd22febf107a536b44f7a47c60659f6-libpng-1.6.34.tar.xz";
+  }
+  {
+    name = "poppler-0.73.0.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/poppler-0.73.0.tar.xz";
+    sha256 = "e44b5543903128884ba4538c2a97d3bcc8889e97ffacc4636112101f0238db03";
+    md5 = "";
+    md5name = "e44b5543903128884ba4538c2a97d3bcc8889e97ffacc4636112101f0238db03-poppler-0.73.0.tar.xz";
+  }
+  {
+    name = "postgresql-9.2.1.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/c0b4799ea9850eae3ead14f0a60e9418-postgresql-9.2.1.tar.bz2";
+    sha256 = "db61d498105a7d5fe46185e67ac830c878cdd7dc1f82a87f06b842217924c461";
+    md5 = "c0b4799ea9850eae3ead14f0a60e9418";
+    md5name = "c0b4799ea9850eae3ead14f0a60e9418-postgresql-9.2.1.tar.bz2";
+  }
+  {
+    name = "Python-3.5.5.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/Python-3.5.5.tar.xz";
+    sha256 = "063d2c3b0402d6191b90731e0f735c64830e7522348aeb7ed382a83165d45009";
+    md5 = "";
+    md5name = "063d2c3b0402d6191b90731e0f735c64830e7522348aeb7ed382a83165d45009-Python-3.5.5.tar.xz";
+  }
+  {
+    name = "libqxp-0.0.1.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libqxp-0.0.1.tar.xz";
+    sha256 = "8c257f6184ff94aefa7c9fa1cfae82083d55a49247266905c71c53e013f95c73";
+    md5 = "";
+    md5name = "8c257f6184ff94aefa7c9fa1cfae82083d55a49247266905c71c53e013f95c73-libqxp-0.0.1.tar.xz";
+  }
+  {
+    name = "raptor2-2.0.15.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/a39f6c07ddb20d7dd2ff1f95fa21e2cd-raptor2-2.0.15.tar.gz";
+    sha256 = "ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed";
+    md5 = "a39f6c07ddb20d7dd2ff1f95fa21e2cd";
+    md5name = "a39f6c07ddb20d7dd2ff1f95fa21e2cd-raptor2-2.0.15.tar.gz";
+  }
+  {
+    name = "rasqal-0.9.33.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/1f5def51ca0026cd192958ef07228b52-rasqal-0.9.33.tar.gz";
+    sha256 = "6924c9ac6570bd241a9669f83b467c728a322470bf34f4b2da4f69492ccfd97c";
+    md5 = "1f5def51ca0026cd192958ef07228b52";
+    md5name = "1f5def51ca0026cd192958ef07228b52-rasqal-0.9.33.tar.gz";
+  }
+  {
+    name = "redland-1.0.17.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/e5be03eda13ef68aabab6e42aa67715e-redland-1.0.17.tar.gz";
+    sha256 = "de1847f7b59021c16bdc72abb4d8e2d9187cd6124d69156f3326dd34ee043681";
+    md5 = "e5be03eda13ef68aabab6e42aa67715e";
+    md5name = "e5be03eda13ef68aabab6e42aa67715e-redland-1.0.17.tar.gz";
+  }
+  {
+    name = "librevenge-0.0.4.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/librevenge-0.0.4.tar.bz2";
+    sha256 = "c51601cd08320b75702812c64aae0653409164da7825fd0f451ac2c5dbe77cbf";
+    md5 = "";
+    md5name = "c51601cd08320b75702812c64aae0653409164da7825fd0f451ac2c5dbe77cbf-librevenge-0.0.4.tar.bz2";
+  }
+  {
+    name = "rhino1_5R5.zip";
+    url = "http://dev-www.libreoffice.org/src/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip";
+    sha256 = "1fb458d6aab06932693cc8a9b6e4e70944ee1ff052fa63606e3131df34e21753";
+    md5 = "798b2ffdc8bcfe7bca2cf92b62caf685";
+    md5name = "798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip";
+  }
+  {
+    name = "serf-1.2.1.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/serf-1.2.1.tar.bz2";
+    sha256 = "6988d394b62c3494635b6f0760bc3079f9a0cd380baf0f6b075af1eb9fa5e700";
+    md5 = "";
+    md5name = "6988d394b62c3494635b6f0760bc3079f9a0cd380baf0f6b075af1eb9fa5e700-serf-1.2.1.tar.bz2";
+  }
+  {
+    name = "libstaroffice-0.0.6.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libstaroffice-0.0.6.tar.xz";
+    sha256 = "6b00e1ed8194e6072be4441025d1b888e39365727ed5b23e0e8c92c4009d1ec4";
+    md5 = "";
+    md5name = "6b00e1ed8194e6072be4441025d1b888e39365727ed5b23e0e8c92c4009d1ec4-libstaroffice-0.0.6.tar.xz";
+  }
+  {
+    name = "swingExSrc.zip";
+    url = "http://dev-www.libreoffice.org/src/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip";
+    sha256 = "64585ac36a81291a58269ec5347e7e3e2e8596dbacb9221015c208191333c6e1";
+    md5 = "35c94d2df8893241173de1d16b6034c0";
+    md5name = "35c94d2df8893241173de1d16b6034c0-swingExSrc.zip";
+  }
+  {
+    name = "twaindsm_2.4.1.orig.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/twaindsm_2.4.1.orig.tar.gz";
+    sha256 = "82c818be771f242388457aa8c807e4b52aa84dc22b21c6c56184a6b4cbb085e6";
+    md5 = "";
+    md5name = "82c818be771f242388457aa8c807e4b52aa84dc22b21c6c56184a6b4cbb085e6-twaindsm_2.4.1.orig.tar.gz";
+  }
+  {
+    name = "ucpp-1.3.2.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz";
+    sha256 = "983941d31ee8d366085cadf28db75eb1f5cb03ba1e5853b98f12f7f51c63b776";
+    md5 = "0168229624cfac409e766913506961a8";
+    md5name = "0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz";
+  }
+  {
+    name = "libvisio-0.1.6.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libvisio-0.1.6.tar.xz";
+    sha256 = "fe1002d3671d53c09bc65e47ec948ec7b67e6fb112ed1cd10966e211a8bb50f9";
+    md5 = "";
+    md5name = "fe1002d3671d53c09bc65e47ec948ec7b67e6fb112ed1cd10966e211a8bb50f9-libvisio-0.1.6.tar.xz";
+  }
+  {
+    name = "libwpd-0.10.2.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libwpd-0.10.2.tar.xz";
+    sha256 = "323f68beaf4f35e5a4d7daffb4703d0566698280109210fa4eaa90dea27d6610";
+    md5 = "";
+    md5name = "323f68beaf4f35e5a4d7daffb4703d0566698280109210fa4eaa90dea27d6610-libwpd-0.10.2.tar.xz";
+  }
+  {
+    name = "libwpg-0.3.2.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libwpg-0.3.2.tar.xz";
+    sha256 = "57faf1ab97d63d57383ac5d7875e992a3d190436732f4083310c0471e72f8c33";
+    md5 = "";
+    md5name = "57faf1ab97d63d57383ac5d7875e992a3d190436732f4083310c0471e72f8c33-libwpg-0.3.2.tar.xz";
+  }
+  {
+    name = "libwps-0.4.9.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libwps-0.4.9.tar.xz";
+    sha256 = "13beb0c733bb1544a542b6ab1d9d205f218e9a2202d1d4cac056f79f6db74922";
+    md5 = "";
+    md5name = "13beb0c733bb1544a542b6ab1d9d205f218e9a2202d1d4cac056f79f6db74922-libwps-0.4.9.tar.xz";
+  }
+  {
+    name = "xsltml_2.1.2.zip";
+    url = "http://dev-www.libreoffice.org/src/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip";
+    sha256 = "75823776fb51a9c526af904f1503a7afaaab900fba83eda64f8a41073724c870";
+    md5 = "a7983f859eafb2677d7ff386a023bc40";
+    md5name = "a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip";
+  }
+  {
+    name = "zlib-1.2.11.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/zlib-1.2.11.tar.xz";
+    sha256 = "4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066";
+    md5 = "";
+    md5name = "4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066-zlib-1.2.11.tar.xz";
+  }
+  {
+    name = "libzmf-0.0.2.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libzmf-0.0.2.tar.xz";
+    sha256 = "27051a30cb057fdb5d5de65a1f165c7153dc76e27fe62251cbb86639eb2caf22";
+    md5 = "";
+    md5name = "27051a30cb057fdb5d5de65a1f165c7153dc76e27fe62251cbb86639eb2caf22-libzmf-0.0.2.tar.xz";
+  }
+]
diff --git a/nixpkgs/pkgs/applications/office/libreoffice/libreoffice-srcs.nix b/nixpkgs/pkgs/applications/office/libreoffice/libreoffice-srcs.nix
new file mode 100644
index 000000000000..e9eeacf63b52
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/libreoffice/libreoffice-srcs.nix
@@ -0,0 +1,856 @@
+[
+  {
+    name = "libabw-0.1.2.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libabw-0.1.2.tar.xz";
+    sha256 = "0b72944d5af81dda0a5c5803ee84cbac4b81441a4d767aa57029adc6744c2485";
+    md5 = "";
+    md5name = "0b72944d5af81dda0a5c5803ee84cbac4b81441a4d767aa57029adc6744c2485-libabw-0.1.2.tar.xz";
+  }
+  {
+    name = "commons-logging-1.2-src.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/commons-logging-1.2-src.tar.gz";
+    sha256 = "49665da5a60d033e6dff40fe0a7f9173e886ae859ce6096c1afe34c48b677c81";
+    md5 = "";
+    md5name = "49665da5a60d033e6dff40fe0a7f9173e886ae859ce6096c1afe34c48b677c81-commons-logging-1.2-src.tar.gz";
+  }
+  {
+    name = "apr-1.5.2.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/apr-1.5.2.tar.gz";
+    sha256 = "1af06e1720a58851d90694a984af18355b65bb0d047be03ec7d659c746d6dbdb";
+    md5 = "";
+    md5name = "1af06e1720a58851d90694a984af18355b65bb0d047be03ec7d659c746d6dbdb-apr-1.5.2.tar.gz";
+  }
+  {
+    name = "apr-util-1.5.4.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/apr-util-1.5.4.tar.gz";
+    sha256 = "976a12a59bc286d634a21d7be0841cc74289ea9077aa1af46be19d1a6e844c19";
+    md5 = "";
+    md5name = "976a12a59bc286d634a21d7be0841cc74289ea9077aa1af46be19d1a6e844c19-apr-util-1.5.4.tar.gz";
+  }
+  {
+    name = "boost_1_66_0.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/boost_1_66_0.tar.bz2";
+    sha256 = "5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9";
+    md5 = "";
+    md5name = "5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9-boost_1_66_0.tar.bz2";
+  }
+  {
+    name = "breakpad.zip";
+    url = "http://dev-www.libreoffice.org/src/breakpad.zip";
+    sha256 = "7060149be16a8789b0ccf596bdeaf63115f03f520acb508f72a14686fb311cb9";
+    md5 = "";
+    md5name = "7060149be16a8789b0ccf596bdeaf63115f03f520acb508f72a14686fb311cb9-breakpad.zip";
+  }
+  {
+    name = "bsh-2.0b6-src.zip";
+    url = "http://dev-www.libreoffice.org/src/beeca87be45ec87d241ddd0e1bad80c1-bsh-2.0b6-src.zip";
+    sha256 = "9e93c73e23aff644b17dfff656444474c14150e7f3b38b19635e622235e01c96";
+    md5 = "beeca87be45ec87d241ddd0e1bad80c1";
+    md5name = "beeca87be45ec87d241ddd0e1bad80c1-bsh-2.0b6-src.zip";
+  }
+  {
+    name = "bzip2-1.0.6.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/00b516f4704d4a7cb50a1d97e6e8e15b-bzip2-1.0.6.tar.gz";
+    sha256 = "a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd";
+    md5 = "00b516f4704d4a7cb50a1d97e6e8e15b";
+    md5name = "00b516f4704d4a7cb50a1d97e6e8e15b-bzip2-1.0.6.tar.gz";
+  }
+  {
+    name = "cairo-1.15.12.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/cairo-1.15.12.tar.xz";
+    sha256 = "7623081b94548a47ee6839a7312af34e9322997806948b6eec421a8c6d0594c9";
+    md5 = "";
+    md5name = "7623081b94548a47ee6839a7312af34e9322997806948b6eec421a8c6d0594c9-cairo-1.15.12.tar.xz";
+  }
+  {
+    name = "libcdr-0.1.5.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libcdr-0.1.5.tar.xz";
+    sha256 = "6ace5c499a8be34ad871e825442ce388614ae2d8675c4381756a7319429e3a48";
+    md5 = "";
+    md5name = "6ace5c499a8be34ad871e825442ce388614ae2d8675c4381756a7319429e3a48-libcdr-0.1.5.tar.xz";
+  }
+  {
+    name = "clucene-core-2.3.3.4.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz";
+    sha256 = "ddfdc433dd8ad31b5c5819cc4404a8d2127472a3b720d3e744e8c51d79732eab";
+    md5 = "48d647fbd8ef8889e5a7f422c1bfda94";
+    md5name = "48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz";
+  }
+  {
+    name = "libcmis-0.5.2.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libcmis-0.5.2.tar.xz";
+    sha256 = "d7b18d9602190e10d437f8a964a32e983afd57e2db316a07d87477a79f5000a2";
+    md5 = "";
+    md5name = "d7b18d9602190e10d437f8a964a32e983afd57e2db316a07d87477a79f5000a2-libcmis-0.5.2.tar.xz";
+  }
+  {
+    name = "CoinMP-1.7.6.tgz";
+    url = "http://dev-www.libreoffice.org/src/CoinMP-1.7.6.tgz";
+    sha256 = "86c798780b9e1f5921fe4efe651a93cb420623b45aa1fdff57af8c37f116113f";
+    md5 = "";
+    md5name = "86c798780b9e1f5921fe4efe651a93cb420623b45aa1fdff57af8c37f116113f-CoinMP-1.7.6.tgz";
+  }
+  {
+    name = "cppunit-1.14.0.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/cppunit-1.14.0.tar.gz";
+    sha256 = "3d569869d27b48860210c758c4f313082103a5e58219a7669b52bfd29d674780";
+    md5 = "";
+    md5name = "3d569869d27b48860210c758c4f313082103a5e58219a7669b52bfd29d674780-cppunit-1.14.0.tar.gz";
+  }
+  {
+    name = "converttexttonumber-1-5-0.oxt";
+    url = "http://dev-www.libreoffice.org/src/1f467e5bb703f12cbbb09d5cf67ecf4a-converttexttonumber-1-5-0.oxt";
+    sha256 = "71b238efd2734be9800af07566daea8d6685aeed28db5eb5fa0e6453f4d85de3";
+    md5 = "1f467e5bb703f12cbbb09d5cf67ecf4a";
+    md5name = "1f467e5bb703f12cbbb09d5cf67ecf4a-converttexttonumber-1-5-0.oxt";
+  }
+  {
+    name = "curl-7.64.0.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/curl-7.64.0.tar.gz";
+    sha256 = "cb90d2eb74d4e358c1ed1489f8e3af96b50ea4374ad71f143fa4595e998d81b5";
+    md5 = "";
+    md5name = "cb90d2eb74d4e358c1ed1489f8e3af96b50ea4374ad71f143fa4595e998d81b5-curl-7.64.0.tar.gz";
+  }
+  {
+    name = "libe-book-0.1.3.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libe-book-0.1.3.tar.xz";
+    sha256 = "7e8d8ff34f27831aca3bc6f9cc532c2f90d2057c778963b884ff3d1e34dfe1f9";
+    md5 = "";
+    md5name = "7e8d8ff34f27831aca3bc6f9cc532c2f90d2057c778963b884ff3d1e34dfe1f9-libe-book-0.1.3.tar.xz";
+  }
+  {
+    name = "libepoxy-1.5.2.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libepoxy-1.5.2.tar.xz";
+    sha256 = "a9562386519eb3fd7f03209f279f697a8cba520d3c155d6e253c3e138beca7d8";
+    md5 = "";
+    md5name = "a9562386519eb3fd7f03209f279f697a8cba520d3c155d6e253c3e138beca7d8-libepoxy-1.5.2.tar.xz";
+  }
+  {
+    name = "epm-3.7.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/3ade8cfe7e59ca8e65052644fed9fca4-epm-3.7.tar.gz";
+    sha256 = "b3fc4c5445de6c9a801504a3ea3efb2d4ea9d5a622c9427e716736e7713ddb91";
+    md5 = "3ade8cfe7e59ca8e65052644fed9fca4";
+    md5name = "3ade8cfe7e59ca8e65052644fed9fca4-epm-3.7.tar.gz";
+  }
+  {
+    name = "libepubgen-0.1.1.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libepubgen-0.1.1.tar.xz";
+    sha256 = "03e084b994cbeffc8c3dd13303b2cb805f44d8f2c3b79f7690d7e3fc7f6215ad";
+    md5 = "";
+    md5name = "03e084b994cbeffc8c3dd13303b2cb805f44d8f2c3b79f7690d7e3fc7f6215ad-libepubgen-0.1.1.tar.xz";
+  }
+  {
+    name = "libetonyek-0.1.9.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libetonyek-0.1.9.tar.xz";
+    sha256 = "e61677e8799ce6e55b25afc11aa5339113f6a49cff031f336e32fa58635b1a4a";
+    md5 = "";
+    md5name = "e61677e8799ce6e55b25afc11aa5339113f6a49cff031f336e32fa58635b1a4a-libetonyek-0.1.9.tar.xz";
+  }
+  {
+    name = "expat-2.2.5.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/expat-2.2.5.tar.bz2";
+    sha256 = "d9dc32efba7e74f788fcc4f212a43216fc37cf5f23f4c2339664d473353aedf6";
+    md5 = "";
+    md5name = "d9dc32efba7e74f788fcc4f212a43216fc37cf5f23f4c2339664d473353aedf6-expat-2.2.5.tar.bz2";
+  }
+  {
+    name = "Firebird-3.0.0.32483-0.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/Firebird-3.0.0.32483-0.tar.bz2";
+    sha256 = "6994be3555e23226630c587444be19d309b25b0fcf1f87df3b4e3f88943e5860";
+    md5 = "";
+    md5name = "6994be3555e23226630c587444be19d309b25b0fcf1f87df3b4e3f88943e5860-Firebird-3.0.0.32483-0.tar.bz2";
+  }
+  {
+    name = "fontconfig-2.12.6.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/fontconfig-2.12.6.tar.bz2";
+    sha256 = "cf0c30807d08f6a28ab46c61b8dbd55c97d2f292cf88f3a07d3384687f31f017";
+    md5 = "";
+    md5name = "cf0c30807d08f6a28ab46c61b8dbd55c97d2f292cf88f3a07d3384687f31f017-fontconfig-2.12.6.tar.bz2";
+  }
+  {
+    name = "crosextrafonts-20130214.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/368f114c078f94214a308a74c7e991bc-crosextrafonts-20130214.tar.gz";
+    sha256 = "c48d1c2fd613c9c06c959c34da7b8388059e2408d2bb19845dc3ed35f76e4d09";
+    md5 = "368f114c078f94214a308a74c7e991bc";
+    md5name = "368f114c078f94214a308a74c7e991bc-crosextrafonts-20130214.tar.gz";
+  }
+  {
+    name = "crosextrafonts-carlito-20130920.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/c74b7223abe75949b4af367942d96c7a-crosextrafonts-carlito-20130920.tar.gz";
+    sha256 = "4bd12b6cbc321c1cf16da76e2c585c925ce956a08067ae6f6c64eff6ccfdaf5a";
+    md5 = "c74b7223abe75949b4af367942d96c7a";
+    md5name = "c74b7223abe75949b4af367942d96c7a-crosextrafonts-carlito-20130920.tar.gz";
+  }
+  {
+    name = "dejavu-fonts-ttf-2.37.zip";
+    url = "http://dev-www.libreoffice.org/src/33e1e61fab06a547851ed308b4ffef42-dejavu-fonts-ttf-2.37.zip";
+    sha256 = "7576310b219e04159d35ff61dd4a4ec4cdba4f35c00e002a136f00e96a908b0a";
+    md5 = "33e1e61fab06a547851ed308b4ffef42";
+    md5name = "33e1e61fab06a547851ed308b4ffef42-dejavu-fonts-ttf-2.37.zip";
+  }
+  {
+    name = "GentiumBasic_1102.zip";
+    url = "http://dev-www.libreoffice.org/src/1725634df4bb3dcb1b2c91a6175f8789-GentiumBasic_1102.zip";
+    sha256 = "2f1a2c5491d7305dffd3520c6375d2f3e14931ee35c6d8ae1e8f098bf1a7b3cc";
+    md5 = "1725634df4bb3dcb1b2c91a6175f8789";
+    md5name = "1725634df4bb3dcb1b2c91a6175f8789-GentiumBasic_1102.zip";
+  }
+  {
+    name = "liberation-narrow-fonts-ttf-1.07.6.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/liberation-narrow-fonts-ttf-1.07.6.tar.gz";
+    sha256 = "8879d89b5ff7b506c9fc28efc31a5c0b954bbe9333e66e5283d27d20a8519ea3";
+    md5 = "";
+    md5name = "8879d89b5ff7b506c9fc28efc31a5c0b954bbe9333e66e5283d27d20a8519ea3-liberation-narrow-fonts-ttf-1.07.6.tar.gz";
+  }
+  {
+    name = "liberation-fonts-ttf-2.00.4.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/liberation-fonts-ttf-2.00.4.tar.gz";
+    sha256 = "c40e95fc5e0ecb73d4be565ae2afc1114e2bc7dc5253e00ee92d8fd6cc4adf45";
+    md5 = "";
+    md5name = "c40e95fc5e0ecb73d4be565ae2afc1114e2bc7dc5253e00ee92d8fd6cc4adf45-liberation-fonts-ttf-2.00.4.tar.gz";
+  }
+  {
+    name = "LinLibertineG-20120116.zip";
+    url = "http://dev-www.libreoffice.org/src/e7a384790b13c29113e22e596ade9687-LinLibertineG-20120116.zip";
+    sha256 = "54adcb2bc8cac0927a647fbd9362f45eff48130ce6e2379dc3867643019e08c5";
+    md5 = "e7a384790b13c29113e22e596ade9687";
+    md5name = "e7a384790b13c29113e22e596ade9687-LinLibertineG-20120116.zip";
+  }
+  {
+    name = "source-code-pro-2.030R-ro-1.050R-it.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/907d6e99f241876695c19ff3db0b8923-source-code-pro-2.030R-ro-1.050R-it.tar.gz";
+    sha256 = "09466dce87653333f189acd8358c60c6736dcd95f042dee0b644bdcf65b6ae2f";
+    md5 = "907d6e99f241876695c19ff3db0b8923";
+    md5name = "907d6e99f241876695c19ff3db0b8923-source-code-pro-2.030R-ro-1.050R-it.tar.gz";
+  }
+  {
+    name = "source-sans-pro-2.010R-ro-1.065R-it.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/edc4d741888bc0d38e32dbaa17149596-source-sans-pro-2.010R-ro-1.065R-it.tar.gz";
+    sha256 = "e7bc9a1fec787a529e49f5a26b93dcdcf41506449dfc70f92cdef6d17eb6fb61";
+    md5 = "edc4d741888bc0d38e32dbaa17149596";
+    md5name = "edc4d741888bc0d38e32dbaa17149596-source-sans-pro-2.010R-ro-1.065R-it.tar.gz";
+  }
+  {
+    name = "source-serif-font-2.007R.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/source-serif-font-2.007R.tar.gz";
+    sha256 = "10b2bbb357d52bf0f516d3e0ac0a09b5f7901470fbf649b69dad9ccc2d29f7cb";
+    md5 = "";
+    md5name = "10b2bbb357d52bf0f516d3e0ac0a09b5f7901470fbf649b69dad9ccc2d29f7cb-source-serif-font-2.007R.tar.gz";
+  }
+  {
+    name = "EmojiOneColor-SVGinOT-1.3.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/EmojiOneColor-SVGinOT-1.3.tar.gz";
+    sha256 = "d1a08f7c10589f22740231017694af0a7a270760c8dec33d8d1c038e2be0a0c7";
+    md5 = "";
+    md5name = "d1a08f7c10589f22740231017694af0a7a270760c8dec33d8d1c038e2be0a0c7-EmojiOneColor-SVGinOT-1.3.tar.gz";
+  }
+  {
+    name = "noto-fonts-20171024.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/noto-fonts-20171024.tar.gz";
+    sha256 = "29acc15a4c4d6b51201ba5d60f303dfbc2e5acbfdb70413c9ae1ed34fa259994";
+    md5 = "";
+    md5name = "29acc15a4c4d6b51201ba5d60f303dfbc2e5acbfdb70413c9ae1ed34fa259994-noto-fonts-20171024.tar.gz";
+  }
+  {
+    name = "culmus-0.131.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/culmus-0.131.tar.gz";
+    sha256 = "dcf112cfcccb76328dcfc095f4d7c7f4d2f7e48d0eed5e78b100d1d77ce2ed1b";
+    md5 = "";
+    md5name = "dcf112cfcccb76328dcfc095f4d7c7f4d2f7e48d0eed5e78b100d1d77ce2ed1b-culmus-0.131.tar.gz";
+  }
+  {
+    name = "libre-hebrew-1.0.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/libre-hebrew-1.0.tar.gz";
+    sha256 = "f596257c1db706ce35795b18d7f66a4db99d427725f20e9384914b534142579a";
+    md5 = "";
+    md5name = "f596257c1db706ce35795b18d7f66a4db99d427725f20e9384914b534142579a-libre-hebrew-1.0.tar.gz";
+  }
+  {
+    name = "alef-1.001.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/alef-1.001.tar.gz";
+    sha256 = "b98b67602a2c8880a1770f0b9e37c190f29a7e2ade5616784f0b89fbdb75bf52";
+    md5 = "";
+    md5name = "b98b67602a2c8880a1770f0b9e37c190f29a7e2ade5616784f0b89fbdb75bf52-alef-1.001.tar.gz";
+  }
+  {
+    name = "Amiri-0.111.zip";
+    url = "http://dev-www.libreoffice.org/src/Amiri-0.111.zip";
+    sha256 = "1fbfccced6348b5db2c1c21d5b319cd488e14d055702fa817a0f6cb83d882166";
+    md5 = "";
+    md5name = "1fbfccced6348b5db2c1c21d5b319cd488e14d055702fa817a0f6cb83d882166-Amiri-0.111.zip";
+  }
+  {
+    name = "ttf-kacst_2.01+mry.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/ttf-kacst_2.01+mry.tar.gz";
+    sha256 = "dca00f5e655f2f217a766faa73a81f542c5c204aa3a47017c3c2be0b31d00a56";
+    md5 = "";
+    md5name = "dca00f5e655f2f217a766faa73a81f542c5c204aa3a47017c3c2be0b31d00a56-ttf-kacst_2.01+mry.tar.gz";
+  }
+  {
+    name = "ReemKufi-0.7.zip";
+    url = "http://dev-www.libreoffice.org/src/ReemKufi-0.7.zip";
+    sha256 = "f60c6508d209ce4236d2d7324256c2ffddd480be7e3d6023770b93dc391a605f";
+    md5 = "";
+    md5name = "f60c6508d209ce4236d2d7324256c2ffddd480be7e3d6023770b93dc391a605f-ReemKufi-0.7.zip";
+  }
+  {
+    name = "Scheherazade-2.100.zip";
+    url = "http://dev-www.libreoffice.org/src/Scheherazade-2.100.zip";
+    sha256 = "251c8817ceb87d9b661ce1d5b49e732a0116add10abc046be4b8ba5196e149b5";
+    md5 = "";
+    md5name = "251c8817ceb87d9b661ce1d5b49e732a0116add10abc046be4b8ba5196e149b5-Scheherazade-2.100.zip";
+  }
+  {
+    name = "libfreehand-0.1.2.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libfreehand-0.1.2.tar.xz";
+    sha256 = "0e422d1564a6dbf22a9af598535425271e583514c0f7ba7d9091676420de34ac";
+    md5 = "";
+    md5name = "0e422d1564a6dbf22a9af598535425271e583514c0f7ba7d9091676420de34ac-libfreehand-0.1.2.tar.xz";
+  }
+  {
+    name = "freetype-2.8.1.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/freetype-2.8.1.tar.bz2";
+    sha256 = "e5435f02e02d2b87bb8e4efdcaa14b1f78c9cf3ab1ed80f94b6382fb6acc7d78";
+    md5 = "";
+    md5name = "e5435f02e02d2b87bb8e4efdcaa14b1f78c9cf3ab1ed80f94b6382fb6acc7d78-freetype-2.8.1.tar.bz2";
+  }
+  {
+    name = "glm-0.9.4.6-libreoffice.zip";
+    url = "http://dev-www.libreoffice.org/src/bae83fa5dc7f081768daace6e199adc3-glm-0.9.4.6-libreoffice.zip";
+    sha256 = "d0312c360efe04dd048b3311fe375ff36f1993b4c2e3cb58c81062990532904a";
+    md5 = "bae83fa5dc7f081768daace6e199adc3";
+    md5name = "bae83fa5dc7f081768daace6e199adc3-glm-0.9.4.6-libreoffice.zip";
+  }
+  {
+    name = "gpgme-1.9.0.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/gpgme-1.9.0.tar.bz2";
+    sha256 = "1b29fedb8bfad775e70eafac5b0590621683b2d9869db994568e6401f4034ceb";
+    md5 = "";
+    md5name = "1b29fedb8bfad775e70eafac5b0590621683b2d9869db994568e6401f4034ceb-gpgme-1.9.0.tar.bz2";
+  }
+  {
+    name = "graphite2-minimal-1.3.10.tgz";
+    url = "http://dev-www.libreoffice.org/src/graphite2-minimal-1.3.10.tgz";
+    sha256 = "aa5e58356cd084000609ebbd93fef456a1bc0ab9e46fea20e81552fb286232a9";
+    md5 = "";
+    md5name = "aa5e58356cd084000609ebbd93fef456a1bc0ab9e46fea20e81552fb286232a9-graphite2-minimal-1.3.10.tgz";
+  }
+  {
+    name = "harfbuzz-1.8.4.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/harfbuzz-1.8.4.tar.bz2";
+    sha256 = "3c592f86fa0da69e2e0e98cae9f5d5b61def3bb7948aa00ca45748f27fa545fd";
+    md5 = "";
+    md5name = "3c592f86fa0da69e2e0e98cae9f5d5b61def3bb7948aa00ca45748f27fa545fd-harfbuzz-1.8.4.tar.bz2";
+  }
+  {
+    name = "hsqldb_1_8_0.zip";
+    url = "http://dev-www.libreoffice.org/src/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip";
+    sha256 = "d30b13f4ba2e3b6a2d4f020c0dee0a9fb9fc6fbcc2d561f36b78da4bf3802370";
+    md5 = "17410483b5b5f267aa18b7e00b65e6e0";
+    md5name = "17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip";
+  }
+  {
+    name = "hunspell-1.7.0.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/hunspell-1.7.0.tar.gz";
+    sha256 = "57be4e03ae9dd62c3471f667a0d81a14513e314d4d92081292b90435944ff951";
+    md5 = "";
+    md5name = "57be4e03ae9dd62c3471f667a0d81a14513e314d4d92081292b90435944ff951-hunspell-1.7.0.tar.gz";
+  }
+  {
+    name = "hyphen-2.8.8.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/5ade6ae2a99bc1e9e57031ca88d36dad-hyphen-2.8.8.tar.gz";
+    sha256 = "304636d4eccd81a14b6914d07b84c79ebb815288c76fe027b9ebff6ff24d5705";
+    md5 = "5ade6ae2a99bc1e9e57031ca88d36dad";
+    md5name = "5ade6ae2a99bc1e9e57031ca88d36dad-hyphen-2.8.8.tar.gz";
+  }
+  {
+    name = "icu4c-63_1-src.tgz";
+    url = "http://dev-www.libreoffice.org/src/icu4c-63_1-src.tgz";
+    sha256 = "05c490b69454fce5860b7e8e2821231674af0a11d7ef2febea9a32512998cb9d";
+    md5 = "";
+    md5name = "05c490b69454fce5860b7e8e2821231674af0a11d7ef2febea9a32512998cb9d-icu4c-63_1-src.tgz";
+  }
+  {
+    name = "icu4c-63_1-data.zip";
+    url = "http://dev-www.libreoffice.org/src/icu4c-63_1-data.zip";
+    sha256 = "9bef2bf28ec4fdc86a3bd88d7ac4d509fef6dfbe9c6798299e55b9d4343e960c";
+    md5 = "";
+    md5name = "9bef2bf28ec4fdc86a3bd88d7ac4d509fef6dfbe9c6798299e55b9d4343e960c-icu4c-63_1-data.zip";
+  }
+  {
+    name = "flow-engine-0.9.4.zip";
+    url = "http://dev-www.libreoffice.org/src/ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip";
+    sha256 = "233f66e8d25c5dd971716d4200203a612a407649686ef3b52075d04b4c9df0dd";
+    md5 = "ba2930200c9f019c2d93a8c88c651a0f";
+    md5name = "ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip";
+  }
+  {
+    name = "flute-1.1.6.zip";
+    url = "http://dev-www.libreoffice.org/src/d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip";
+    sha256 = "1b5b24f7bc543c0362b667692f78db8bab4ed6dafc6172f104d0bd3757d8a133";
+    md5 = "d8bd5eed178db6e2b18eeed243f85aa8";
+    md5name = "d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip";
+  }
+  {
+    name = "libbase-1.1.6.zip";
+    url = "http://dev-www.libreoffice.org/src/eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip";
+    sha256 = "75c80359c9ce343c20aab8a36a45cb3b9ee7c61cf92c13ae45399d854423a9ba";
+    md5 = "eeb2c7ddf0d302fba4bfc6e97eac9624";
+    md5name = "eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip";
+  }
+  {
+    name = "libfonts-1.1.6.zip";
+    url = "http://dev-www.libreoffice.org/src/3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip";
+    sha256 = "e0531091787c0f16c83965fdcbc49162c059d7f0c64669e7f119699321549743";
+    md5 = "3bdf40c0d199af31923e900d082ca2dd";
+    md5name = "3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip";
+  }
+  {
+    name = "libformula-1.1.7.zip";
+    url = "http://dev-www.libreoffice.org/src/3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip";
+    sha256 = "5826d1551bf599b85742545f6e01a0079b93c1b2c8434bf409eddb3a29e4726b";
+    md5 = "3404ab6b1792ae5f16bbd603bd1e1d03";
+    md5name = "3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip";
+  }
+  {
+    name = "liblayout-0.2.10.zip";
+    url = "http://dev-www.libreoffice.org/src/db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip";
+    sha256 = "e1fb87f3f7b980d33414473279615c4644027e013012d156efa538bc2b031772";
+    md5 = "db60e4fde8dd6d6807523deb71ee34dc";
+    md5name = "db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip";
+  }
+  {
+    name = "libloader-1.1.6.zip";
+    url = "http://dev-www.libreoffice.org/src/97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip";
+    sha256 = "3d853b19b1d94a6efa69e7af90f7f2b09ecf302913bee3da796c15ecfebcfac8";
+    md5 = "97b2d4dba862397f446b217e2b623e71";
+    md5name = "97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip";
+  }
+  {
+    name = "librepository-1.1.6.zip";
+    url = "http://dev-www.libreoffice.org/src/8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip";
+    sha256 = "abe2c57ac12ba45d83563b02e240fa95d973376de2f720aab8fe11f2e621c095";
+    md5 = "8ce2fcd72becf06c41f7201d15373ed9";
+    md5name = "8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip";
+  }
+  {
+    name = "libserializer-1.1.6.zip";
+    url = "http://dev-www.libreoffice.org/src/f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip";
+    sha256 = "05640a1f6805b2b2d7e2cb9c50db9a5cb084e3c52ab1a71ce015239b4a1d4343";
+    md5 = "f94d9870737518e3b597f9265f4e9803";
+    md5name = "f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip";
+  }
+  {
+    name = "libxml-1.1.7.zip";
+    url = "http://dev-www.libreoffice.org/src/ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip";
+    sha256 = "7d2797fe9f79a77009721e3f14fa4a1dec17a6d706bdc93f85f1f01d124fab66";
+    md5 = "ace6ab49184e329db254e454a010f56d";
+    md5name = "ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip";
+  }
+  {
+    name = "sacjava-1.3.zip";
+    url = "http://dev-www.libreoffice.org/src/39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip";
+    sha256 = "085f2112c51fa8c1783fac12fbd452650596415121348393bb51f0f7e85a9045";
+    md5 = "39bb3fcea1514f1369fcfc87542390fd";
+    md5name = "39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip";
+  }
+  {
+    name = "libjpeg-turbo-1.5.3.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/libjpeg-turbo-1.5.3.tar.gz";
+    sha256 = "b24890e2bb46e12e72a79f7e965f409f4e16466d00e1dd15d93d73ee6b592523";
+    md5 = "";
+    md5name = "b24890e2bb46e12e72a79f7e965f409f4e16466d00e1dd15d93d73ee6b592523-libjpeg-turbo-1.5.3.tar.gz";
+  }
+  {
+    name = "language-subtag-registry-2018-04-23.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/language-subtag-registry-2018-04-23.tar.bz2";
+    sha256 = "14c21f4533ca74e3af9e09184d6756a750d0cd46099015ba8c595e48499aa878";
+    md5 = "";
+    md5name = "14c21f4533ca74e3af9e09184d6756a750d0cd46099015ba8c595e48499aa878-language-subtag-registry-2018-04-23.tar.bz2";
+  }
+  {
+    name = "JLanguageTool-1.7.0.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/b63e6340a02ff1cacfeadb2c42286161-JLanguageTool-1.7.0.tar.bz2";
+    sha256 = "48c87e41636783bba438b65fd895821e369ed139e1465fac654323ad93c5a82d";
+    md5 = "b63e6340a02ff1cacfeadb2c42286161";
+    md5name = "b63e6340a02ff1cacfeadb2c42286161-JLanguageTool-1.7.0.tar.bz2";
+  }
+  {
+    name = "lcms2-2.9.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/lcms2-2.9.tar.gz";
+    sha256 = "48c6fdf98396fa245ed86e622028caf49b96fa22f3e5734f853f806fbc8e7d20";
+    md5 = "";
+    md5name = "48c6fdf98396fa245ed86e622028caf49b96fa22f3e5734f853f806fbc8e7d20-lcms2-2.9.tar.gz";
+  }
+  {
+    name = "libassuan-2.5.1.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/libassuan-2.5.1.tar.bz2";
+    sha256 = "47f96c37b4f2aac289f0bc1bacfa8bd8b4b209a488d3d15e2229cb6cc9b26449";
+    md5 = "";
+    md5name = "47f96c37b4f2aac289f0bc1bacfa8bd8b4b209a488d3d15e2229cb6cc9b26449-libassuan-2.5.1.tar.bz2";
+  }
+  {
+    name = "libatomic_ops-7.6.8.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/libatomic_ops-7.6.8.tar.gz";
+    sha256 = "1d6a279edf81767e74d2ad2c9fce09459bc65f12c6525a40b0cb3e53c089f665";
+    md5 = "";
+    md5name = "1d6a279edf81767e74d2ad2c9fce09459bc65f12c6525a40b0cb3e53c089f665-libatomic_ops-7.6.8.tar.gz";
+  }
+  {
+    name = "libeot-0.01.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/libeot-0.01.tar.bz2";
+    sha256 = "cf5091fa8e7dcdbe667335eb90a2cfdd0a3fe8f8c7c8d1ece44d9d055736a06a";
+    md5 = "";
+    md5name = "cf5091fa8e7dcdbe667335eb90a2cfdd0a3fe8f8c7c8d1ece44d9d055736a06a-libeot-0.01.tar.bz2";
+  }
+  {
+    name = "libexttextcat-3.4.5.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libexttextcat-3.4.5.tar.xz";
+    sha256 = "13fdbc9d4c489a4d0519e51933a1aa21fe3fb9eb7da191b87f7a63e82797dac8";
+    md5 = "";
+    md5name = "13fdbc9d4c489a4d0519e51933a1aa21fe3fb9eb7da191b87f7a63e82797dac8-libexttextcat-3.4.5.tar.xz";
+  }
+  {
+    name = "libgpg-error-1.27.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/libgpg-error-1.27.tar.bz2";
+    sha256 = "4f93aac6fecb7da2b92871bb9ee33032be6a87b174f54abf8ddf0911a22d29d2";
+    md5 = "";
+    md5name = "4f93aac6fecb7da2b92871bb9ee33032be6a87b174f54abf8ddf0911a22d29d2-libgpg-error-1.27.tar.bz2";
+  }
+  {
+    name = "liblangtag-0.6.2.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/liblangtag-0.6.2.tar.bz2";
+    sha256 = "d6242790324f1432fb0a6fae71b6851f520b2c5a87675497cf8ea14c2924d52e";
+    md5 = "";
+    md5name = "d6242790324f1432fb0a6fae71b6851f520b2c5a87675497cf8ea14c2924d52e-liblangtag-0.6.2.tar.bz2";
+  }
+  {
+    name = "libnumbertext-1.0.5.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libnumbertext-1.0.5.tar.xz";
+    sha256 = "e1c9086b4cecb6b25f180316f30740dfabe6a4dbaf70dddc34276fc839e4f4f7";
+    md5 = "";
+    md5name = "e1c9086b4cecb6b25f180316f30740dfabe6a4dbaf70dddc34276fc839e4f4f7-libnumbertext-1.0.5.tar.xz";
+  }
+  {
+    name = "ltm-1.0.zip";
+    url = "http://dev-www.libreoffice.org/src/ltm-1.0.zip";
+    sha256 = "083daa92d8ee6f4af96a6143b12d7fc8fe1a547e14f862304f7281f8f7347483";
+    md5 = "";
+    md5name = "083daa92d8ee6f4af96a6143b12d7fc8fe1a547e14f862304f7281f8f7347483-ltm-1.0.zip";
+  }
+  {
+    name = "xmlsec1-1.2.27.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/xmlsec1-1.2.27.tar.gz";
+    sha256 = "97d756bad8e92588e6997d2227797eaa900d05e34a426829b149f65d87118eb6";
+    md5 = "";
+    md5name = "97d756bad8e92588e6997d2227797eaa900d05e34a426829b149f65d87118eb6-xmlsec1-1.2.27.tar.gz";
+  }
+  {
+    name = "libxml2-2.9.9.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/libxml2-2.9.9.tar.gz";
+    sha256 = "94fb70890143e3c6549f265cee93ec064c80a84c42ad0f23e85ee1fd6540a871";
+    md5 = "";
+    md5name = "94fb70890143e3c6549f265cee93ec064c80a84c42ad0f23e85ee1fd6540a871-libxml2-2.9.9.tar.gz";
+  }
+  {
+    name = "libxslt-1.1.33.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/libxslt-1.1.33.tar.gz";
+    sha256 = "8e36605144409df979cab43d835002f63988f3dc94d5d3537c12796db90e38c8";
+    md5 = "";
+    md5name = "8e36605144409df979cab43d835002f63988f3dc94d5d3537c12796db90e38c8-libxslt-1.1.33.tar.gz";
+  }
+  {
+    name = "lp_solve_5.5.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz";
+    sha256 = "171816288f14215c69e730f7a4f1c325739873e21f946ff83884b350574e6695";
+    md5 = "26b3e95ddf3d9c077c480ea45874b3b8";
+    md5name = "26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz";
+  }
+  {
+    name = "lxml-4.1.1.tgz";
+    url = "http://dev-www.libreoffice.org/src/lxml-4.1.1.tgz";
+    sha256 = "940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a5cfd0f40e";
+    md5 = "";
+    md5name = "940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a5cfd0f40e-lxml-4.1.1.tgz";
+  }
+  {
+    name = "mariadb_client-2.0.0-src.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/a233181e03d3c307668b4c722d881661-mariadb_client-2.0.0-src.tar.gz";
+    sha256 = "fd2f751dea049c1907735eb236aeace1d811d6a8218118b00bbaa9b84dc5cd60";
+    md5 = "a233181e03d3c307668b4c722d881661";
+    md5name = "a233181e03d3c307668b4c722d881661-mariadb_client-2.0.0-src.tar.gz";
+  }
+  {
+    name = "mdds-1.4.3.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/mdds-1.4.3.tar.bz2";
+    sha256 = "25ce3d5af9f6609e1de05bb22b2316e57b74a72a5b686fbb2da199da72349c81";
+    md5 = "";
+    md5name = "25ce3d5af9f6609e1de05bb22b2316e57b74a72a5b686fbb2da199da72349c81-mdds-1.4.3.tar.bz2";
+  }
+  {
+    name = "mDNSResponder-878.200.35.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/mDNSResponder-878.200.35.tar.gz";
+    sha256 = "e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e3990d68aabf6e8b3f5a0";
+    md5 = "";
+    md5name = "e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e3990d68aabf6e8b3f5a0-mDNSResponder-878.200.35.tar.gz";
+  }
+  {
+    name = "libmspub-0.1.4.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libmspub-0.1.4.tar.xz";
+    sha256 = "ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba";
+    md5 = "";
+    md5name = "ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba-libmspub-0.1.4.tar.xz";
+  }
+  {
+    name = "libmwaw-0.3.14.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libmwaw-0.3.14.tar.xz";
+    sha256 = "aca8bf1ce55ed83adbea82c70d4c8bebe8139f334b3481bf5a6e407f91f33ce9";
+    md5 = "";
+    md5name = "aca8bf1ce55ed83adbea82c70d4c8bebe8139f334b3481bf5a6e407f91f33ce9-libmwaw-0.3.14.tar.xz";
+  }
+  {
+    name = "mythes-1.2.4.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz";
+    sha256 = "1e81f395d8c851c3e4e75b568e20fa2fa549354e75ab397f9de4b0e0790a305f";
+    md5 = "a8c2c5b8f09e7ede322d5c602ff6a4b6";
+    md5name = "a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz";
+  }
+  {
+    name = "neon-0.30.2.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/neon-0.30.2.tar.gz";
+    sha256 = "db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d3d967fbca";
+    md5 = "";
+    md5name = "db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d3d967fbca-neon-0.30.2.tar.gz";
+  }
+  {
+    name = "nss-3.38-with-nspr-4.19.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/nss-3.38-with-nspr-4.19.tar.gz";
+    sha256 = "f271ec73291fa3e4bd4b59109f8035cc3a192fc33886f40ed4f9ee4b31c746e9";
+    md5 = "";
+    md5name = "f271ec73291fa3e4bd4b59109f8035cc3a192fc33886f40ed4f9ee4b31c746e9-nss-3.38-with-nspr-4.19.tar.gz";
+  }
+  {
+    name = "libodfgen-0.1.6.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/libodfgen-0.1.6.tar.bz2";
+    sha256 = "2c7b21892f84a4c67546f84611eccdad6259875c971e98ddb027da66ea0ac9c2";
+    md5 = "";
+    md5name = "2c7b21892f84a4c67546f84611eccdad6259875c971e98ddb027da66ea0ac9c2-libodfgen-0.1.6.tar.bz2";
+  }
+  {
+    name = "odfvalidator-1.2.0-incubating-SNAPSHOT-jar-with-dependencies-971c54fd38a968f5860014b44301872706f9e540.jar";
+    url = "http://dev-www.libreoffice.org/src/../extern/odfvalidator-1.2.0-incubating-SNAPSHOT-jar-with-dependencies-971c54fd38a968f5860014b44301872706f9e540.jar";
+    sha256 = "984f2a479df79e27e7b01a5815ac53ae64e07746b882262d8a64566494515504";
+    md5 = "";
+    md5name = "984f2a479df79e27e7b01a5815ac53ae64e07746b882262d8a64566494515504-odfvalidator-1.2.0-incubating-SNAPSHOT-jar-with-dependencies-971c54fd38a968f5860014b44301872706f9e540.jar";
+  }
+  {
+    name = "officeotron-0.7.4-master.jar";
+    url = "http://dev-www.libreoffice.org/src/../extern/8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar";
+    sha256 = "f2443f27561af52324eee03a1892d9f569adc8db9e7bca55614898bc2a13a770";
+    md5 = "8249374c274932a21846fa7629c2aa9b";
+    md5name = "8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar";
+  }
+  {
+    name = "openldap-2.4.45.tgz";
+    url = "http://dev-www.libreoffice.org/src/openldap-2.4.45.tgz";
+    sha256 = "cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb897cd5626df3824";
+    md5 = "";
+    md5name = "cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb897cd5626df3824-openldap-2.4.45.tgz";
+  }
+  {
+    name = "openssl-1.0.2p.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/openssl-1.0.2p.tar.gz";
+    sha256 = "50a98e07b1a89eb8f6a99477f262df71c6fa7bef77df4dc83025a2845c827d00";
+    md5 = "";
+    md5name = "50a98e07b1a89eb8f6a99477f262df71c6fa7bef77df4dc83025a2845c827d00-openssl-1.0.2p.tar.gz";
+  }
+  {
+    name = "liborcus-0.14.1.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/liborcus-0.14.1.tar.gz";
+    sha256 = "3f48cfbc21ad74787218284939c04d42cb836c73bc393f27f538b668e4d78a5f";
+    md5 = "";
+    md5name = "3f48cfbc21ad74787218284939c04d42cb836c73bc393f27f538b668e4d78a5f-liborcus-0.14.1.tar.gz";
+  }
+  {
+    name = "owncloud-android-library-0.9.4-no-binary-deps.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/owncloud-android-library-0.9.4-no-binary-deps.tar.gz";
+    sha256 = "b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb";
+    md5 = "";
+    md5name = "b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb-owncloud-android-library-0.9.4-no-binary-deps.tar.gz";
+  }
+  {
+    name = "libpagemaker-0.0.4.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libpagemaker-0.0.4.tar.xz";
+    sha256 = "66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d";
+    md5 = "";
+    md5name = "66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d-libpagemaker-0.0.4.tar.xz";
+  }
+  {
+    name = "pdfium-3550.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/pdfium-3550.tar.bz2";
+    sha256 = "572460f7f9e2f86d022a9c6a82f1e2ded6c3c29ba352d4b9fac60b87e2159679";
+    md5 = "";
+    md5name = "572460f7f9e2f86d022a9c6a82f1e2ded6c3c29ba352d4b9fac60b87e2159679-pdfium-3550.tar.bz2";
+  }
+  {
+    name = "pixman-0.34.0.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz";
+    sha256 = "21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e";
+    md5 = "e80ebae4da01e77f68744319f01d52a3";
+    md5name = "e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz";
+  }
+  {
+    name = "libpng-1.6.34.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libpng-1.6.34.tar.xz";
+    sha256 = "2f1e960d92ce3b3abd03d06dfec9637dfbd22febf107a536b44f7a47c60659f6";
+    md5 = "";
+    md5name = "2f1e960d92ce3b3abd03d06dfec9637dfbd22febf107a536b44f7a47c60659f6-libpng-1.6.34.tar.xz";
+  }
+  {
+    name = "poppler-0.73.0.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/poppler-0.73.0.tar.xz";
+    sha256 = "e44b5543903128884ba4538c2a97d3bcc8889e97ffacc4636112101f0238db03";
+    md5 = "";
+    md5name = "e44b5543903128884ba4538c2a97d3bcc8889e97ffacc4636112101f0238db03-poppler-0.73.0.tar.xz";
+  }
+  {
+    name = "postgresql-9.2.24.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/postgresql-9.2.24.tar.bz2";
+    sha256 = "a754c02f7051c2f21e52f8669a421b50485afcde9a581674d6106326b189d126";
+    md5 = "";
+    md5name = "a754c02f7051c2f21e52f8669a421b50485afcde9a581674d6106326b189d126-postgresql-9.2.24.tar.bz2";
+  }
+  {
+    name = "Python-3.5.6.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/Python-3.5.6.tar.xz";
+    sha256 = "f55cde04f521f273c7cba08912921cc5642cfc15ca7b22d5829f0aff4371155f";
+    md5 = "";
+    md5name = "f55cde04f521f273c7cba08912921cc5642cfc15ca7b22d5829f0aff4371155f-Python-3.5.6.tar.xz";
+  }
+  {
+    name = "libqxp-0.0.2.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libqxp-0.0.2.tar.xz";
+    sha256 = "e137b6b110120a52c98edd02ebdc4095ee08d0d5295a94316a981750095a945c";
+    md5 = "";
+    md5name = "e137b6b110120a52c98edd02ebdc4095ee08d0d5295a94316a981750095a945c-libqxp-0.0.2.tar.xz";
+  }
+  {
+    name = "raptor2-2.0.15.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/a39f6c07ddb20d7dd2ff1f95fa21e2cd-raptor2-2.0.15.tar.gz";
+    sha256 = "ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed";
+    md5 = "a39f6c07ddb20d7dd2ff1f95fa21e2cd";
+    md5name = "a39f6c07ddb20d7dd2ff1f95fa21e2cd-raptor2-2.0.15.tar.gz";
+  }
+  {
+    name = "rasqal-0.9.33.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/1f5def51ca0026cd192958ef07228b52-rasqal-0.9.33.tar.gz";
+    sha256 = "6924c9ac6570bd241a9669f83b467c728a322470bf34f4b2da4f69492ccfd97c";
+    md5 = "1f5def51ca0026cd192958ef07228b52";
+    md5name = "1f5def51ca0026cd192958ef07228b52-rasqal-0.9.33.tar.gz";
+  }
+  {
+    name = "redland-1.0.17.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/e5be03eda13ef68aabab6e42aa67715e-redland-1.0.17.tar.gz";
+    sha256 = "de1847f7b59021c16bdc72abb4d8e2d9187cd6124d69156f3326dd34ee043681";
+    md5 = "e5be03eda13ef68aabab6e42aa67715e";
+    md5name = "e5be03eda13ef68aabab6e42aa67715e-redland-1.0.17.tar.gz";
+  }
+  {
+    name = "librevenge-0.0.4.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/librevenge-0.0.4.tar.bz2";
+    sha256 = "c51601cd08320b75702812c64aae0653409164da7825fd0f451ac2c5dbe77cbf";
+    md5 = "";
+    md5name = "c51601cd08320b75702812c64aae0653409164da7825fd0f451ac2c5dbe77cbf-librevenge-0.0.4.tar.bz2";
+  }
+  {
+    name = "rhino1_5R5.zip";
+    url = "http://dev-www.libreoffice.org/src/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip";
+    sha256 = "1fb458d6aab06932693cc8a9b6e4e70944ee1ff052fa63606e3131df34e21753";
+    md5 = "798b2ffdc8bcfe7bca2cf92b62caf685";
+    md5name = "798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip";
+  }
+  {
+    name = "serf-1.2.1.tar.bz2";
+    url = "http://dev-www.libreoffice.org/src/serf-1.2.1.tar.bz2";
+    sha256 = "6988d394b62c3494635b6f0760bc3079f9a0cd380baf0f6b075af1eb9fa5e700";
+    md5 = "";
+    md5name = "6988d394b62c3494635b6f0760bc3079f9a0cd380baf0f6b075af1eb9fa5e700-serf-1.2.1.tar.bz2";
+  }
+  {
+    name = "libstaroffice-0.0.6.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libstaroffice-0.0.6.tar.xz";
+    sha256 = "6b00e1ed8194e6072be4441025d1b888e39365727ed5b23e0e8c92c4009d1ec4";
+    md5 = "";
+    md5name = "6b00e1ed8194e6072be4441025d1b888e39365727ed5b23e0e8c92c4009d1ec4-libstaroffice-0.0.6.tar.xz";
+  }
+  {
+    name = "swingExSrc.zip";
+    url = "http://dev-www.libreoffice.org/src/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip";
+    sha256 = "64585ac36a81291a58269ec5347e7e3e2e8596dbacb9221015c208191333c6e1";
+    md5 = "35c94d2df8893241173de1d16b6034c0";
+    md5name = "35c94d2df8893241173de1d16b6034c0-swingExSrc.zip";
+  }
+  {
+    name = "twaindsm_2.4.1.orig.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/twaindsm_2.4.1.orig.tar.gz";
+    sha256 = "82c818be771f242388457aa8c807e4b52aa84dc22b21c6c56184a6b4cbb085e6";
+    md5 = "";
+    md5name = "82c818be771f242388457aa8c807e4b52aa84dc22b21c6c56184a6b4cbb085e6-twaindsm_2.4.1.orig.tar.gz";
+  }
+  {
+    name = "ucpp-1.3.2.tar.gz";
+    url = "http://dev-www.libreoffice.org/src/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz";
+    sha256 = "983941d31ee8d366085cadf28db75eb1f5cb03ba1e5853b98f12f7f51c63b776";
+    md5 = "0168229624cfac409e766913506961a8";
+    md5name = "0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz";
+  }
+  {
+    name = "libvisio-0.1.6.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libvisio-0.1.6.tar.xz";
+    sha256 = "fe1002d3671d53c09bc65e47ec948ec7b67e6fb112ed1cd10966e211a8bb50f9";
+    md5 = "";
+    md5name = "fe1002d3671d53c09bc65e47ec948ec7b67e6fb112ed1cd10966e211a8bb50f9-libvisio-0.1.6.tar.xz";
+  }
+  {
+    name = "libwpd-0.10.3.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libwpd-0.10.3.tar.xz";
+    sha256 = "2465b0b662fdc5d4e3bebcdc9a79027713fb629ca2bff04a3c9251fdec42dd09";
+    md5 = "";
+    md5name = "2465b0b662fdc5d4e3bebcdc9a79027713fb629ca2bff04a3c9251fdec42dd09-libwpd-0.10.3.tar.xz";
+  }
+  {
+    name = "libwpg-0.3.3.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libwpg-0.3.3.tar.xz";
+    sha256 = "99b3f7f8832385748582ab8130fbb9e5607bd5179bebf9751ac1d51a53099d1c";
+    md5 = "";
+    md5name = "99b3f7f8832385748582ab8130fbb9e5607bd5179bebf9751ac1d51a53099d1c-libwpg-0.3.3.tar.xz";
+  }
+  {
+    name = "libwps-0.4.10.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libwps-0.4.10.tar.xz";
+    sha256 = "1421e034286a9f96d3168a1c54ea570ee7aa008ca07b89de005ad5ce49fb29ca";
+    md5 = "";
+    md5name = "1421e034286a9f96d3168a1c54ea570ee7aa008ca07b89de005ad5ce49fb29ca-libwps-0.4.10.tar.xz";
+  }
+  {
+    name = "xsltml_2.1.2.zip";
+    url = "http://dev-www.libreoffice.org/src/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip";
+    sha256 = "75823776fb51a9c526af904f1503a7afaaab900fba83eda64f8a41073724c870";
+    md5 = "a7983f859eafb2677d7ff386a023bc40";
+    md5name = "a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip";
+  }
+  {
+    name = "zlib-1.2.11.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/zlib-1.2.11.tar.xz";
+    sha256 = "4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066";
+    md5 = "";
+    md5name = "4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066-zlib-1.2.11.tar.xz";
+  }
+  {
+    name = "libzmf-0.0.2.tar.xz";
+    url = "http://dev-www.libreoffice.org/src/libzmf-0.0.2.tar.xz";
+    sha256 = "27051a30cb057fdb5d5de65a1f165c7153dc76e27fe62251cbb86639eb2caf22";
+    md5 = "";
+    md5name = "27051a30cb057fdb5d5de65a1f165c7153dc76e27fe62251cbb86639eb2caf22-libzmf-0.0.2.tar.xz";
+  }
+]
diff --git a/nixpkgs/pkgs/applications/office/libreoffice/still-gen-shell.nix b/nixpkgs/pkgs/applications/office/libreoffice/still-gen-shell.nix
new file mode 100644
index 000000000000..c5c17c2aaad0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/libreoffice/still-gen-shell.nix
@@ -0,0 +1,29 @@
+{ pkgs ? (import <nixpkgs> {}) }:
+
+with pkgs;
+
+let
+
+  primary-src = callPackage ./still-primary-src.nix {};
+
+in
+
+stdenv.mkDerivation {
+  name = "generate-libreoffice-srcs-shell";
+
+  buildCommand = "exit 1";
+
+  downloadList = stdenv.mkDerivation {
+    name = "libreoffice-${primary-src.version}-download-list";
+    inherit (primary-src) src version;
+    builder = ./download-list-builder.sh;
+  };
+
+  buildInputs = [ python3 ];
+
+  shellHook = ''
+    function generate {
+      python3 generate-libreoffice-srcs.py > libreoffice-srcs-still.nix
+    }
+  '';
+}
diff --git a/nixpkgs/pkgs/applications/office/libreoffice/still-primary-src.nix b/nixpkgs/pkgs/applications/office/libreoffice/still-primary-src.nix
new file mode 100644
index 000000000000..8049a664e138
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/libreoffice/still-primary-src.nix
@@ -0,0 +1,17 @@
+{ fetchurl }:
+
+rec {
+  major = "6";
+  minor = "1";
+  patch = "5";
+  tweak = "2";
+
+  subdir = "${major}.${minor}.${patch}";
+
+  version = "${subdir}${if tweak == "" then "" else "."}${tweak}";
+
+  src = fetchurl {
+    url = "https://download.documentfoundation.org/libreoffice/src/${subdir}/libreoffice-${version}.tar.xz";
+    sha256 = "1wh8qhqkmb89nmfcb0w6iwpdzxwqr7c5kzxgpk4gy60xin6gwjgb";
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/libreoffice/still.nix b/nixpkgs/pkgs/applications/office/libreoffice/still.nix
new file mode 100644
index 000000000000..1da6160e85bb
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/libreoffice/still.nix
@@ -0,0 +1,304 @@
+{ stdenv, fetchurl, pam, python3, libxslt, perl, ArchiveZip, gettext
+, IOCompress, zlib, libjpeg, expat, freetype, libwpd
+, libxml2, db, sablotron, curl, fontconfig, libsndfile, neon
+, bison, flex, zip, unzip, gtk3, gtk2, libmspack, getopt, file, cairo, which
+, icu, boost, jdk, ant, cups, xorg, libcmis
+, openssl, gperf, cppunit, GConf, ORBit2, poppler, utillinux
+, librsvg, gnome_vfs, libGLU_combined, bsh, CoinMP, libwps, libabw
+, autoconf, automake, openldap, bash, hunspell, librdf_redland, nss, nspr
+, libwpg, dbus-glib, qt4, clucene_core, libcdr, lcms, vigra
+, unixODBC, mdds, sane-backends, mythes, libexttextcat, libvisio
+, fontsConf, pkgconfig, bluez5, libtool, carlito
+, libatomic_ops, graphite2, harfbuzz, libodfgen, libzmf
+, librevenge, libe-book, libmwaw, glm, glew, gst_all_1
+, gdb, commonsLogging, librdf_rasqal, wrapGAppsHook
+, gnome3, glib, ncurses, epoxy, gpgme
+, langs ? [ "ca" "cs" "de" "en-GB" "en-US" "eo" "es" "fr" "hu" "it" "nl" "pl" "ru" "sl" "zh-CN" ]
+, withHelp ? true
+, kdeIntegration ? false
+}:
+
+let
+  primary-src = import ./still-primary-src.nix { inherit fetchurl; };
+in
+
+let inherit (primary-src) major minor subdir version; in
+
+let
+  lib = stdenv.lib;
+  langsSpaces = lib.concatStringsSep " " langs;
+
+  fetchSrc = {name, sha256}: fetchurl {
+    url = "https://download.documentfoundation.org/libreoffice/src/${subdir}/libreoffice-${name}-${version}.tar.xz";
+    inherit sha256;
+  };
+
+  srcs = {
+    third_party =
+      map (x : ((fetchurl {inherit (x) url sha256 name;}) // {inherit (x) md5name md5;}))
+      ((import ./libreoffice-srcs-still.nix) ++ [
+        (rec {
+          name = "unowinreg.dll";
+          url = "https://dev-www.libreoffice.org/extern/${md5name}";
+          sha256 = "1infwvv1p6i21scywrldsxs22f62x85mns4iq8h6vr6vlx3fdzga";
+          md5 = "185d60944ea767075d27247c3162b3bc";
+          md5name = "${md5}-${name}";
+        })
+      ]);
+
+    translations = fetchSrc {
+      name = "translations";
+      sha256 = "15fdni68b3kyl6115v0d24cl0dp1hdjhkx571w086lrpz0fk9mfi";
+    };
+
+    # TODO: dictionaries
+
+    help = fetchSrc {
+      name = "help";
+      sha256 = "0bfjg14bnqlqwjcc3lkax0nfrhpm6nrqn7ycrmf4r3dzn10lgr64";
+    };
+
+  };
+in stdenv.mkDerivation rec {
+  name = "libreoffice-${version}";
+
+  inherit (primary-src) src;
+
+  # For some reason librdf_redland sometimes refers to rasqal.h instead
+  # of rasqal/rasqal.h
+  NIX_CFLAGS_COMPILE = [ "-I${librdf_rasqal}/include/rasqal" ];
+
+  patches = [
+    ./xdg-open-brief.patch
+  ];
+
+  tarballPath = "external/tarballs";
+
+  postUnpack = ''
+    mkdir -v $sourceRoot/${tarballPath}
+  '' + (lib.flip lib.concatMapStrings srcs.third_party (f: ''
+      ln -sfv ${f} $sourceRoot/${tarballPath}/${f.md5name}
+      ln -sfv ${f} $sourceRoot/${tarballPath}/${f.name}
+    ''))
+  + ''
+    ln -sv ${srcs.help} $sourceRoot/${tarballPath}/${srcs.help.name}
+    ln -svf ${srcs.translations} $sourceRoot/${tarballPath}/${srcs.translations.name}
+    tar -xf ${srcs.help}
+    tar -xf ${srcs.translations}
+  '';
+
+  postPatch = ''
+    sed -e 's@/usr/bin/xdg-open@xdg-open@g' -i shell/source/unix/exec/shellexec.cxx
+
+    # configure checks for header 'gpgme++/gpgmepp_version.h',
+    # and if it is found (no matter where) uses a hardcoded path
+    # in what presumably is an effort to make it possible to write
+    # '#include <context.h>' instead of '#include <gpgmepp/context.h>'.
+    #
+    # Fix this path to point to where the headers can actually be found instead.
+    substituteInPlace configure.ac --replace \
+      'GPGMEPP_CFLAGS=-I/usr/include/gpgme++' \
+      'GPGMEPP_CFLAGS=-I${gpgme.dev}/include/gpgme++'
+  '';
+
+  QT4DIR = qt4;
+
+  preConfigure = ''
+    configureFlagsArray=(
+      "--with-parallelism=$NIX_BUILD_CORES"
+      "--with-lang=${langsSpaces}"
+    );
+
+    chmod a+x ./bin/unpack-sources
+    patchShebangs .
+
+    # This is required as some cppunittests require fontconfig configured
+    cp "${fontsConf}" fonts.conf
+    sed -e '/include/i<include>${carlito}/etc/fonts/conf.d</include>' -i fonts.conf
+    export FONTCONFIG_FILE="$PWD/fonts.conf"
+
+    NOCONFIGURE=1 ./autogen.sh
+  '';
+
+  postConfigure =
+    # fetch_Download_item tries to interpret the name as a variable name, let it do so...
+    ''
+      sed -e '1ilibreoffice-translations-${version}.tar.xz=libreoffice-translations-${version}.tar.xz' -i Makefile
+      sed -e '1ilibreoffice-help-${version}.tar.xz=libreoffice-help-${version}.tar.xz' -i Makefile
+    ''
+    # Test fixups
+    # May need to be revisited/pruned, left alone for now.
+    + ''
+      # unit test sd_tiledrendering seems to be fragile
+      # https://nabble.documentfoundation.org/libreoffice-5-0-failure-in-CUT-libreofficekit-tiledrendering-td4150319.html
+      echo > ./sd/CppunitTest_sd_tiledrendering.mk
+      sed -e /CppunitTest_sd_tiledrendering/d -i sd/Module_sd.mk
+      # one more fragile test?
+      sed -e '/CPPUNIT_TEST(testTdf96536);/d' -i sw/qa/extras/uiwriter/uiwriter.cxx
+      # this I actually hate, this should be a data consistency test!
+      sed -e '/CPPUNIT_TEST(testTdf115013);/d' -i sw/qa/extras/uiwriter/uiwriter.cxx
+      # rendering-dependent test
+      sed -e '/CPPUNIT_ASSERT_EQUAL(11148L, pOleObj->GetLogicRect().getWidth());/d ' -i sc/qa/unit/subsequent_filters-test.cxx
+      # tilde expansion in path processing checks the existence of $HOME
+      sed -e 's@OString sSysPath("~/tmp");@& return ; @' -i sal/qa/osl/file/osl_File.cxx
+      # rendering-dependent: on my computer the test table actually doesn't fit…
+      # interesting fact: test disabled on macOS by upstream
+      sed -re '/DECLARE_WW8EXPORT_TEST[(]testTableKeep, "tdf91083.odt"[)]/,+5d' -i ./sw/qa/extras/ww8export/ww8export.cxx
+      # Segfault on DB access — maybe temporarily acceptable for a new version of Fresh?
+      sed -e 's/CppunitTest_dbaccess_empty_stdlib_save//' -i ./dbaccess/Module_dbaccess.mk
+      # one more fragile test?
+      sed -e '/CPPUNIT_TEST(testTdf77014);/d' -i sw/qa/extras/uiwriter/uiwriter.cxx
+      # rendering-dependent tests
+      sed -e '/CPPUNIT_TEST(testCustomColumnWidthExportXLSX)/d' -i sc/qa/unit/subsequent_export-test.cxx
+      sed -e '/CPPUNIT_TEST(testColumnWidthExportFromODStoXLSX)/d' -i sc/qa/unit/subsequent_export-test.cxx
+      sed -e '/CPPUNIT_TEST(testChartImportXLS)/d' -i sc/qa/unit/subsequent_filters-test.cxx
+      sed -zre 's/DesktopLOKTest::testGetFontSubset[^{]*[{]/& return; /' -i desktop/qa/desktop_lib/test_desktop_lib.cxx
+      sed -z -r -e 's/DECLARE_OOXMLEXPORT_TEST[(]testFlipAndRotateCustomShape,[^)]*[)].[{]/& return;/' -i sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+      sed -z -r -e 's/DECLARE_OOXMLEXPORT_TEST[(]tdf105490_negativeMargins,[^)]*[)].[{]/& return;/' -i sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+      sed -z -r -e 's/DECLARE_OOXMLIMPORT_TEST[(]testTdf112443,[^)]*[)].[{]/& return;/' -i sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+      sed -z -r -e 's/DECLARE_RTFIMPORT_TEST[(]testTdf108947,[^)]*[)].[{]/& return;/' -i sw/qa/extras/rtfimport/rtfimport.cxx
+      # not sure about this fragile test
+      sed -z -r -e 's/DECLARE_OOXMLEXPORT_TEST[(]testTDF87348,[^)]*[)].[{]/& return;/' -i sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+    ''
+    # This to avoid using /lib:/usr/lib at linking
+    + ''
+    sed -i '/gb_LinkTarget_LDFLAGS/{ n; /rpath-link/d;}' solenv/gbuild/platform/unxgcc.mk
+
+    find -name "*.cmd" -exec sed -i s,/lib:/usr/lib,, {} \;
+    '';
+
+  makeFlags = "SHELL=${bash}/bin/bash";
+
+  enableParallelBuilding = true;
+
+  buildPhase = ''
+    make build-nocheck
+  '';
+
+  doCheck = true;
+
+  # It installs only things to $out/lib/libreoffice
+  postInstall = ''
+    mkdir -p $out/bin $out/share/desktop
+
+    mkdir -p "$out/share/gsettings-schemas/collected-for-libreoffice/glib-2.0/schemas/"
+
+    for a in sbase scalc sdraw smath swriter simpress soffice; do
+      ln -s $out/lib/libreoffice/program/$a $out/bin/$a
+    done
+
+    ln -s $out/bin/soffice $out/bin/libreoffice
+    ln -s $out/lib/libreoffice/share/xdg $out/share/applications
+
+    for f in $out/share/applications/*.desktop; do
+      substituteInPlace "$f" --replace "Exec=libreofficedev${major}.${minor}" "Exec=libreoffice"
+      substituteInPlace "$f" --replace "Exec=libreoffice${major}.${minor}" "Exec=libreoffice"
+      substituteInPlace "$f" --replace "Exec=libreoffice" "Exec=libreoffice"
+    done
+
+    cp -r sysui/desktop/icons  "$out/share"
+    sed -re 's@Icon=libreoffice(dev)?[0-9.]*-?@Icon=@' -i "$out/share/applications/"*.desktop
+  '';
+
+  configureFlags = [
+    "${if withHelp then "" else "--without-help"}"
+    "--with-boost=${boost.dev}"
+    "--with-boost-libdir=${boost.out}/lib"
+    "--with-beanshell-jar=${bsh}"
+    "--with-vendor=NixOS"
+    "--with-commons-logging-jar=${commonsLogging}/share/java/commons-logging-1.2.jar"
+    "--disable-report-builder"
+    "--disable-online-update"
+    "--enable-python=system"
+    "--enable-dbus"
+    "--enable-release-build"
+    (lib.enableFeature kdeIntegration "kde4")
+    "--enable-epm"
+    "--with-jdk-home=${jdk.home}"
+    "--with-ant-home=${ant}/lib/ant"
+    "--with-system-cairo"
+    "--with-system-libs"
+    "--with-system-headers"
+    "--with-system-openssl"
+    "--with-system-libabw"
+    "--with-system-libcmis"
+    "--with-system-libwps"
+    "--with-system-openldap"
+    "--with-system-coinmp"
+
+    "--with-alloc=system"
+
+    # Without these, configure does not finish
+    "--without-junit"
+
+    "--disable-libnumbertext" # system-libnumbertext"
+
+    # We do tarball prefetching ourselves
+    "--disable-fetch-external"
+
+    # I imagine this helps. Copied from go-oo.
+    # Modified on every upgrade, though
+    "--disable-odk"
+    "--disable-postgresql-sdbc"
+    "--disable-firebird-sdbc"
+    "--without-fonts"
+    "--without-myspell-dicts"
+    "--without-doxygen"
+
+    # TODO: package these as system libraries
+    "--with-system-beanshell"
+    "--without-system-hsqldb"
+    "--without-system-altlinuxhyph"
+    "--without-system-lpsolve"
+    "--without-system-libetonyek"
+    "--without-system-libfreehand"
+    "--without-system-liblangtag"
+    "--without-system-libmspub"
+    "--without-system-libpagemaker"
+    "--without-system-libstaroffice"
+    "--without-system-libepubgen"
+    "--without-system-libqxp"
+    "--without-system-mdds"
+    # https://github.com/NixOS/nixpkgs/commit/5c5362427a3fa9aefccfca9e531492a8735d4e6f
+    "--without-system-orcus"
+    "--without-system-xmlsec"
+  ];
+
+  checkPhase = ''
+    make unitcheck
+    make slowcheck
+  '';
+
+  buildInputs = with xorg;
+    [ ant ArchiveZip autoconf automake bison boost cairo clucene_core
+      IOCompress cppunit cups curl db dbus-glib expat file flex fontconfig
+      freetype GConf getopt gnome_vfs gperf gtk3 gtk2
+      hunspell icu jdk lcms libcdr libexttextcat unixODBC libjpeg
+      libmspack librdf_redland librsvg libsndfile libvisio libwpd libwpg libX11
+      libXaw libXext libXi libXinerama libxml2 libxslt libXtst
+      libXdmcp libpthreadstubs libGLU_combined mythes gst_all_1.gstreamer
+      gst_all_1.gst-plugins-base glib
+      neon nspr nss openldap openssl ORBit2 pam perl pkgconfig poppler
+      python3 sablotron sane-backends unzip vigra which zip zlib
+      mdds bluez5 libcmis libwps libabw libzmf libtool
+      libxshmfence libatomic_ops graphite2 harfbuzz gpgme utillinux
+      librevenge libe-book libmwaw glm glew ncurses epoxy
+      libodfgen CoinMP librdf_rasqal gnome3.adwaita-icon-theme gettext
+    ]
+    ++ lib.optional kdeIntegration kdelibs4;
+  nativeBuildInputs = [ wrapGAppsHook gdb ];
+
+  passthru = {
+    inherit srcs jdk;
+  };
+
+  requiredSystemFeatures = [ "big-parallel" ];
+
+  meta = with lib; {
+    description = "Comprehensive, professional-quality productivity suite (Still/Stable release)";
+    homepage = https://libreoffice.org/;
+    license = licenses.lgpl3;
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/libreoffice/wrapper.nix b/nixpkgs/pkgs/applications/office/libreoffice/wrapper.nix
new file mode 100644
index 000000000000..ce8910d76d45
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/libreoffice/wrapper.nix
@@ -0,0 +1,19 @@
+{ libreoffice, runCommand, dbus, bash }:
+let
+  jdk = libreoffice.jdk;
+in
+(runCommand "${libreoffice.name}" {
+  inherit dbus libreoffice jdk bash;
+} ''
+  mkdir -p "$out/bin"
+  ln -s "${libreoffice}/share" "$out/share"
+  substituteAll "${./wrapper.sh}" "$out/bin/soffice"
+  chmod a+x "$out/bin/soffice"
+
+  for i in $(ls "${libreoffice}/bin/"); do
+    test "$i" = "soffice" || ln -s soffice "$out/bin/$(basename "$i")"
+  done
+'') // {
+  inherit libreoffice dbus;
+  meta = libreoffice.meta;
+}
diff --git a/nixpkgs/pkgs/applications/office/libreoffice/wrapper.sh b/nixpkgs/pkgs/applications/office/libreoffice/wrapper.sh
new file mode 100644
index 000000000000..cff8f200e2bc
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/libreoffice/wrapper.sh
@@ -0,0 +1,18 @@
+#!@bash@/bin/bash
+export JAVA_HOME="${JAVA_HOME:-@jdk@}"
+#export SAL_USE_VCLPLUGIN="${SAL_USE_VCLPLUGIN:-gen}"
+
+if uname | grep Linux > /dev/null && 
+       ! ( test -n "$DBUS_SESSION_BUS_ADDRESS" ); then
+    dbus_tmp_dir="/run/user/$(id -u)/libreoffice-dbus"
+    mkdir "$dbus_tmp_dir"
+    dbus_socket_dir="$(mktemp -d -p "$dbus_tmp_dir")"
+    "@dbus@"/bin/dbus-daemon --nopidfile --nofork --config-file "@dbus@"/share/dbus-1/session.conf --address "unix:path=$dbus_socket_dir/session"  &> /dev/null &
+    export DBUS_SESSION_BUS_ADDRESS="unix:path=$dbus_socket_dir/session"
+fi
+
+"@libreoffice@/bin/$(basename "$0")" "$@"
+code="$?"
+
+test -n "$dbus_socket_dir" && rm -rf "$dbus_socket_dir"
+exit "$code"
diff --git a/nixpkgs/pkgs/applications/office/libreoffice/xdg-open-brief.patch b/nixpkgs/pkgs/applications/office/libreoffice/xdg-open-brief.patch
new file mode 100644
index 000000000000..0a2f02e71fed
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/libreoffice/xdg-open-brief.patch
@@ -0,0 +1,13 @@
+diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh
+index 4519e01f26e2..8985711a2c01 100755
+--- a/shell/source/unix/misc/senddoc.sh
++++ b/shell/source/unix/misc/senddoc.sh
+@@ -393,6 +393,8 @@ case `basename "$MAILER" | sed 's/-.*$//'` in
+             MAILER=/usr/bin/kde-open
+         elif [ -x /usr/bin/xdg-open ] ; then
+             MAILER=/usr/bin/xdg-open
++        elif type -p xdg-open >/dev/null 2>&1 ; then
++            MAILER="$(type -p xdg-open)"
+         else
+             echo "Unsupported mail client: `basename $MAILER | sed 's/-.*^//'`"
+             exit 2
diff --git a/nixpkgs/pkgs/applications/office/libreoffice/xdg-open.patch b/nixpkgs/pkgs/applications/office/libreoffice/xdg-open.patch
new file mode 100644
index 000000000000..3ff7e5d80f7a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/libreoffice/xdg-open.patch
@@ -0,0 +1,25 @@
+diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx
+--- a/shell/source/unix/exec/shellexec.cxx
++++ b/shell/source/unix/exec/shellexec.cxx
+@@ -150,7 +150,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
+         if (std::getenv("LIBO_FLATPAK") != nullptr) {
+             aBuffer.append("/app/bin/xdg-open");
+         } else {
+-            aBuffer.append("/usr/bin/xdg-open");
++            aBuffer.append("xdg-open");
+         }
+ #endif
+         aBuffer.append(" ");
+diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh
+index 4519e01f26e2..8985711a2c01 100755
+--- a/shell/source/unix/misc/senddoc.sh
++++ b/shell/source/unix/misc/senddoc.sh
+@@ -393,6 +393,8 @@ case `basename "$MAILER" | sed 's/-.*$//'` in
+             MAILER=/usr/bin/kde-open
+         elif [ -x /usr/bin/xdg-open ] ; then
+             MAILER=/usr/bin/xdg-open
++        elif type -p xdg-open >/dev/null 2>&1 ; then
++            MAILER="$(type -p xdg-open)"
+         else
+             echo "Unsupported mail client: `basename $MAILER | sed 's/-.*^//'`"
+             exit 2
diff --git a/nixpkgs/pkgs/applications/office/marp/default.nix b/nixpkgs/pkgs/applications/office/marp/default.nix
new file mode 100644
index 000000000000..cdda46d4837f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/marp/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl, atomEnv, libXScrnSaver, gtk2 }:
+
+stdenv.mkDerivation rec {
+  name = "marp-${version}";
+  version = "0.0.14";
+
+  src = fetchurl {
+    url = "https://github.com/yhatt/marp/releases/download/v${version}/${version}-Marp-linux-x64.tar.gz";
+    sha256 = "0nklzxwdx5llzfwz1hl2jpp2kwz78w4y63h5l00fh6fv6zisw6j4";
+  };
+
+  unpackPhase = ''
+    mkdir {locales,resources}
+    tar --delay-directory-restore -xf $src
+    chmod u+x {locales,resources}
+  '';
+
+  installPhase = ''
+    mkdir -p $out/lib/marp $out/bin
+    cp -r ./* $out/lib/marp
+    ln -s $out/lib/marp/Marp $out/bin
+  '';
+
+  postFixup = ''
+    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+      --set-rpath "${atomEnv.libPath}:${stdenv.lib.makeLibraryPath [ libXScrnSaver gtk2 ]}:$out/lib/marp" \
+      $out/bin/Marp
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Markdown presentation writer, powered by Electron";
+    homepage = https://yhatt.github.io/marp/;
+    license = licenses.mit;
+    maintainers = [ maintainers.puffnfresh ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/mendeley/default.nix b/nixpkgs/pkgs/applications/office/mendeley/default.nix
new file mode 100644
index 000000000000..892ebcee99f9
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/mendeley/default.nix
@@ -0,0 +1,144 @@
+{ fetchurl, stdenv, dpkg, which
+, makeWrapper
+, alsaLib
+, desktop-file-utils
+, dbus
+, libcap
+, fontconfig
+, freetype
+, gcc
+, gconf
+, glib
+, icu
+, libxml2
+, libxslt
+, orc
+, nss
+, nspr
+, qtbase
+, qtsvg
+, qtdeclarative
+, qtwebchannel
+, qtquickcontrols
+, qtwebkit
+, qtwebengine
+, sqlite
+, xorg
+, zlib
+# The provided wrapper does this, but since we don't use it
+# we emulate the behavior.  The downside is that this
+# will leave entries on your system after uninstalling mendeley.
+# (they can be removed by running '$out/bin/install-mendeley-link-handler.sh -u')
+, autorunLinkHandler ? true
+# Update script
+, writeScript
+, runtimeShell
+}:
+
+let
+  arch32 = "i686-linux";
+
+  arch = if stdenv.hostPlatform.system == arch32
+    then "i386"
+    else "amd64";
+
+  shortVersion = "1.19.1-stable";
+
+  version = "${shortVersion}_${arch}";
+
+  url = "http://desktop-download.mendeley.com/download/apt/pool/main/m/mendeleydesktop/mendeleydesktop_${version}.deb";
+  sha256 = if stdenv.hostPlatform.system == arch32
+    then "0fcyl5i8xdgb5j0x1643qc0j74d8p11jczvqmgqkqh0wgid1y1ad"
+    else "1dzwa2cnn9xakrhhq159fhh71gw5wlbf017rrikdlia694m8akq6";
+
+  deps = [
+    qtbase
+    qtsvg
+    qtdeclarative
+    qtwebchannel
+    qtquickcontrols
+    qtwebkit
+    qtwebengine
+    alsaLib
+    dbus
+    freetype
+    fontconfig
+    gcc.cc
+    gconf
+    glib
+    icu
+    libcap
+    libxml2
+    libxslt
+    nspr
+    nss
+    orc
+    sqlite
+    xorg.libX11
+    xorg.xcbutilkeysyms
+    xorg.libxcb
+    xorg.libXcomposite
+    xorg.libXext
+    xorg.libXrender
+    xorg.libXi
+    xorg.libXcursor
+    xorg.libXtst
+    xorg.libXrandr
+    xorg.xcbutilimage
+    zlib
+  ];
+
+in
+
+stdenv.mkDerivation {
+  name = "mendeley-${version}";
+
+  src = fetchurl {
+    url = url;
+    sha256 = sha256;
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ dpkg which ] ++ deps;
+
+  propagatedUserEnvPkgs = [ gconf ];
+
+  unpackPhase = "true";
+
+  installPhase = ''
+    dpkg-deb -x $src $out
+    mv $out/opt/mendeleydesktop/{bin,lib,share} $out
+
+    interpreter=$(patchelf --print-interpreter $(readlink -f $(which patchelf)))
+    patchelf --set-interpreter $interpreter \
+             --set-rpath ${stdenv.lib.makeLibraryPath deps}:$out/lib \
+             $out/bin/mendeleydesktop
+
+    wrapProgram $out/bin/mendeleydesktop \
+      --add-flags "--unix-distro-build" \
+      ${stdenv.lib.optionalString autorunLinkHandler # ignore errors installing the link handler
+      ''--run "$out/bin/install-mendeley-link-handler.sh $out/bin/mendeleydesktop ||:"''}
+
+    # Remove bundled qt bits
+    rm -rf $out/lib/qt
+    rm $out/bin/qt* $out/bin/Qt*
+
+    # Patch up link handler script
+    wrapProgram $out/bin/install-mendeley-link-handler.sh \
+      --prefix PATH ':' ${stdenv.lib.makeBinPath [ which gconf desktop-file-utils ] }
+  '';
+
+  dontStrip = true;
+  dontPatchElf = true;
+
+  updateScript = import ./update.nix { inherit stdenv writeScript runtimeShell; };
+
+  meta = with stdenv.lib; {
+    homepage = http://www.mendeley.com;
+    description = "A reference manager and academic social network";
+    license = licenses.unfree;
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers  = with maintainers; [ dtzWill ];
+  };
+
+}
diff --git a/nixpkgs/pkgs/applications/office/mendeley/update.nix b/nixpkgs/pkgs/applications/office/mendeley/update.nix
new file mode 100644
index 000000000000..c174e7dc668d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/mendeley/update.nix
@@ -0,0 +1,61 @@
+{ stdenv, writeScript, runtimeShell }:
+
+writeScript "update-mendeley" ''
+  #!${runtimeShell}
+  function follow() {
+    local URL=$1
+    while true; do
+      NEWURL=$(curl -m20 -sI "$URL" -o /dev/null -w '%{redirect_url}')
+      [ -z "$NEWURL" ] && break
+      [[ $NEWURL = $URL ]] && (echo "redirect loop?!"; exit 1)
+      echo "Following $URL -> $NEWURL ..." >&2
+      URL=$NEWURL
+    done
+
+    echo $URL
+  }
+
+  amd64URL=$(follow https://www.mendeley.com/repositories/ubuntu/stable/amd64/mendeleydesktop-latest)
+  amd64V=$(basename $amd64URL|grep -m1 -o "[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?")
+  i386URL=$(follow https://www.mendeley.com/repositories/ubuntu/stable/i386/mendeleydesktop-latest)
+  i386V=$(basename $i386URL|grep -m1 -o "[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?")
+
+  echo "amd64 version: $amd64V"
+  echo "i386 version:  $i386V"
+  if [[ $amd64V != $i386V ]]; then
+    echo "Versions not the same!"
+    exit 1
+  fi
+
+  if grep -q -F "$amd64V" ${./default.nix}; then
+    echo "No new version yet, nothing to do."
+    echo "Have a nice day!"
+    exit 0
+  fi
+
+  amd64OldHash=$(nix-instantiate --eval --strict -A "mendeley.src.drvAttrs.outputHash" --argstr system "x86_64-linux"| tr -d '"')
+  i386OldHash=$(nix-instantiate --eval --strict -A "mendeley.src.drvAttrs.outputHash" --argstr system "i686-linux"| tr -d '"')
+
+  echo "Prefetching amd64..."
+  amd64NewHash=$(nix-prefetch-url $amd64URL)
+  echo "Prefetching i386..."
+  i386NewHash=$(nix-prefetch-url $i386URL)
+
+  # Don't actually update, just report that an update is available
+  cat <<EOF
+
+
+  Time to update to $amd64V !
+
+  32bit (i386):
+    Old: $i386OldHash
+    New: $i386NewHash
+  64bit (amd64):
+    Old: $amd64OldHash
+    New: $amd64NewHash
+
+  Exiting so this information is seen...
+  (no update is actually performed here)
+  EOF
+  exit 1
+''
diff --git a/nixpkgs/pkgs/applications/office/mmex/default.nix b/nixpkgs/pkgs/applications/office/mmex/default.nix
new file mode 100644
index 000000000000..3ddca8fe7620
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/mmex/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchgit, sqlite, wxGTK30, gettext }:
+
+
+let
+  version = "1.3.3";
+in
+  stdenv.mkDerivation {
+    name = "money-manager-ex-${version}";
+
+    src = fetchgit {
+      url = "https://github.com/moneymanagerex/moneymanagerex.git";
+      rev = "refs/tags/v${version}";
+      sha256 = "0r4n93z3scv0i0zqflsxwv7j4yl8jy3gr0m4l30y1q8qv0zj9n74";
+    };
+
+    buildInputs = [ sqlite wxGTK30 gettext ];
+
+    meta = {
+      description = "Easy-to-use personal finance software";
+      homepage = https://www.moneymanagerex.org/;
+      license = stdenv.lib.licenses.gpl2Plus;
+      maintainers = with stdenv.lib.maintainers; [viric];
+      platforms = with stdenv.lib.platforms; linux;
+    };
+  }
diff --git a/nixpkgs/pkgs/applications/office/moneyplex/default.nix b/nixpkgs/pkgs/applications/office/moneyplex/default.nix
new file mode 100644
index 000000000000..ad621303d7d3
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/moneyplex/default.nix
@@ -0,0 +1,122 @@
+{ stdenv, fetchurl, patchelf, coreutils, pcsclite
+, zlib, glib, gdk_pixbuf, gtk2, cairo, pango, libX11, atk, openssl
+, runtimeShell }:
+
+let
+  libPath = stdenv.lib.makeLibraryPath [
+    stdenv.cc.cc zlib glib gdk_pixbuf gtk2 cairo pango libX11 atk openssl
+  ];
+
+  src_i686 = {
+    url = "http://www.matrica.com/download/distribution/moneyplex_16_install32_22424.tar.gz";
+    sha256 = "0yfpc6s85r08g796dycl378kagkma865vp7j72npia3hjc4vwamr";
+  };
+
+  src_x86_64 = {
+    url = "http://www.matrica.com/download/distribution/moneyplex_16_install64_22424.tar.gz";
+    sha256 = "03vxbg1yp8qyvcn6bw2a5s134nxzq9cn0vqbmlld7hh4knbsfqzw";
+  };
+in
+
+stdenv.mkDerivation rec {
+  name = "moneyplex-${version}";
+  version = "16.0.22424";
+
+  src = fetchurl (if stdenv.hostPlatform.system == "i686-linux" then src_i686
+                  else if stdenv.hostPlatform.system == "x86_64-linux" then src_x86_64
+                  else throw "moneyplex requires i686-linux or x86_64-linux");
+
+
+  phases = [ "unpackPhase" "installPhase" "postInstall" ];
+
+  buildInputs = [ ];
+
+  installPhase =
+  ''
+    mkdir -p "$out/opt/moneyplex"
+    cp -r . $out/opt/moneyplex
+
+    mkdir "$out/bin"
+
+    cat > $out/bin/moneyplex <<EOF
+    #!${runtimeShell}
+
+    if [ -z "\$XDG_DATA_HOME" ]; then
+        MDIR=\$HOME/.local/share/moneyplex
+    else
+        MDIR=\$XDG_DATA_HOME/moneyplex
+    fi
+
+    if [ ! -d "\$MDIR" ]; then
+        ${coreutils}/bin/mkdir -p \$MDIR
+        ${coreutils}/bin/cp -r $out/opt/moneyplex/* \$MDIR
+        ${coreutils}/bin/chmod 0644 \$MDIR/*
+        ${coreutils}/bin/chmod 0755 \$MDIR/system
+        ${coreutils}/bin/chmod 0644 \$MDIR/system/*
+        ${coreutils}/bin/chmod 0755 \$MDIR/reports
+        ${coreutils}/bin/chmod 0644 \$MDIR/reports/*
+        ${coreutils}/bin/chmod 0755 \$MDIR/moneyplex
+        ${coreutils}/bin/chmod 0755 \$MDIR/prestart
+        ${coreutils}/bin/chmod 0755 \$MDIR/mpxalarm
+    fi
+
+    if [ ! -d "\$MDIR/pcsc" ]; then
+        ${coreutils}/bin/mkdir -p \$MDIR/pcsc
+    fi
+    if [ ! -e "\$MDIR/pcsc/libpcsclite.so.1" ] || [ ! \`${coreutils}/bin/readlink -f "\$MDIR/pcsc/libpcsclite.so.1"\` -ef "${stdenv.lib.getLib pcsclite}/lib/libpcsclite.so.1" ]; then
+        ${coreutils}/bin/ln -sf "${stdenv.lib.getLib pcsclite}/lib/libpcsclite.so.1" "\$MDIR/pcsc/libpcsclite.so.1"
+    fi
+
+
+    if [ -e "\$MDIR/rup/rupremote.lst" ]; then
+      for i in \`${coreutils}/bin/cat "\$MDIR/rup/rupremote.lst"\`; do
+        ${coreutils}/bin/mv "\$MDIR/rup/"\`${coreutils}/bin/basename \$i\` "\$MDIR/\$i"
+      done
+      rm -r "\$MDIR/rup/rupremote.lst"
+    fi
+
+    if [ ! -e "\$MDIR/moneyplex.patched" ] || [ "\$MDIR/moneyplex" -nt "\$MDIR/moneyplex.patched" ]; then
+        ${coreutils}/bin/cp "\$MDIR/moneyplex" "\$MDIR/moneyplex.patched"
+        ${coreutils}/bin/chmod 0755 "\$MDIR/moneyplex.patched"
+    fi
+    if [ ! \`${patchelf}/bin/patchelf --print-interpreter \$MDIR/moneyplex.patched\` = $(cat $NIX_CC/nix-support/dynamic-linker) ] ||
+       [ ! \`${patchelf}/bin/patchelf --print-rpath \$MDIR/moneyplex.patched\` = "${libPath}" ]; then
+        ${patchelf}/bin/patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --set-rpath "${libPath}" "\$MDIR/moneyplex.patched"
+    fi
+
+    exec \$MDIR/moneyplex.patched
+    EOF
+
+    chmod +x $out/bin/moneyplex
+    '';
+
+  postInstall = ''
+    mkdir -p $out/share/icons
+    cp -r $out/opt/moneyplex/system/mpx256.png $out/share/icons/moneyplex.png
+
+    mkdir -p $out/share/applications
+    cat > $out/share/applications/moneyplex.desktop <<EOF
+    [Desktop Entry]
+    Type=Application
+    Encoding=UTF-8
+    Name=Moneyplex
+    GenericName=Moneyplex online banking software
+    Comment=Online banking software
+    Icon=$out/share/icons/moneyplex.png
+    Exec=$out/bin/moneyplex
+    Terminal=false
+    Categories=Application;
+    StartupNotify=true
+    EOF
+    '';
+
+
+  meta = with stdenv.lib; {
+    description = "Moneyplex online banking software";
+    maintainers = with maintainers; [ tstrobel ];
+    platforms = platforms.linux;
+    license = licenses.unfree;
+    downloadPage = http://matrica.de/download/download.html;
+  };
+
+}
diff --git a/nixpkgs/pkgs/applications/office/mytetra/default.nix b/nixpkgs/pkgs/applications/office/mytetra/default.nix
new file mode 100644
index 000000000000..a7887357cd30
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/mytetra/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchurl, qmake, qtsvg, makeWrapper, xdg_utils }:
+
+let
+  version = "1.44.55";
+in stdenv.mkDerivation rec {
+  name = "mytetra-${version}";
+  src = fetchurl {
+    url = "https://github.com/xintrea/mytetra_dev/archive/v.${version}.tar.gz";
+    sha256 = "13lmfvschm1xwr0ys2ykhs0bb83m2f39rk1jdd7zf8yxlqki4i6l";
+  };
+
+  nativeBuildInputs = [ qmake makeWrapper ];
+  buildInputs = [ qtsvg ];
+
+  hardeningDisable = [ "format" ];
+
+  preBuild = ''
+    substituteInPlace app/app.pro \
+      --replace /usr/local/bin $out/bin \
+      --replace /usr/share $out/share
+
+    substituteInPlace app/src/views/mainWindow/MainWindow.cpp \
+      --replace ":/resource/pic/logo.svg" "$out/share/icons/hicolor/48x48/apps/mytetra.png"
+  '';
+
+  postFixup = ''
+    wrapProgram $out/bin/mytetra \
+      --prefix PATH : ${xdg_utils}/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Smart manager for information collecting";
+    homepage = https://webhamster.ru/site/page/index/articles/projectcode/138;
+    license = licenses.gpl3;
+    maintainers = [ maintainers.gnidorah ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/notes-up/default.nix b/nixpkgs/pkgs/applications/office/notes-up/default.nix
new file mode 100644
index 000000000000..2dee39a0ad3b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/notes-up/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, fetchFromGitHub, pantheon, pkgconfig, cmake, ninja, gtk3, gtksourceview3, webkitgtk, gtkspell3, glib, libgee, sqlite, discount, wrapGAppsHook
+, withPantheon ? false }:
+
+stdenv.mkDerivation rec {
+  pname = "notes-up";
+  version = "1.6.3";
+
+  src = fetchFromGitHub {
+    owner = "Philip-Scott";
+    repo = "Notes-up";
+    rev = version;
+    sha256 = "06fzdb823kkami0jch9ccblsvw3x7zd1d4xz8fv3giscl3f36x4q";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    ninja
+    pantheon.vala
+    pkgconfig
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    discount
+    glib
+    gtk3
+    gtksourceview3
+    gtkspell3
+    libgee
+    pantheon.granite
+    sqlite
+    webkitgtk
+  ];
+
+  # Whether to build with contractor support (Pantheon specific)
+  cmakeFlags = if withPantheon then null else [ "-Dnoele=yes" ];
+
+  meta = with stdenv.lib; {
+    description = "Markdown notes editor and manager designed for elementary OS"
+    + stdenv.lib.optionalString withPantheon " - built with Contractor support";
+    homepage = https://github.com/Philip-Scott/Notes-up;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ davidak worldofpeace ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/osmo/default.nix b/nixpkgs/pkgs/applications/office/osmo/default.nix
new file mode 100644
index 000000000000..20f8b428f0db
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/osmo/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchurl, pkgconfig, gtk3, libxml2, gettext, libical, libnotify
+, libarchive, gspell, webkitgtk, libgringotts, wrapGAppsHook }:
+
+stdenv.mkDerivation rec {
+  name = "osmo-${version}";
+  version = "0.4.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/osmo-pim/${name}.tar.gz";
+    sha256 = "1gjd4w9jckfpqr9n0bw0w25h3qhfyzw1xvilh3hqdadfinwyal2v";
+  };
+
+  nativeBuildInputs = [ pkgconfig gettext wrapGAppsHook ];
+  buildInputs = [ gtk3 libxml2 libical libnotify libarchive
+    gspell webkitgtk libgringotts ];
+
+  meta = with stdenv.lib; {
+    description = "A handy personal organizer";
+    homepage = http://clayo.org/osmo/;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ pSub ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/paperwork/backend.nix b/nixpkgs/pkgs/applications/office/paperwork/backend.nix
new file mode 100644
index 000000000000..7f82780fbe92
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/paperwork/backend.nix
@@ -0,0 +1,47 @@
+{ buildPythonPackage, lib, fetchFromGitLab
+
+, isPy3k, isPyPy
+
+, pyenchant, simplebayes, pillow, pycountry, whoosh, termcolor
+, python-Levenshtein, pyinsane2, pygobject3, pyocr, natsort
+
+, pkgs
+}:
+
+buildPythonPackage rec {
+  pname = "paperwork-backend";
+  version = "1.2.4";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    repo = "paperwork";
+    group = "World";
+    owner = "OpenPaperwork";
+    rev = version;
+    sha256 = "0wjjiw99aswmppnhzq3jir0p5p78r3m8hjinhdirkgm6h7skq5p4";
+  };
+
+  sourceRoot = "source/paperwork-backend";
+
+  # Python 2.x is not supported.
+  disabled = !isPy3k && !isPyPy;
+
+  patchPhase = ''
+    echo 'version = "${version}"' > paperwork_backend/_version.py
+  '';
+
+  preCheck = "\"$out/bin/paperwork-shell\" chkdeps paperwork_backend";
+
+  propagatedBuildInputs = [
+    pyenchant simplebayes pillow pycountry whoosh termcolor
+    python-Levenshtein pyinsane2 pygobject3 pyocr natsort
+    pkgs.poppler_gi pkgs.gtk3
+  ];
+
+  meta = {
+    description = "Backend part of Paperwork (Python API, no UI)";
+    homepage = https://openpaper.work/;
+    license = lib.licenses.gpl3Plus;
+    maintainers = [ lib.maintainers.aszlig ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/paperwork/default.nix b/nixpkgs/pkgs/applications/office/paperwork/default.nix
new file mode 100644
index 000000000000..401d3be3128b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/paperwork/default.nix
@@ -0,0 +1,81 @@
+{ lib, python3Packages, fetchFromGitLab, gtk3, cairo
+, aspellDicts, buildEnv
+, gnome3, hicolor-icon-theme, librsvg
+, xvfb_run, dbus, libnotify
+}:
+
+python3Packages.buildPythonApplication rec {
+  inherit (python3Packages.paperwork-backend) version src;
+  pname = "paperwork";
+
+  sourceRoot = "source/paperwork-gtk";
+
+  # Patch out a few paths that assume that we're using the FHS:
+  postPatch = ''
+    themeDir="$(echo "${gnome3.adwaita-icon-theme}/share/icons/"*)"
+    sed -i -e "s,/usr/share/icons/gnome,$themeDir," src/paperwork/deps.py
+
+    sed -i -e 's,sys\.prefix,"",g' \
+      src/paperwork/frontend/aboutdialog/__init__.py \
+      src/paperwork/frontend/mainwindow/__init__.py \
+      setup.py
+
+    sed -i -e '/^UI_FILES_DIRS = \[/,/^\]$/ {
+      c UI_FILES_DIRS = ["'"$out/share/paperwork"'"]
+    }' src/paperwork/frontend/util/__init__.py
+
+    sed -i -e '/^LOCALE_PATHS = \[/,/^\]$/ {
+      c LOCALE_PATHS = ["'"$out/share"'"]
+    }' src/paperwork/paperwork.py
+
+    sed -i -e 's/"icon"/"icon-name"/g' \
+      src/paperwork/frontend/mainwindow/mainwindow.glade
+
+    sed -i -e 's/"logo"/"logo-icon-name"/g' \
+      src/paperwork/frontend/aboutdialog/aboutdialog.glade
+
+    cat - ../AUTHORS.py > src/paperwork/_version.py <<EOF
+    # -*- coding: utf-8 -*-
+    version = "${version}"
+    authors_code=""
+    EOF
+  '';
+
+  ASPELL_CONF = "dict-dir ${buildEnv {
+    name = "aspell-all-dicts";
+    paths = lib.collect lib.isDerivation aspellDicts;
+  }}/lib/aspell";
+
+  checkInputs = [ xvfb_run dbus.daemon ] ++ (with python3Packages; [ paperwork-backend ]);
+  buildInputs = [
+    gnome3.adwaita-icon-theme hicolor-icon-theme libnotify librsvg
+  ];
+
+  # A few parts of chkdeps need to have a display and a dbus session, so we not
+  # only need to run a virtual X server + dbus but also have a large enough
+  # resolution, because the Cairo test tries to draw a 200x200 window.
+  preCheck = ''
+    xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
+      --config-file=${dbus.daemon}/share/dbus-1/session.conf \
+      paperwork-shell chkdeps paperwork
+  '';
+
+  propagatedBuildInputs = with python3Packages; [
+    paperwork-backend pypillowfight gtk3 cairo pyxdg dateutil
+  ];
+
+  makeWrapperArgs = [
+    "--set GI_TYPELIB_PATH \"$GI_TYPELIB_PATH\""
+    "--set GDK_PIXBUF_MODULE_FILE \"$GDK_PIXBUF_MODULE_FILE\""
+    "--prefix XDG_DATA_DIRS : \"$out/share\""
+    "--suffix XDG_DATA_DIRS : \"$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH\""
+  ];
+
+  meta = {
+    description = "A personal document manager for scanned documents";
+    homepage = https://openpaper.work/;
+    license = lib.licenses.gpl3Plus;
+    maintainers = [ lib.maintainers.aszlig ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/pinpoint/default.nix b/nixpkgs/pkgs/applications/office/pinpoint/default.nix
new file mode 100644
index 000000000000..680b3fd40d72
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/pinpoint/default.nix
@@ -0,0 +1,22 @@
+{ fetchurl, stdenv, pkgconfig, autoconf, automake, clutter, clutter-gst
+, gdk_pixbuf, cairo, clutter-gtk }:
+
+stdenv.mkDerivation rec {
+  name = "pinpoint-${version}";
+  version = "0.1.8";
+  src = fetchurl {
+    url = "http://ftp.gnome.org/pub/GNOME/sources/pinpoint/0.1/${name}.tar.xz";
+    sha256 = "1jp8chr9vjlpb5lybwp5cg6g90ak5jdzz9baiqkbg0anlg8ps82s";
+  };
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ autoconf automake clutter clutter-gst gdk_pixbuf
+                  cairo clutter-gtk ];
+
+  meta = with stdenv.lib; {
+    homepage = https://wiki.gnome.org/action/show/Apps/Pinpoint;
+    description = "A tool for making hackers do excellent presentations";
+    license = licenses.lgpl21;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ pSub ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/planner/default.nix b/nixpkgs/pkgs/applications/office/planner/default.nix
new file mode 100644
index 000000000000..d8765d2fa61a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/planner/default.nix
@@ -0,0 +1,75 @@
+{ stdenv
+, fetchFromGitLab
+, pkgconfig
+, intltool
+, automake111x
+, autoconf
+, libtool
+, gnome2
+, libxslt
+, python2
+}:
+
+let version = "unstable-2019-02-13";
+
+in stdenv.mkDerivation {
+  name = "planner-${version}";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    owner = "GNOME";
+    repo = "planner";
+    rev = "76d31defae4979aa51dd37e8888f61e9a6a51367";
+    sha256 = "0lbch4drg6005216hgcys93rq92p7zd20968x0gk254kckd9ag5w";
+  };
+
+  nativeBuildInputs = with gnome2; [
+    pkgconfig
+    intltool
+    automake111x
+    autoconf
+    libtool
+    gnome-common
+    gtk-doc
+    scrollkeeper
+  ];
+
+  buildInputs = with gnome2; [
+    GConf
+    gtk
+    libgnomecanvas
+    libgnomeui
+    libglade
+    libxslt
+    python2.pkgs.pygtk
+  ];
+
+  preConfigure = ''./autogen.sh'';
+  configureFlags = [
+    "--enable-python"
+    "--enable-python-plugin"
+    ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = https://wiki.gnome.org/Apps/Planner;
+    description = "Project management application for GNOME";
+    longDescription = ''
+      Planner is the GNOME project management tool.
+      Its goal is to be an easy-to-use no-nonsense cross-platform
+      project management application.
+
+      Planner is a GTK+ application written in C and licensed under the
+      GPLv2 or any later version. It can store its data in either xml
+      files or in a postgresql database. Projects can also be printed
+      to PDF or exported to HTML for easy viewing from any web browser.
+
+      Planner was originally created by Richard Hult and Mikael Hallendal
+      at Imendio.
+    '';
+    license = licenses.gpl2Plus;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ rasendubi amiloradovsky ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/ppl-address-book/Gemfile b/nixpkgs/pkgs/applications/office/ppl-address-book/Gemfile
new file mode 100644
index 000000000000..0039c4366963
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/ppl-address-book/Gemfile
@@ -0,0 +1,2 @@
+source 'https://rubygems.org'
+gem 'ppl'
diff --git a/nixpkgs/pkgs/applications/office/ppl-address-book/Gemfile.lock b/nixpkgs/pkgs/applications/office/ppl-address-book/Gemfile.lock
new file mode 100644
index 000000000000..5054bb8b9c8b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/ppl-address-book/Gemfile.lock
@@ -0,0 +1,34 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    colored (1.2)
+    greencard (0.0.5)
+    i18n (0.7.0)
+    inifile (2.0.2)
+    mail (2.5.3)
+      i18n (>= 0.4.0)
+      mime-types (~> 1.16)
+      treetop (~> 1.4.8)
+    mime-types (1.25.1)
+    morphine (0.1.1)
+    polyglot (0.3.5)
+    ppl (2.4.0)
+      colored (= 1.2)
+      greencard (= 0.0.5)
+      inifile (= 2.0.2)
+      mail (= 2.5.3)
+      morphine (= 0.1.1)
+      rugged (= 0.17.0.b6)
+    rugged (0.17.0.b6)
+    treetop (1.4.15)
+      polyglot
+      polyglot (>= 0.3.1)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  ppl
+
+BUNDLED WITH
+   1.12.5
diff --git a/nixpkgs/pkgs/applications/office/ppl-address-book/default.nix b/nixpkgs/pkgs/applications/office/ppl-address-book/default.nix
new file mode 100644
index 000000000000..f15affaa8d67
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/ppl-address-book/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, lib, bundlerEnv, ruby, makeWrapper, which }:
+
+let
+  pname = "ppl-address-book";
+
+  version = (import ./gemset.nix).ppl.version;
+
+  env = bundlerEnv rec {
+    name = "${pname}-env-${version}";
+    inherit ruby;
+    gemdir = ./.;
+
+    gemConfig.rugged = attrs: { buildInputs = [ which ]; };
+  };
+
+in stdenv.mkDerivation {
+  name = "${pname}-${version}";
+
+  phases = [ "installPhase" ];
+
+  buildInputs = [ env makeWrapper ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    makeWrapper ${env}/bin/ppl $out/bin/ppl
+  '';
+
+  meta = with lib; {
+    description = "Address book software for command-line users";
+    homepage    = http://ppladdressbook.org/;
+    license     = with licenses; mit;
+    maintainers = with maintainers; [ chris-martin ];
+    platforms   = platforms.unix;
+  };
+
+}
diff --git a/nixpkgs/pkgs/applications/office/ppl-address-book/gemset.nix b/nixpkgs/pkgs/applications/office/ppl-address-book/gemset.nix
new file mode 100644
index 000000000000..e8229f6153fd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/ppl-address-book/gemset.nix
@@ -0,0 +1,90 @@
+{
+  colored = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0b0x5jmsyi0z69bm6sij1k89z7h0laag3cb4mdn7zkl9qmxb90lx";
+      type = "gem";
+    };
+    version = "1.2";
+  };
+  greencard = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "11pxrl1w8c7m7rmnnmdaplrv53qgylyvkv8bzsfyjna7k16hynvq";
+      type = "gem";
+    };
+    version = "0.0.5";
+  };
+  i18n = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1i5z1ykl8zhszsxcs8mzl8d0dxgs3ylz8qlzrw74jb0gplkx6758";
+      type = "gem";
+    };
+    version = "0.7.0";
+  };
+  inifile = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "03rpacxnrnisjhd2zhc7629ica958bkdbakicl5kipw1wbprck25";
+      type = "gem";
+    };
+    version = "2.0.2";
+  };
+  mail = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1afr3acz7vsvr4gp6wnrkw1iwbjhf14mh8g8mlm40r86wcwzr39k";
+      type = "gem";
+    };
+    version = "2.5.3";
+  };
+  mime-types = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0mhzsanmnzdshaba7gmsjwnv168r1yj8y0flzw88frw1cickrvw8";
+      type = "gem";
+    };
+    version = "1.25.1";
+  };
+  morphine = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "05aw93cijd1gq39ikw2dw3i2c79bjq05kvxrs81mqxqdlini5wwa";
+      type = "gem";
+    };
+    version = "0.1.1";
+  };
+  polyglot = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1bqnxwyip623d8pr29rg6m8r0hdg08fpr2yb74f46rn1wgsnxmjr";
+      type = "gem";
+    };
+    version = "0.3.5";
+  };
+  ppl = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0vpp4s12ggbk5kpl9z1i7vi9vvghgxrc8my35yk8knckg5waxg47";
+      type = "gem";
+    };
+    version = "2.4.0";
+  };
+  rugged = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "025rj3rkj5yxf4pjj1s8x4yzshlyni3hgrjwhggg54nvw6b688qi";
+      type = "gem";
+    };
+    version = "0.17.0.b6";
+  };
+  treetop = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1zqj5y0mvfvyz11nhsb4d5ch0i0rfcyj64qx19mw4qhg3hh8z9pz";
+      type = "gem";
+    };
+    version = "1.4.15";
+  };
+}
\ No newline at end of file
diff --git a/nixpkgs/pkgs/applications/office/qnotero/default.nix b/nixpkgs/pkgs/applications/office/qnotero/default.nix
new file mode 100644
index 000000000000..b317838f6722
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/qnotero/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchFromGitHub, python3Packages
+}:
+
+python3Packages.buildPythonPackage rec {
+  name = "qnotero-${version}";
+
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "smathot";
+    repo = "qnotero";
+    rev = "release/${version}";
+    name = "qnotero-${version}-src";
+    sha256 = "1d5a9k1llzn9q1qv1bfwc7gfflabh4riplz9jj0hf04b279y1bj0";
+  };
+
+  propagatedBuildInputs = [ python3Packages.pyqt4 ];
+
+  patchPhase = ''
+      substituteInPlace ./setup.py \
+        --replace "/usr/share" "usr/share"
+
+      substituteInPlace ./libqnotero/_themes/default.py \
+         --replace "/usr/share" "$out/usr/share"
+  '';
+
+  meta = {
+    description = "Quick access to Zotero references";
+    homepage = http://www.cogsci.nl/software/qnotero;
+    license = stdenv.lib.licenses.gpl2;
+    platforms = stdenv.lib.platforms.unix;
+    maintainers = [ stdenv.lib.maintainers.nico202 ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/qownnotes/default.nix b/nixpkgs/pkgs/applications/office/qownnotes/default.nix
new file mode 100644
index 000000000000..f28c49ce4dd7
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/qownnotes/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, qmake, qttools, qtbase, qtsvg, qttranslations, qtdeclarative, qtxmlpatterns, qtwayland, qtwebsockets }:
+
+stdenv.mkDerivation rec {
+  pname = "qownnotes";
+  version = "19.3.0";
+
+  src = fetchurl {
+    url = "https://download.tuxfamily.org/${pname}/src/${pname}-${version}.tar.xz";
+    # Can grab official version like so:
+    # $ curl https://download.tuxfamily.org/qownnotes/src/qownnotes-19.1.8.tar.xz.sha256
+    sha256 = "09265d9xgqmdw3fbf94fj2irgq2dp2jhkfd2kq33axfzgpm85bdz";
+  };
+
+  nativeBuildInputs = [ qmake qttools ];
+  buildInputs = [
+    qtbase qtsvg qtdeclarative qtxmlpatterns qtwebsockets
+  ] ++ stdenv.lib.optional stdenv.isLinux qtwayland;
+
+  meta = with stdenv.lib; {
+    description = "Plain-text file notepad and todo-list manager with markdown support and ownCloud / Nextcloud integration";
+
+    homepage = https://www.qownnotes.org/;
+    platforms = platforms.all;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ dtzWill ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/scribus/default.nix b/nixpkgs/pkgs/applications/office/scribus/default.nix
new file mode 100644
index 000000000000..434b4e64ee67
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/scribus/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, fetchurl, pkgconfig, freetype, lcms, libtiff, libxml2
+, libart_lgpl, qt4, python2, cups, fontconfig, libjpeg
+, zlib, libpng, xorg, cairo, podofo, aspell, boost, cmake, imagemagick }:
+
+let
+  icon = fetchurl {
+    url = "https://gist.githubusercontent.com/ejpcmac/a74b762026c9bc4000be624c3d085517/raw/18edc497c5cb6fdeef1c8aede37a0ee68413f9d3/scribus-icon-centered.svg";
+    sha256 = "0hq3i7c2l50445an9glhhg47kj26y16svfajc6naqn307ph9vzc3";
+  };
+
+  pythonEnv = python2.withPackages(ps: [ps.tkinter]);
+in stdenv.mkDerivation rec {
+  name = "scribus-1.4.7";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/scribus/scribus/${name}.tar.xz";
+    sha256 = "1v2ziq3k0yjz35nk5plcbc1jpi53p9v1cq1z3spch9lwlns3bls2";
+  };
+
+  enableParallelBuilding = true;
+
+  buildInputs = with xorg;
+    [ pkgconfig cmake freetype lcms libtiff libxml2 libart_lgpl qt4
+      pythonEnv cups fontconfig
+      libjpeg zlib libpng podofo aspell cairo
+      boost # for internal 2geom library
+      libXaw libXext libX11 libXtst libXi libXinerama
+      libpthreadstubs libXau libXdmcp
+      imagemagick # To build the icon
+    ];
+
+  postInstall = ''
+    for i in 16 24 48 64 96 128 256 512; do
+      mkdir -p $out/share/icons/hicolor/''${i}x''${i}/apps
+      convert -background none -resize ''${i}x''${i} ${icon} $out/share/icons/hicolor/''${i}x''${i}/apps/scribus.png
+    done
+  '';
+
+  meta = {
+    maintainers = [ stdenv.lib.maintainers.marcweber ];
+    platforms = stdenv.lib.platforms.linux;
+    description = "Desktop Publishing (DTP) and Layout program for Linux";
+    homepage = https://www.scribus.net;
+    license = stdenv.lib.licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/scribus/unstable.nix b/nixpkgs/pkgs/applications/office/scribus/unstable.nix
new file mode 100644
index 000000000000..32758b462f75
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/scribus/unstable.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchsvn, makeWrapper, pkgconfig, cmake, qtbase, cairo, pixman,
+boost, cups, fontconfig, freetype, hunspell, libjpeg, libtiff, libxml2, lcms2,
+podofo, poppler, poppler_data, python2, harfbuzz, qtimageformats, qttools }:
+
+let
+  pythonEnv = python2.withPackages(ps: [ps.tkinter ps.pillow]);
+  revision = "22806";
+in 
+stdenv.mkDerivation rec {
+  name = "scribus-unstable-${version}";
+  version = "2019-01-16";
+
+  src = fetchsvn {
+    url = "svn://scribus.net/trunk/Scribus";
+    rev = revision;
+    sha256 = "16xpsbp6kca78jf48n6zdmyjras38xr11paan839hgy4ik83ncn0";
+  };
+
+  enableParallelBuilding = true;
+
+  buildInputs = [
+    makeWrapper pkgconfig cmake qtbase cairo pixman boost cups fontconfig
+    freetype hunspell libjpeg libtiff libxml2 lcms2 podofo poppler
+    poppler_data pythonEnv harfbuzz qtimageformats qttools
+  ];
+
+  postFixup = ''
+    wrapProgram $out/bin/scribus \
+      --prefix QT_PLUGIN_PATH : "${qtbase}/${qtbase.qtPluginPrefix}"
+  '';
+
+  meta = {
+    maintainers = [ stdenv.lib.maintainers.erictapen ];
+    platforms = stdenv.lib.platforms.linux;
+    description = "Desktop Publishing (DTP) and Layout program for Linux";
+    homepage = http://www.scribus.net;
+    license = stdenv.lib.licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/skanlite/default.nix b/nixpkgs/pkgs/applications/office/skanlite/default.nix
new file mode 100644
index 000000000000..416c86397f86
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/skanlite/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, cmake, extra-cmake-modules, qtbase,
+  kcoreaddons, kdoctools, ki18n, kio, kxmlgui, ktextwidgets,
+  libksane
+}:
+
+let
+  minorVersion = "2.0";
+in stdenv.mkDerivation rec {
+  name = "skanlite-2.0.1";
+
+  src = fetchurl {
+    url    = "mirror://kde/stable/skanlite/${minorVersion}/${name}.tar.xz";
+    sha256 = "0dh2v8029gkhcf3pndcxz1zk2jgpihgd30lmplgirilxdq9l2i9v";
+  };
+
+  nativeBuildInputs = [ cmake kdoctools extra-cmake-modules ];
+
+  buildInputs = [
+    qtbase
+    kcoreaddons kdoctools ki18n kio kxmlgui ktextwidgets
+    libksane
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "KDE simple image scanning application";
+    homepage    = http://www.kde.org/applications/graphics/skanlite/;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ pshendry ];
+    platforms   = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/skrooge/default.nix b/nixpkgs/pkgs/applications/office/skrooge/default.nix
new file mode 100644
index 000000000000..9b417a8a5b63
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/skrooge/default.nix
@@ -0,0 +1,41 @@
+{ mkDerivation, lib, fetchurl,
+  cmake, extra-cmake-modules, qtwebengine, qtscript, grantlee,
+  kxmlgui, kwallet, kparts, kdoctools, kjobwidgets, kdesignerplugin,
+  kiconthemes, knewstuff, sqlcipher, qca-qt5, kactivities, karchive,
+  kguiaddons, knotifyconfig, krunner, kwindowsystem, libofx, shared-mime-info
+}:
+
+mkDerivation rec {
+  name = "skrooge-${version}";
+  version = "2.18.0";
+
+  src = fetchurl {
+    url = "http://download.kde.org/stable/skrooge/${name}.tar.xz";
+    sha256 = "00zk152clnmq8rjjnrxmd7lfflf2pnzljaw73bjjsb6r6vkxywa6";
+  };
+
+  nativeBuildInputs = [
+    cmake extra-cmake-modules kdoctools shared-mime-info
+  ];
+
+  buildInputs = [
+    qtwebengine qtscript grantlee kxmlgui kwallet kparts
+    kjobwidgets kdesignerplugin kiconthemes knewstuff sqlcipher qca-qt5
+    kactivities karchive kguiaddons knotifyconfig krunner kwindowsystem libofx
+  ];
+
+  # SKG_DESIGNER must be used to generate the needed library for QtDesigner.
+  # This is needed ONLY for developers. So NOT NEEDED for end user.
+  # Source: https://forum.kde.org/viewtopic.php?f=210&t=143375#p393675
+  cmakeFlags = [
+    "-DSKG_DESIGNER=OFF"
+    "-DSKG_WEBENGINE=ON"
+  ];
+
+  meta = with lib; {
+    description = "A personal finances manager, powered by KDE";
+    license = with licenses; [ gpl3 ];
+    maintainers = with maintainers; [ joko ];
+    homepage = https://skrooge.org/;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/spice-up/default.nix b/nixpkgs/pkgs/applications/office/spice-up/default.nix
new file mode 100644
index 000000000000..df8276718c50
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/spice-up/default.nix
@@ -0,0 +1,58 @@
+{ stdenv
+, fetchFromGitHub
+, cmake
+, gdk_pixbuf
+, gtk3
+, gettext
+, ninja
+, pantheon
+, pkgconfig
+, json-glib
+, libgudev
+, libevdev
+, libgee
+, libsoup
+, wrapGAppsHook }:
+
+stdenv.mkDerivation rec {
+  pname = "spice-up";
+  version = "1.8.0";
+
+  src = fetchFromGitHub {
+    owner = "Philip-Scott";
+    repo = "Spice-up";
+    rev = version;
+    sha256 = "0jbqgf936pqss8ha27fcyjbhvkn4ij96b3d87c6gcx90glmq33zb";
+  };
+
+  USER = "pbuilder";
+
+  nativeBuildInputs = [
+    cmake
+    gettext
+    ninja
+    pkgconfig
+    pantheon.vala
+    wrapGAppsHook
+  ];
+  buildInputs = [
+    pantheon.elementary-icon-theme
+    pantheon.granite
+    gdk_pixbuf
+    gtk3
+    json-glib
+    libevdev
+    libgee
+    libgudev
+    libsoup
+  ];
+
+  meta = with stdenv.lib; {
+    description = "Create simple and beautiful presentations";
+    homepage = https://github.com/Philip-Scott/Spice-up;
+    maintainers = with maintainers; [ samdroid-apps kjuvi ] ++ pantheon.maintainers;
+    platforms = platforms.linux;
+    # The COPYING file has GPLv3; some files have GPLv2+ and some have GPLv3+
+    license = licenses.gpl3Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/tagainijisho/default.nix b/nixpkgs/pkgs/applications/office/tagainijisho/default.nix
new file mode 100644
index 000000000000..24542041cc87
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/tagainijisho/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchurl, qt4, cmake, sqlite }:
+
+stdenv.mkDerivation {
+  name = "tagainijisho-1.0.3";
+  src = fetchurl {
+    url = https://github.com/Gnurou/tagainijisho/releases/download/1.0.3/tagainijisho-1.0.3.tar.gz;
+    sha256 = "0kmg1940yiqfm4vpifyj680283ids4nsij9s750nrshwxiwwbqvg";
+  };
+
+  buildInputs = [ qt4 cmake sqlite ];
+
+  meta = with stdenv.lib; {
+    description = "A free, open-source Japanese dictionary and kanji lookup tool";
+    homepage = https://www.tagaini.net/;
+    license = with licenses; [
+      /* program */ gpl3Plus
+      /* data */ cc-by-sa-30
+    ];
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ vbgl ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/timetrap/Gemfile b/nixpkgs/pkgs/applications/office/timetrap/Gemfile
new file mode 100644
index 000000000000..3ce845d11c10
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/timetrap/Gemfile
@@ -0,0 +1,2 @@
+source 'https://rubygems.org'
+gem 'timetrap'
diff --git a/nixpkgs/pkgs/applications/office/timetrap/Gemfile.lock b/nixpkgs/pkgs/applications/office/timetrap/Gemfile.lock
new file mode 100644
index 000000000000..f71f4eaa4085
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/timetrap/Gemfile.lock
@@ -0,0 +1,19 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    chronic (0.10.2)
+    sequel (4.43.0)
+    sqlite3 (1.3.13)
+    timetrap (1.15.1)
+      chronic (~> 0.10.2)
+      sequel (~> 4.43.0)
+      sqlite3 (~> 1.3.3)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  timetrap
+
+BUNDLED WITH
+   1.10.6
diff --git a/nixpkgs/pkgs/applications/office/timetrap/default.nix b/nixpkgs/pkgs/applications/office/timetrap/default.nix
new file mode 100644
index 000000000000..20dd27fa2873
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/timetrap/default.nix
@@ -0,0 +1,17 @@
+{ lib, bundlerEnv, ruby }:
+
+bundlerEnv rec {
+  name = "timetrap-${version}";
+
+  version = (import gemset).timetrap.version;
+  inherit ruby;
+  gemdir = ./.;
+  gemset = ./gemset.nix;
+
+  meta = with lib; {
+    description = "A simple command line time tracker written in ruby";
+    homepage = https://github.com/samg/timetrap;
+    license = licenses.mit;
+    maintainers = [ maintainers.jerith666 ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/timetrap/gemset.nix b/nixpkgs/pkgs/applications/office/timetrap/gemset.nix
new file mode 100644
index 000000000000..5764016573fc
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/timetrap/gemset.nix
@@ -0,0 +1,35 @@
+{
+  chronic = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1hrdkn4g8x7dlzxwb1rfgr8kw3bp4ywg5l4y4i9c2g5cwv62yvvn";
+      type = "gem";
+    };
+    version = "0.10.2";
+  };
+  sequel = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "121z4sq2m4vsgxwy8hs6d12cc1i4xa5rjiv0nbviyj87jldxapw0";
+      type = "gem";
+    };
+    version = "4.43.0";
+  };
+  sqlite3 = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "01ifzp8nwzqppda419c9wcvr8n82ysmisrs0hph9pdmv1lpa4f5i";
+      type = "gem";
+    };
+    version = "1.3.13";
+  };
+  timetrap = {
+    dependencies = ["chronic" "sequel" "sqlite3"];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0ylaz9q99hbxnw6h1df6wphmh68fj847d1l4f9jylcx3nzzp5cyd";
+      type = "gem";
+    };
+    version = "1.15.1";
+  };
+}
\ No newline at end of file
diff --git a/nixpkgs/pkgs/applications/office/todo.txt-cli/default.nix b/nixpkgs/pkgs/applications/office/todo.txt-cli/default.nix
new file mode 100644
index 000000000000..77a602954438
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/todo.txt-cli/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl }:
+let
+  version = "2.11.0";
+in stdenv.mkDerivation {
+  name = "todo.txt-cli-${version}";
+
+  src = fetchurl {
+    url = "https://github.com/ginatrapani/todo.txt-cli/releases/download/v${version}/todo.txt_cli-${version}.tar.gz";
+    sha256 = "0majx8lcvhh8ji54qi0sxr833wchdss95fjc92byd8g3lfz27rsz";
+  };
+
+  installPhase = ''
+    install -vd $out/bin
+    install -vm 755 todo.sh $out/bin
+    install -vd $out/etc/bash_completion.d
+    install -vm 644 todo_completion $out/etc/bash_completion.d/todo
+    install -vd $out/etc/todo
+    install -vm 644 todo.cfg $out/etc/todo/config
+  '';
+
+  meta = {
+    description = "Simple plaintext todo list manager";
+    homepage = http://todotxt.com;
+    license = stdenv.lib.licenses.gpl3;
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/todoman/default.nix b/nixpkgs/pkgs/applications/office/todoman/default.nix
new file mode 100644
index 000000000000..3f4953fc12a7
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/todoman/default.nix
@@ -0,0 +1,58 @@
+{ stdenv, python3, glibcLocales, fetchpatch }:
+
+let
+  inherit (python3.pkgs) buildPythonApplication fetchPypi;
+in
+buildPythonApplication rec {
+  pname = "todoman";
+  version = "3.5.0";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "051qjdpwif06x7qspnb4pfwdhb8nnmz99yqcp4kla5hv0n3jh0w9";
+  };
+
+    LOCALE_ARCHIVE = stdenv.lib.optionalString stdenv.isLinux
+      "${glibcLocales}/lib/locale/locale-archive";
+    LANG = "en_US.UTF-8";
+    LC_TYPE = "en_US.UTF-8";
+
+  buildInputs = [ glibcLocales ];
+  propagatedBuildInputs = with python3.pkgs;
+    [ atomicwrites click click-log configobj humanize icalendar parsedatetime
+      python-dateutil pyxdg tabulate urwid ];
+
+  checkInputs = with python3.pkgs;
+    [ flake8 flake8-import-order freezegun hypothesis pytest pytestrunner pytestcov ];
+
+  makeWrapperArgs = [ "--set LOCALE_ARCHIVE ${glibcLocales}/lib/locale/locale-archive"
+                      "--set CHARSET en_us.UTF-8" ];
+
+  preCheck = ''
+    # Remove one failing test that only checks whether the command line works
+    rm tests/test_main.py
+    rm tests/test_cli.py
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/pimutils/todoman;
+    description = "Standards-based task manager based on iCalendar";
+    longDescription = ''
+      Todoman is a simple, standards-based, cli todo (aka: task) manager. Todos
+      are stored into icalendar files, which means you can sync them via CalDAV
+      using, for example, vdirsyncer.
+
+      Todos are read from individual ics files from the configured directory.
+      This matches the vdir specification.  There’s support for the most common TODO
+      features for now (summary, description, location, due date and priority) for
+      now.  Runs on any Unix-like OS. It’s been tested on GNU/Linux, BSD and macOS.
+      Unsupported fields may not be shown but are never deleted or altered.
+
+      Todoman is part of the pimutils project
+    '';
+    license = licenses.isc;
+    maintainers = with maintainers; [ leenaars ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/treesheets/default.nix b/nixpkgs/pkgs/applications/office/treesheets/default.nix
new file mode 100644
index 000000000000..d0a4953c426b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/treesheets/default.nix
@@ -0,0 +1,56 @@
+{ stdenv, fetchFromGitHub, wxGTK, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  name    = "treesheets-${version}";
+  version = "2018-08-18";
+
+  src = fetchFromGitHub {
+    owner  = "aardappel";
+    repo   = "treesheets";
+    rev    = "3af41d99c8f9f32603a36ab64af3560b6d61dd73";
+    sha256 = "147y8ggh3clwjgsi15z8i4jnzlkh8p17mmlg532jym53zzbcva65";
+  };
+
+  buildInputs = [ wxGTK makeWrapper ];
+
+  preConfigure = "cd src";
+
+  postInstall = ''
+    mkdir "$out/share" -p
+    cp -av ../TS "$out/share/libexec"
+
+    mkdir "$out/bin" -p
+    makeWrapper "$out/share/libexec/treesheets" "$out/bin/treesheets"
+
+    mkdir "$out/share/doc" -p
+
+    for f in readme.html docs examples
+    do
+      mv -v "$out/share/libexec/$f" "$out/share/doc"
+      ln -sv "$out/share/doc/$f" "$out/share/libexec/$f"
+    done
+
+    mkdir "$out/share/applications" -p
+    mv -v "$out/share/libexec/treesheets.desktop" "$out/share/applications"
+    substituteInPlace "$out/share/applications/treesheets.desktop" \
+      --replace "Icon=images/treesheets.svg" "Icon=$out/share/libexec/images/treesheets.svg"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Free Form Data Organizer";
+
+    longDescription = ''
+      The ultimate replacement for spreadsheets, mind mappers, outliners,
+      PIMs, text editors and small databases.
+
+      Suitable for any kind of data organization, such as Todo lists,
+      calendars, project management, brainstorming, organizing ideas,
+      planning, requirements gathering, presentation of information, etc.
+    '';
+
+    homepage    = http://strlen.com/treesheets/;
+    maintainers = with maintainers; [ obadz avery ];
+    platforms   = platforms.linux;
+    license     = licenses.zlib;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/trilium/default.nix b/nixpkgs/pkgs/applications/office/trilium/default.nix
new file mode 100644
index 000000000000..dc9f0b89b2ff
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/trilium/default.nix
@@ -0,0 +1,66 @@
+{ stdenv, fetchurl, autoPatchelfHook, atomEnv, makeWrapper, makeDesktopItem, gtk3, wrapGAppsHook }:
+
+let
+  description = "Trilium Notes is a hierarchical note taking application with focus on building large personal knowledge bases.";
+  desktopItem = makeDesktopItem {
+    name = "Trilium";
+    exec = "trilium";
+    icon = "trilium";
+    comment = description;
+    desktopName = "Trilium Notes";
+    categories = "Office";
+  };
+
+in stdenv.mkDerivation rec {
+  name = "trilium-${version}";
+  version = "0.30.4";
+
+  src = fetchurl {
+    url = "https://github.com/zadam/trilium/releases/download/v${version}/trilium-linux-x64-${version}.tar.xz";
+    sha256 = "1541z56rk329sj7a20llhhmv2f552amj1n3cisvqga4gn2yq3hnm";
+  };
+
+  # Fetch from source repo, no longer included in release.
+  # (they did special-case icon.png but we want the scalable svg)
+  # Use the version here to ensure we get any changes.
+  trilium_svg = fetchurl {
+    url = "https://raw.githubusercontent.com/zadam/trilium/v${version}/src/public/images/trilium.svg";
+    sha256 = "1rgj7pza20yndfp8n12k93jyprym02hqah36fkk2b3if3kcmwnfg";
+  };
+
+
+  nativeBuildInputs = [
+    autoPatchelfHook
+    makeWrapper
+    wrapGAppsHook
+  ];
+
+  buildInputs = [ atomEnv.packages gtk3 ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mkdir -p $out/share/trilium
+    mkdir -p $out/share/{applications,icons/hicolor/scalable/apps}
+
+    cp -r ./* $out/share/trilium
+    ln -s $out/share/trilium/trilium $out/bin/trilium
+
+    ln -s ${trilium_svg} $out/share/icons/hicolor/scalable/apps/trilium.svg
+    cp ${desktopItem}/share/applications/* $out/share/applications
+  '';
+
+  # LD_LIBRARY_PATH "shouldn't" be needed, remove when possible :)
+  preFixup = ''
+    gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : ${atomEnv.libPath})
+  '';
+
+  dontStrip = true;
+
+  meta = with stdenv.lib; {
+    inherit description;
+    homepage = https://github.com/zadam/trilium;
+    license = licenses.agpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ emmanuelrosa dtzWill ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/tryton/default.nix b/nixpkgs/pkgs/applications/office/tryton/default.nix
new file mode 100644
index 000000000000..4422aaa2b448
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/tryton/default.nix
@@ -0,0 +1,58 @@
+{ stdenv
+, python2Packages
+, pkgconfig
+, librsvg
+, gobject-introspection
+, atk
+, gtk3
+, gtkspell3
+, gnome3
+, goocanvas2
+}:
+
+with stdenv.lib;
+
+python2Packages.buildPythonApplication rec {
+  pname = "tryton";
+  version = "4.8.5";
+  src = python2Packages.fetchPypi {
+    inherit pname version;
+    sha256 = "43759d22b061a7a392a534d19a045fafd442ce98a0e390ee830127367dcaf4b4";
+  };
+  nativeBuildInputs = [ pkgconfig gobject-introspection ];
+  propagatedBuildInputs = with python2Packages; [
+    chardet
+    dateutil
+    pygtk
+    librsvg
+    pygobject3
+    goocalendar
+    cdecimal
+  ];
+  buildInputs = [
+    atk
+    gtk3
+    gnome3.adwaita-icon-theme
+    gtkspell3
+    goocanvas2
+  ];
+  makeWrapperArgs = [
+    ''--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"''
+    ''--set GI_TYPELIB_PATH "$GI_TYPELIB_PATH"''
+    ''--suffix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"''
+  ];
+  meta = {
+    description = "The client of the Tryton application platform";
+    longDescription = ''
+      The client for Tryton, a three-tier high-level general purpose
+      application platform under the license GPL-3 written in Python and using
+      PostgreSQL as database engine.
+
+      It is the core base of a complete business solution providing
+      modularity, scalability and security.
+    '';
+    homepage = http://www.tryton.org/;
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ johbo udono ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/trytond/default.nix b/nixpkgs/pkgs/applications/office/trytond/default.nix
new file mode 100644
index 000000000000..dc63acd6db64
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/trytond/default.nix
@@ -0,0 +1,52 @@
+{ stdenv, python2Packages
+, withPostgresql ? true }:
+
+with stdenv.lib;
+
+python2Packages.buildPythonApplication rec {
+  pname = "trytond";
+  version = "4.8.4";
+  src = python2Packages.fetchPypi {
+    inherit pname version;
+    sha256 = "1935045b1b4674de602b4279a9cfd0a14431624a28ccb490234cffecb81fbca7";
+  };
+
+  # Tells the tests which database to use
+  DB_NAME = ":memory:";
+
+  buildInputs = with python2Packages; [
+    mock
+  ];
+  propagatedBuildInputs = with python2Packages; ([
+    dateutil
+    lxml
+    polib
+    python-sql
+    relatorio
+    werkzeug
+    wrapt
+    ipaddress
+
+    # extra dependencies
+    bcrypt
+    pydot
+    python-Levenshtein
+    simplejson
+    cdecimal
+    html2text
+  ] ++ stdenv.lib.optional withPostgresql psycopg2);
+  meta = {
+    description = "The server of the Tryton application platform";
+    longDescription = ''
+      The server for Tryton, a three-tier high-level general purpose
+      application platform under the license GPL-3 written in Python and using
+      PostgreSQL as database engine.
+
+      It is the core base of a complete business solution providing
+      modularity, scalability and security.
+    '';
+    homepage = http://www.tryton.org/;
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ udono johbo ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/tudu/default.nix b/nixpkgs/pkgs/applications/office/tudu/default.nix
new file mode 100644
index 000000000000..dea3ea9731b0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/tudu/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl, ncurses }:
+stdenv.mkDerivation rec {
+
+  name = "tudu-${version}";
+  version = "0.10.2";
+
+  src = fetchurl {
+    url = "https://code.meskio.net/tudu/${name}.tar.gz";
+    sha256 = "1xsncvd1c6v8y0dzc5mspy9rrwc89pabhz6r2lihsirk83h2rqym";
+  };
+
+  buildInputs = [ ncurses ];
+
+  meta = {
+    description = "ncurses-based hierarchical todo list manager with vim-like keybindings";
+    homepage = https://code.meskio.net/tudu/;
+    license = stdenv.lib.licenses.gpl3;
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/watson/default.nix b/nixpkgs/pkgs/applications/office/watson/default.nix
new file mode 100644
index 000000000000..e0f0c58b4506
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/watson/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, pythonPackages, fetchpatch }:
+
+with pythonPackages;
+
+buildPythonApplication rec {
+  pname = "td-watson";
+  version = "1.5.2";
+
+  src = fetchPypi {
+    inherit version pname;
+    sha256 = "6e03d44a9278807fe5245e9ed0943f13ffb88e11249a02655c84cb86260b27c8";
+  };
+
+  # uses tox, test invocation fails
+  doCheck = true;
+  checkPhase = ''
+    py.test -vs tests
+ '';
+
+  patches = [
+    (fetchpatch {
+      url = https://github.com/TailorDev/Watson/commit/f5760c71cbc22de4e12ede8f6f7257515a9064d3.patch;
+      sha256 = "0s9h26915ilpbd0qhmvk77r3gmrsdrl5l7dqxj0l5q66fp0z6b0g";
+    })
+  ];
+
+  checkInputs = [ py pytest pytest-datafiles mock pytest-mock pytestrunner ];
+  propagatedBuildInputs = [ requests click arrow ];
+
+  meta = with stdenv.lib; {
+    homepage = https://tailordev.github.io/Watson/;
+    description = "A wonderful CLI to track your time!";
+    license = licenses.mit;
+    maintainers = with maintainers; [ mguentner ] ;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/wordgrinder/default.nix b/nixpkgs/pkgs/applications/office/wordgrinder/default.nix
new file mode 100644
index 000000000000..be5ac7a2f2be
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/wordgrinder/default.nix
@@ -0,0 +1,55 @@
+{ stdenv, fetchFromGitHub, pkgconfig, makeWrapper
+, lua52Packages, libXft, ncurses, ninja, readline, zlib }:
+
+stdenv.mkDerivation rec {
+  name = "wordgrinder-${version}";
+  version = "0.7.1";
+
+  src = fetchFromGitHub {
+    repo = "wordgrinder";
+    owner = "davidgiven";
+    rev = "${version}";
+    sha256 = "19n4vn8zyvcvgwygm63d3jcmiwh6a2ikrrqqmkm8fvhdvwkqgr9k";
+  };
+
+  makeFlags = [
+    "PREFIX=$(out)"
+    "LUA_INCLUDE=${lua52Packages.lua}/include"
+    "LUA_LIB=${lua52Packages.lua}/lib/liblua.so"
+  ] ++ stdenv.lib.optional stdenv.isLinux "XFT_PACKAGE=--libs=\{-lX11 -lXft\}";
+
+  dontUseNinjaBuild = true;
+  dontUseNinjaInstall = true;
+
+  nativeBuildInputs = [
+    pkgconfig
+    makeWrapper
+    ninja
+  ];
+
+  buildInputs = [
+    libXft
+    lua52Packages.lua
+    ncurses
+    readline
+    zlib
+  ];
+
+  # To be able to find <Xft.h>
+  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isLinux "-I${libXft.dev}/include/X11";
+
+  # Binaries look for LuaFileSystem library (lfs.so) at runtime
+  postInstall = ''
+    wrapProgram $out/bin/wordgrinder --set LUA_CPATH "${lua52Packages.luafilesystem}/lib/lua/5.2/lfs.so";
+  '' + stdenv.lib.optionalString stdenv.isLinux ''
+    wrapProgram $out/bin/xwordgrinder --set LUA_CPATH "${lua52Packages.luafilesystem}/lib/lua/5.2/lfs.so";
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Text-based word processor";
+    homepage = https://cowlark.com/wordgrinder;
+    license = licenses.mit;
+    maintainers = with maintainers; [ matthiasbeyer ];
+    platforms = with stdenv.lib.platforms; linux ++ darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/wpsoffice/default.nix b/nixpkgs/pkgs/applications/office/wpsoffice/default.nix
new file mode 100644
index 000000000000..4c83d67f7cda
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/wpsoffice/default.nix
@@ -0,0 +1,79 @@
+{ stdenv, fetchurl
+, libX11, glib, xorg, fontconfig, freetype
+, zlib, libpng12, libICE, libXrender, cups }:
+
+let
+  bits = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64"
+         else "x86";
+
+  version = "10.1.0.5672";
+in stdenv.mkDerivation rec{
+  name = "wpsoffice-${version}";
+
+  src = fetchurl {
+    name = "${name}.tar.xz";
+    url = "http://kdl.cc.ksosoft.com/wps-community/download/a21/wps-office_${version}~a21_${bits}.tar.xz";
+    sha256 = if bits == "x86_64" then
+      "0mi3n9kplf82gd0g2m0np957agy53p4g1qh81pbban49r4n0ajcz" else
+      "1dk400ap5qwdhjvn8lnk602f5akayr391fkljxdkrpn5xac01m97";
+  };
+
+  meta = {
+    description = "Office program originally named Kingsoft Office";
+    homepage = http://wps-community.org/;
+    platforms = [ "i686-linux" "x86_64-linux" ];
+    hydraPlatforms = [];
+    license = stdenv.lib.licenses.unfreeRedistributable;
+  };
+
+  libPath = stdenv.lib.makeLibraryPath [
+    libX11
+    libpng12
+    glib
+    xorg.libSM
+    xorg.libXext
+    fontconfig
+    zlib
+    freetype
+    libICE
+    cups
+    libXrender
+  ];
+
+  dontPatchELF = true;
+
+  # wpsoffice uses `/build` in its own build system making nix things there
+  # references to nix own build directory
+  noAuditTmpdir = true;
+
+  installPhase = ''
+    prefix=$out/opt/kingsoft/wps-office
+    mkdir -p $prefix
+    cp -r . $prefix
+
+    # Avoid forbidden reference error due use of patchelf
+    rm -r $PWD
+
+    mkdir $out/bin
+    for i in wps wpp et; do
+      patchelf \
+        --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+        --force-rpath --set-rpath "$prefix/office6:$libPath" \
+        $prefix/office6/$i
+
+      substitute $prefix/$i $out/bin/$i \
+        --replace /opt/kingsoft/wps-office $prefix
+      chmod +x $out/bin/$i
+
+      substituteInPlace $prefix/resource/applications/wps-office-$i.desktop \
+        --replace /usr/bin $out/bin
+    done
+
+    # China fonts
+    mkdir -p $prefix/resource/fonts/wps-office $out/etc/fonts/conf.d
+    ln -s $prefix/fonts/* $prefix/resource/fonts/wps-office
+    ln -s $prefix/fontconfig/*.conf $out/etc/fonts/conf.d
+
+    ln -s $prefix/resource $out/share
+  '';
+}
diff --git a/nixpkgs/pkgs/applications/office/zanshin/default.nix b/nixpkgs/pkgs/applications/office/zanshin/default.nix
new file mode 100644
index 000000000000..f8785616c5e6
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/zanshin/default.nix
@@ -0,0 +1,39 @@
+{
+  mkDerivation, lib,
+  fetchFromGitHub,
+  extra-cmake-modules,
+  qtbase, boost,
+  akonadi-calendar, akonadi-notes, akonadi-search, kidentitymanagement, kontactinterface, kldap,
+  krunner, kwallet
+}:
+
+mkDerivation rec {
+  pname = "zanshin";
+  version = "2017-11-25";
+  name = "${pname}-${version}";
+
+  src = fetchFromGitHub {
+    owner = "KDE";
+    repo = "zanshin";
+    rev = "3df91dd81682d2ccfe542c4582dc1d5f98537c89";
+    sha256 = "18wx7bdqzp81xmwi266gphh2lfbcp5s0fzyp654gki40yhkqph6m";
+  };
+
+  nativeBuildInputs = [
+    extra-cmake-modules
+  ];
+
+  buildInputs = [
+    qtbase boost
+    akonadi-calendar akonadi-notes akonadi-search kidentitymanagement kontactinterface kldap
+    krunner kwallet
+  ];
+
+  meta = with lib; {
+    description = "A powerful yet simple application to manage your day to day actions, getting your mind like water";
+    homepage = https://zanshin.kde.org/;
+    maintainers = with maintainers; [ zraexy ];
+    platforms = platforms.linux;
+    license = licenses.gpl2Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/zim/default.nix b/nixpkgs/pkgs/applications/office/zim/default.nix
new file mode 100644
index 000000000000..48027c194da6
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/zim/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, fetchurl, python2Packages }:
+
+#
+# TODO: Declare configuration options for the following optional dependencies:
+#  -  File stores: hg, git, bzr
+#  -  Included plugins depenencies: dot, ditaa, dia, any other?
+#  -  pyxdg: Need to make it work first (see setupPyInstallFlags).
+#
+
+python2Packages.buildPythonApplication rec {
+  name = "zim-${version}";
+  version = "0.69.1";
+
+  src = fetchurl {
+    url = "http://zim-wiki.org/downloads/${name}.tar.gz";
+    sha256 = "1yzb8x4mjp96zshcw7xbd4mvqn8zmbcm7cndskpxyk5yccyn5awq";
+  };
+
+  propagatedBuildInputs = with python2Packages; [ pyGtkGlade pyxdg pygobject2 ];
+
+  preBuild = ''
+    export HOME=$TMP
+
+    sed -i '/zim_install_class,/d' setup.py
+  '';
+
+
+  preFixup = ''
+    export makeWrapperArgs="--prefix XDG_DATA_DIRS : $out/share --argv0 $out/bin/.zim-wrapped"
+  '';
+
+  # RuntimeError: could not create GtkClipboard object
+  doCheck = false;
+
+  checkPhase = ''
+    python test.py
+  '';
+
+
+  meta = with stdenv.lib; {
+    description = "A desktop wiki";
+    homepage = http://zim-wiki.org;
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ pSub ];
+    broken = stdenv.isDarwin; # https://github.com/NixOS/nixpkgs/pull/52658#issuecomment-449565790
+  };
+}
diff --git a/nixpkgs/pkgs/applications/office/zotero/default.nix b/nixpkgs/pkgs/applications/office/zotero/default.nix
new file mode 100644
index 000000000000..61e84e2be430
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/zotero/default.nix
@@ -0,0 +1,67 @@
+{ stdenv, fetchurl, buildFHSUserEnv, makeDesktopItem, runCommand, bash, wrapGAppsHook, gsettings-desktop-schemas, gtk3, gnome3 }:
+
+let
+version = "5.0.60";
+meta = with stdenv.lib; {
+  homepage = https://www.zotero.org;
+  description = "Collect, organize, cite, and share your research sources";
+  license = licenses.agpl3;
+  platforms = platforms.linux;
+};
+
+zoteroSrc = stdenv.mkDerivation rec {
+  inherit version;
+  name = "zotero-${version}-pkg";
+
+  src = fetchurl {
+    url = "https://download.zotero.org/client/release/${version}/Zotero-${version}_linux-x86_64.tar.bz2";
+    sha256 = "0753xk95shhxma4dvdxrj2q6y81z8lianxg7jnab9m17fb67jy2d";
+  };
+
+  buildInputs= [ wrapGAppsHook gsettings-desktop-schemas gtk3 gnome3.adwaita-icon-theme gnome3.dconf ];
+  phases = [ "unpackPhase" "installPhase" "fixupPhase"];
+
+  installPhase = ''
+    mkdir -p $out/data
+    cp -r * $out/data
+    mkdir $out/bin
+    ln -s $out/data/zotero $out/bin/zotero
+  '';
+};
+
+fhsEnv = buildFHSUserEnv {
+  name = "zotero-fhs-env";
+  targetPkgs = pkgs: with pkgs; with xorg; [
+    gtk3 dbus-glib glib
+    libXt nss
+    libX11
+  ];
+};
+
+desktopItem = makeDesktopItem rec {
+  name = "zotero-${version}";
+  exec = "zotero -url %U";
+  icon = "zotero";
+  type = "Application";
+  comment = meta.description;
+  desktopName = "Zotero";
+  genericName = "Reference Management";
+  categories = "Office;Database;";
+  startupNotify = "true";
+};
+
+in runCommand "zotero-${version}" { inherit meta; } ''
+  mkdir -p $out/bin $out/share/applications
+  cat >$out/bin/zotero <<EOF
+#!${bash}/bin/bash
+${fhsEnv}/bin/zotero-fhs-env ${zoteroSrc}/bin/zotero
+EOF
+  chmod +x $out/bin/zotero
+
+  cp ${desktopItem}/share/applications/* $out/share/applications/
+
+  for size in 16 32 48 256; do
+    install -Dm444 ${zoteroSrc}/data/chrome/icons/default/default$size.png \
+      $out/share/icons/hicolor/''${size}x''${size}/apps/zotero.png
+  done
+''
diff --git a/nixpkgs/pkgs/applications/office/zotero/zotero.sh b/nixpkgs/pkgs/applications/office/zotero/zotero.sh
new file mode 100644
index 000000000000..8941097fc422
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/zotero/zotero.sh
@@ -0,0 +1,3 @@
+#!@bash@/bin/bash
+
+exec "@firefox@/bin/firefox" -app "@out@/libexec/zotero/application.ini" "${@}"