softmaker-office: init at 970
This commit is contained in:
parent
57b66eb3f2
commit
97390d648d
4 changed files with 154 additions and 0 deletions
42
pkgs/applications/office/softmaker/desktop_items.nix
Normal file
42
pkgs/applications/office/softmaker/desktop_items.nix
Normal file
|
@ -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
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
95
pkgs/applications/office/softmaker/generic.nix
Normal file
95
pkgs/applications/office/softmaker/generic.nix
Normal file
|
@ -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" ];
|
||||||
|
};
|
||||||
|
}
|
15
pkgs/applications/office/softmaker/softmaker_office.nix
Normal file
15
pkgs/applications/office/softmaker/softmaker_office.nix
Normal file
|
@ -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";
|
||||||
|
})
|
|
@ -19686,6 +19686,8 @@ in
|
||||||
|
|
||||||
smtube = libsForQt5.callPackage ../applications/video/smtube {};
|
smtube = libsForQt5.callPackage ../applications/video/smtube {};
|
||||||
|
|
||||||
|
softmaker-office = callPackage ../applications/office/softmaker/softmaker_office.nix {};
|
||||||
|
|
||||||
stride = callPackage ../applications/networking/instant-messengers/stride { };
|
stride = callPackage ../applications/networking/instant-messengers/stride { };
|
||||||
|
|
||||||
sudolikeaboss = callPackage ../tools/security/sudolikeaboss { };
|
sudolikeaboss = callPackage ../tools/security/sudolikeaboss { };
|
||||||
|
|
Loading…
Reference in a new issue