From 97390d648dbfedb28269e6db1255a2b03ad19440 Mon Sep 17 00:00:00 2001 From: Daniël de Kok Date: Fri, 30 Aug 2019 17:37:58 +0200 Subject: softmaker-office: init at 970 --- .../office/softmaker/desktop_items.nix | 42 ++++++++++ pkgs/applications/office/softmaker/generic.nix | 95 ++++++++++++++++++++++ .../office/softmaker/softmaker_office.nix | 15 ++++ 3 files changed, 152 insertions(+) create mode 100644 pkgs/applications/office/softmaker/desktop_items.nix create mode 100644 pkgs/applications/office/softmaker/generic.nix create mode 100644 pkgs/applications/office/softmaker/softmaker_office.nix (limited to 'pkgs/applications/office') diff --git a/pkgs/applications/office/softmaker/desktop_items.nix b/pkgs/applications/office/softmaker/desktop_items.nix new file mode 100644 index 000000000000..6975da064566 --- /dev/null +++ b/pkgs/applications/office/softmaker/desktop_items.nix @@ -0,0 +1,42 @@ +{ makeDesktopItem, pname, suiteName }: + +{ + planmaker = makeDesktopItem { + name = "${pname}-planmaker"; + desktopName = "${suiteName} PlanMaker"; + icon = "${pname}-pml.png"; + categories = "Application;Office;SpreadSheet;"; + exec = "${pname}-planmaker %F"; + mimeType = "application/x-pmd;application/x-pmdx;application/x-pmv;application/excel;application/x-excel;application/x-ms-excel;application/x-msexcel;application/x-sylk;application/x-xls;application/xls;application/vnd.ms-excel;application/vnd.stardivision.calc;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.sheet.macroenabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroEnabled.12;application/x-dif;text/spreadsheet;text/csv;application/x-prn;application/vnd.ms-excel.sheet.binary.macroenabled.12;"; + extraEntries = '' + TryExec=${pname}-planmaker + StartupWMClass=pm + ''; + }; + + presentations = makeDesktopItem { + name = "${pname}-presentations"; + desktopName = "${suiteName} Presentations"; + icon = "${pname}-prl.png"; + categories = "Application;Office;Presentation;"; + exec = "${pname}-presentations %F"; + mimeType = "application/x-prdx;application/x-prvx;application/x-prsx;application/x-prd;application/x-prv;application/x-prs;application/ppt;application/mspowerpoint;application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.ms-powerpoint.presentation.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.template;application/vnd.ms-powerpoint.template.macroEnabled.12;application/vnd.ms-powerpoint.slideshow.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.slideshow;"; + extraEntries = '' + TryExec=${pname}-presentations + StartupWMClass=pr + ''; + }; + + textmaker = makeDesktopItem { + name = "${pname}-textmaker"; + desktopName = "${suiteName} TextMaker"; + icon = "${pname}-tml.png"; + categories = "Application;Office;WordProcessor;"; + exec = "${pname}-textmaker %F"; + mimeType = "application/x-tmdx;application/x-tmvx;application/x-tmd;application/x-tmv;application/msword;application/vnd.ms-word;application/x-doc;text/rtf;application/rtf;application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.stardivision.writer;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.ms-word.document.macroenabled.12;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.template.macroenabled.12;application/x-pocket-word;application/x-dbf;application/msword-template;"; + extraEntries = '' + TryExec=${pname}-textmaker + StartupWMClass=tm + ''; + }; +} diff --git a/pkgs/applications/office/softmaker/generic.nix b/pkgs/applications/office/softmaker/generic.nix new file mode 100644 index 000000000000..9505271db14c --- /dev/null +++ b/pkgs/applications/office/softmaker/generic.nix @@ -0,0 +1,95 @@ +{ stdenv, fetchurl, autoPatchelfHook, makeDesktopItem, makeWrapper + + # Dynamic Libraries +, curl, libGL, libX11, libXext, libXmu, libXrandr, libXrender + +, pname, version, edition, suiteName, src, archive + +, ... +}: + +let + desktopItems = import ./desktop_items.nix { + inherit makeDesktopItem pname suiteName; + }; + shortEdition = builtins.substring 2 2 edition; +in stdenv.mkDerivation rec { + inherit pname version edition shortEdition src; + nativeBuildInputs = [ + autoPatchelfHook + makeWrapper + ]; + + buildInputs = [ + curl + libGL + libX11 + libXext + libXmu + libXrandr + libXrender + stdenv.cc.cc.lib + ]; + + dontBuild = true; + dontConfigure = true; + + unpackPhase = '' + runHook preUnpack + + mkdir installer + tar -C installer -xf ${src} + mkdir ${pname} + tar -C ${pname} -xf installer/${archive} + + runHook postUnpack + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share + cp -r ${pname} $out/share/${pname}${edition} + + # Wrap rather than symlinking, so that the programs can determine + # their resource path. + mkdir -p $out/bin + makeWrapper $out/share/${pname}${edition}/planmaker $out/bin/${pname}-planmaker + makeWrapper $out/share/${pname}${edition}/presentations $out/bin/${pname}-presentations + makeWrapper $out/share/${pname}${edition}/textmaker $out/bin/${pname}-textmaker + + for size in 16 32 48 64 96 128 256 512 1024; do + mkdir -p $out/share/icons/hicolor/''${size}x''${size}/apps + + for app in pml prl tml; do + ln -s $out/share/${pname}${edition}/icons/''${app}_''${size}.png \ + $out/share/icons/hicolor/''${size}x''${size}/apps/${pname}-''${app}.png + done + + mkdir -p $out/share/icons/hicolor/''${size}x''${size}/mimetypes + + for mimetype in pmd prd tmd; do + ln -s $out/share/${pname}${edition}/icons/''${mimetype}_''${size}.png \ + $out/share/icons/hicolor/''${size}x''${size}/mimetypes/application-x-''${mimetype}.png + done + done + + # Add desktop items + ${desktopItems.planmaker.buildCommand} + ${desktopItems.presentations.buildCommand} + ${desktopItems.textmaker.buildCommand} + + # Add mime types + install -D -t $out/share/mime/packages ${pname}/mime/softmaker-*office*${shortEdition}.xml + + runHook postInstall + ''; + + meta = with stdenv.lib; { + description = "An office suite with a word processor, spreadsheet and presentation program"; + homepage = "https://www.softmaker.com/"; + license = licenses.unfree; + maintainers = with maintainers; [ danieldk ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/applications/office/softmaker/softmaker_office.nix b/pkgs/applications/office/softmaker/softmaker_office.nix new file mode 100644 index 000000000000..26fe420d6a3b --- /dev/null +++ b/pkgs/applications/office/softmaker/softmaker_office.nix @@ -0,0 +1,15 @@ +{ callPackage, fetchurl, ... } @ args: + +callPackage ./generic.nix (args // rec { + pname = "softmaker-office"; + version = "970"; + edition = "2018"; + suiteName = "SoftMaker Office"; + + src = fetchurl { + url = "https://www.softmaker.net/down/softmaker-office-${edition}-${version}-amd64.tgz"; + sha256 = "14f94p1jms41s2iz5sa770rcyfp4mv01r6jjjis9amx37zrc8yid"; + }; + + archive = "office${edition}.tar.lzma"; +}) -- cgit 1.4.1 From 11184dee46a4dfe99aeff8015f24b1ba571bd471 Mon Sep 17 00:00:00 2001 From: Daniël de Kok Date: Fri, 30 Aug 2019 17:41:27 +0200 Subject: freeoffice: init at 966 --- pkgs/applications/office/softmaker/freeoffice.nix | 15 +++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 17 insertions(+) create mode 100644 pkgs/applications/office/softmaker/freeoffice.nix (limited to 'pkgs/applications/office') diff --git a/pkgs/applications/office/softmaker/freeoffice.nix b/pkgs/applications/office/softmaker/freeoffice.nix new file mode 100644 index 000000000000..d0e6c73e3531 --- /dev/null +++ b/pkgs/applications/office/softmaker/freeoffice.nix @@ -0,0 +1,15 @@ +{ callPackage, fetchurl, ... } @ args: + +callPackage ./generic.nix (args // rec { + pname = "freeoffice"; + version = "966"; + edition = "2018"; + suiteName = "FreeOffice"; + + src = fetchurl { + url = "https://www.softmaker.net/down/softmaker-freeoffice-${version}-amd64.tgz"; + sha256 = "18s92d2pmhmd56sb9c1zirwxzfgpqd8wh11bl0zi6g6skn68zhx4"; + }; + + archive = "freeoffice${edition}.tar.lzma"; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c8fa38358f07..3e6f7b30928e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18423,6 +18423,8 @@ in freenet = callPackage ../applications/networking/p2p/freenet { }; + freeoffice = callPackage ../applications/office/softmaker/freeoffice.nix {}; + freepv = callPackage ../applications/graphics/freepv { }; xfontsel = callPackage ../applications/misc/xfontsel { }; -- cgit 1.4.1 From accc62a98c8b1728af748057c8ac97b02edef8b9 Mon Sep 17 00:00:00 2001 From: Daniël de Kok Date: Fri, 6 Sep 2019 16:33:02 +0200 Subject: freeoffice: 966 -> 970 Changes: - Adds support for saving documents to the DOC, XLS, and PPT formats. - TextMaker adds support for saving to the OpenDocument format. - Adds a dark mode. --- pkgs/applications/office/softmaker/freeoffice.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/applications/office') diff --git a/pkgs/applications/office/softmaker/freeoffice.nix b/pkgs/applications/office/softmaker/freeoffice.nix index d0e6c73e3531..f3e37943bb66 100644 --- a/pkgs/applications/office/softmaker/freeoffice.nix +++ b/pkgs/applications/office/softmaker/freeoffice.nix @@ -2,13 +2,13 @@ callPackage ./generic.nix (args // rec { pname = "freeoffice"; - version = "966"; + version = "970"; edition = "2018"; suiteName = "FreeOffice"; src = fetchurl { url = "https://www.softmaker.net/down/softmaker-freeoffice-${version}-amd64.tgz"; - sha256 = "18s92d2pmhmd56sb9c1zirwxzfgpqd8wh11bl0zi6g6skn68zhx4"; + sha256 = "1maibr4x8mksb32ixvyy2rjn4x9f51191p5fcdj5qwz32pf8h2dr"; }; archive = "freeoffice${edition}.tar.lzma"; -- cgit 1.4.1 From 02cab2d031f918fc2ddb475128e6ce64df1d213c Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 12 Sep 2019 14:27:13 -0400 Subject: scribusUnstable: fix build We use harfbuzzFull because that includes the icu build which this depends on. Fixes #68548 --- pkgs/applications/office/scribus/unstable.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/applications/office') diff --git a/pkgs/applications/office/scribus/unstable.nix b/pkgs/applications/office/scribus/unstable.nix index 2cd441794a46..eef57179b3ea 100644 --- a/pkgs/applications/office/scribus/unstable.nix +++ b/pkgs/applications/office/scribus/unstable.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, mkDerivation, pkgconfig, cmake, qtbase, cairo, pixman, boost, cups, fontconfig, freetype, hunspell, libjpeg, libtiff, libxml2, lcms2, -podofo, poppler, poppler_data, python2, harfbuzz, qtimageformats, qttools }: +podofo, poppler, poppler_data, python2, harfbuzz, qtimageformats, qttools, harfbuzzFull }: let pythonEnv = python2.withPackages(ps: [ps.tkinter ps.pillow]); @@ -20,7 +20,7 @@ mkDerivation rec { buildInputs = [ qtbase cairo pixman boost cups fontconfig freetype hunspell libjpeg libtiff libxml2 lcms2 podofo poppler - poppler_data pythonEnv harfbuzz qtimageformats qttools + poppler_data pythonEnv harfbuzz qtimageformats qttools harfbuzzFull ]; meta = { -- cgit 1.4.1 From 15cafa9e1090bdbc31159fa5d30555005ac8182d Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 9 Sep 2019 16:59:21 -0500 Subject: todoman: 3.5.0 -> 3.6.0 https://github.com/pimutils/todoman/releases/tag/v3.6.0 --- pkgs/applications/office/todoman/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkgs/applications/office') diff --git a/pkgs/applications/office/todoman/default.nix b/pkgs/applications/office/todoman/default.nix index 450ee34262b9..7c5c8f724401 100644 --- a/pkgs/applications/office/todoman/default.nix +++ b/pkgs/applications/office/todoman/default.nix @@ -5,11 +5,11 @@ let in buildPythonApplication rec { pname = "todoman"; - version = "3.5.0"; + version = "3.6.0"; src = fetchPypi { inherit pname version; - sha256 = "051qjdpwif06x7qspnb4pfwdhb8nnmz99yqcp4kla5hv0n3jh0w9"; + sha256 = "1c0jh9bi2xfjc7w4kka68mygl00zkp2qxhffnipmfvvykfjmlhk0"; }; LOCALE_ARCHIVE = stdenv.lib.optionalString stdenv.isLinux @@ -19,7 +19,7 @@ buildPythonApplication rec { buildInputs = [ glibcLocales ]; propagatedBuildInputs = with python3.pkgs; - [ atomicwrites click click-log configobj humanize icalendar parsedatetime + [ atomicwrites click click-log click-repl configobj humanize icalendar parsedatetime python-dateutil pyxdg tabulate urwid ]; checkInputs = with python3.pkgs; -- cgit 1.4.1 From cbab4663f33f59b1fe347beb66f12d0f73746301 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Sat, 14 Sep 2019 14:01:38 +0200 Subject: paperless: Use pytest_4 in django-crispy-forms Doesn't build with pytest_5 --- .../python-modules/django-crispy-forms.nix | 4 +- pkgs/development/python-modules/pytest/2.nix | 48 ---------------------- pkgs/development/python-modules/pytest/4.nix | 48 ++++++++++++++++++++++ 3 files changed, 50 insertions(+), 50 deletions(-) delete mode 100644 pkgs/development/python-modules/pytest/2.nix create mode 100644 pkgs/development/python-modules/pytest/4.nix (limited to 'pkgs/applications/office') diff --git a/pkgs/applications/office/paperless/python-modules/django-crispy-forms.nix b/pkgs/applications/office/paperless/python-modules/django-crispy-forms.nix index c1e0f7da30f6..465da3862471 100644 --- a/pkgs/applications/office/paperless/python-modules/django-crispy-forms.nix +++ b/pkgs/applications/office/paperless/python-modules/django-crispy-forms.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, fetchFromGitHub -, pytest, pytest-django, django }: +, pytest_4, pytest-django, django }: buildPythonPackage { pname = "django-crispy-forms"; @@ -19,7 +19,7 @@ buildPythonPackage { export sourceRoot=source- ''; - checkInputs = [ pytest pytest-django django ]; + checkInputs = [ pytest_4 pytest-django django ]; checkPhase = '' PYTHONPATH="$(pwd):$PYTHONPATH" \ diff --git a/pkgs/development/python-modules/pytest/2.nix b/pkgs/development/python-modules/pytest/2.nix deleted file mode 100644 index 7a43a2e2517b..000000000000 --- a/pkgs/development/python-modules/pytest/2.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ stdenv, buildPythonPackage, pythonOlder, fetchPypi, attrs, hypothesis, py -, setuptools_scm, setuptools, six, pluggy, funcsigs, isPy3k, more-itertools -, atomicwrites, mock, writeText, pathlib2, wcwidth, packaging, isPyPy -}: -buildPythonPackage rec { - version = "4.6.5"; - pname = "pytest"; - - preCheck = '' - # don't test bash builtins - rm testing/test_argcomplete.py - ''; - - src = fetchPypi { - inherit pname version; - sha256 = "8fc39199bdda3d9d025d3b1f4eb99a192c20828030ea7c9a0d2840721de7d347"; - }; - - checkInputs = [ hypothesis mock ]; - buildInputs = [ setuptools_scm ]; - propagatedBuildInputs = [ attrs py setuptools six pluggy more-itertools atomicwrites wcwidth packaging ] - ++ stdenv.lib.optionals (!isPy3k) [ funcsigs ] - ++ stdenv.lib.optionals (pythonOlder "3.6") [ pathlib2 ]; - - doCheck = !isPyPy; # https://github.com/pytest-dev/pytest/issues/3460 - checkPhase = '' - runHook preCheck - $out/bin/py.test -x testing/ -k "not test_collect_pyargs_with_testpaths" - runHook postCheck - ''; - - # Remove .pytest_cache when using py.test in a Nix build - setupHook = writeText "pytest-hook" '' - pytestcachePhase() { - find $out -name .pytest_cache -type d -exec rm -rf {} + - } - - preDistPhases+=" pytestcachePhase" - ''; - - meta = with stdenv.lib; { - homepage = https://docs.pytest.org; - description = "Framework for writing tests"; - maintainers = with maintainers; [ domenkozar lovek323 madjar lsix ]; - license = licenses.mit; - platforms = platforms.unix; - }; -} diff --git a/pkgs/development/python-modules/pytest/4.nix b/pkgs/development/python-modules/pytest/4.nix new file mode 100644 index 000000000000..7a43a2e2517b --- /dev/null +++ b/pkgs/development/python-modules/pytest/4.nix @@ -0,0 +1,48 @@ +{ stdenv, buildPythonPackage, pythonOlder, fetchPypi, attrs, hypothesis, py +, setuptools_scm, setuptools, six, pluggy, funcsigs, isPy3k, more-itertools +, atomicwrites, mock, writeText, pathlib2, wcwidth, packaging, isPyPy +}: +buildPythonPackage rec { + version = "4.6.5"; + pname = "pytest"; + + preCheck = '' + # don't test bash builtins + rm testing/test_argcomplete.py + ''; + + src = fetchPypi { + inherit pname version; + sha256 = "8fc39199bdda3d9d025d3b1f4eb99a192c20828030ea7c9a0d2840721de7d347"; + }; + + checkInputs = [ hypothesis mock ]; + buildInputs = [ setuptools_scm ]; + propagatedBuildInputs = [ attrs py setuptools six pluggy more-itertools atomicwrites wcwidth packaging ] + ++ stdenv.lib.optionals (!isPy3k) [ funcsigs ] + ++ stdenv.lib.optionals (pythonOlder "3.6") [ pathlib2 ]; + + doCheck = !isPyPy; # https://github.com/pytest-dev/pytest/issues/3460 + checkPhase = '' + runHook preCheck + $out/bin/py.test -x testing/ -k "not test_collect_pyargs_with_testpaths" + runHook postCheck + ''; + + # Remove .pytest_cache when using py.test in a Nix build + setupHook = writeText "pytest-hook" '' + pytestcachePhase() { + find $out -name .pytest_cache -type d -exec rm -rf {} + + } + + preDistPhases+=" pytestcachePhase" + ''; + + meta = with stdenv.lib; { + homepage = https://docs.pytest.org; + description = "Framework for writing tests"; + maintainers = with maintainers; [ domenkozar lovek323 madjar lsix ]; + license = licenses.mit; + platforms = platforms.unix; + }; +} -- cgit 1.4.1 From 0d5806fefd312d904c9f8b49c728a3072678a87e Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 14 Sep 2019 14:59:00 +0200 Subject: paperless: fix cors header `django-cors-headers` 3.x (which is used in nixpkgs) requires a scheme for allowed hosts. Upstream uses 2.4, however we create the python env with Nix, so the source needs to be patched accordingly. --- pkgs/applications/office/paperless/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pkgs/applications/office') diff --git a/pkgs/applications/office/paperless/default.nix b/pkgs/applications/office/paperless/default.nix index af2fd82ddb03..97088f360417 100644 --- a/pkgs/applications/office/paperless/default.nix +++ b/pkgs/applications/office/paperless/default.nix @@ -57,6 +57,12 @@ let cp -r --no-preserve=mode $src/src/* $src/LICENSE $srcDir ''; + postPatch = '' + # django-cors-headers 3.x requires a scheme for allowed hosts + substituteInPlace $out/share/paperless/paperless/settings.py \ + --replace "localhost:8080" "http://localhost:8080" + ''; + buildPhase = let # Paperless has explicit runtime checks that expect these binaries to be in PATH extraBin = lib.makeBinPath [ imagemagick7 ghostscript optipng tesseract unpaper ]; -- cgit 1.4.1