push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,100 @@
{
makeDesktopItem,
pname,
suiteName,
}:
{
planmaker = makeDesktopItem {
name = "${pname}-planmaker";
desktopName = "${suiteName} PlanMaker";
icon = "${pname}-pml";
categories = [ "Office" ];
exec = "${pname}-planmaker %F";
tryExec = "${pname}-planmaker";
mimeTypes = [
"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.ms-excel.template.macroEnabled.12"
"application/x-dif"
"text/spreadsheet"
"text/csv"
"application/x-prn"
"application/vnd.ms-excel.sheet.binary.macroenabled.12"
];
startupWMClass = "pm";
};
presentations = makeDesktopItem {
name = "${pname}-presentations";
desktopName = "${suiteName} Presentations";
icon = "${pname}-prl";
categories = [ "Office" ];
exec = "${pname}-presentations %F";
tryExec = "${pname}-presentations";
mimeTypes = [
"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"
];
startupWMClass = "pr";
};
textmaker = makeDesktopItem {
name = "${pname}-textmaker";
desktopName = "${suiteName} TextMaker";
icon = "${pname}-tml";
categories = [ "Office" ];
exec = "${pname}-textmaker %F";
tryExec = "${pname}-textmaker";
mimeTypes = [
"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"
];
startupWMClass = "tm";
};
}

View File

@@ -0,0 +1,32 @@
{
callPackage,
fetchurl,
# This is a bit unusual, but makes version and hash easily
# overridable. This is useful when the upstream archive was replaced
# and nixpkgs is not in sync yet.
officeVersion ? {
version = "1220";
edition = "2024";
hash = "sha256-F1Srm3/4UPifYls21MhjbpxSyLaT0gEVzEMQF0gIzi0=";
},
...
}@args:
callPackage ./generic.nix (
args
// rec {
inherit (officeVersion) version edition;
pname = "freeoffice";
suiteName = "FreeOffice";
src = fetchurl {
inherit (officeVersion) hash;
url = "https://www.softmaker.net/down/softmaker-freeoffice-${edition}-${version}-amd64.tgz";
};
archive = "freeoffice${edition}.tar.lzma";
}
)

View File

@@ -0,0 +1,165 @@
{
lib,
stdenv,
autoPatchelfHook,
makeDesktopItem,
makeWrapper,
copyDesktopItems,
# Dynamic Libraries
curl,
glib,
gst_all_1,
libGL,
libX11,
libXext,
libXmu,
libXrandr,
libXrender,
# For fixing up execution of /bin/ls, which is necessary for
# product unlocking.
coreutils,
libredirect,
# Extra utilities used by the SoftMaker applications.
gnugrep,
util-linux,
which,
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 {
inherit pname src;
version = if edition != "" then "${edition}.${version}" else version;
nativeBuildInputs = [
autoPatchelfHook
copyDesktopItems
makeWrapper
];
buildInputs = [
curl
glib
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
libGL
libX11
libXext
libXmu
libXrandr
libXrender
(lib.getLib stdenv.cc.cc)
];
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 =
let
# SoftMaker/FreeOffice collects some system information upon
# unlocking the product. But in doing so, it attempts to execute
# /bin/ls. If the execve syscall fails, the whole unlock
# procedure fails. This works around that by rewriting /bin/ls
# to the proper path.
#
# In addition, it expects some common utilities (which, whereis)
# to be in the path.
#
# SoftMaker Office restarts itself upon some operations, such
# changing the theme and unlocking. Unfortunately, we do not
# have control over its environment then and it will fail
# with an error.
extraWrapperArgs = ''
--set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
--set NIX_REDIRECTS "/bin/ls=${coreutils}/bin/ls" \
--prefix PATH : "${
lib.makeBinPath [
coreutils
gnugrep
util-linux
which
]
}"
'';
in
''
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 \
${extraWrapperArgs}
makeWrapper $out/share/${pname}${edition}/presentations $out/bin/${pname}-presentations \
${extraWrapperArgs}
makeWrapper $out/share/${pname}${edition}/textmaker $out/bin/${pname}-textmaker \
${extraWrapperArgs}
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
# freeoffice 973 misses the 96x96 application icons, giving broken symbolic links
# remove broken symbolic links
find $out -xtype l -ls -exec rm {} \;
# Add mime types
install -D -t $out/share/mime/packages ${pname}/mime/softmaker-*office*${shortEdition}.xml
runHook postInstall
'';
desktopItems = builtins.attrValues desktopItems;
meta = {
description = "Office suite with a word processor, spreadsheet and presentation program";
homepage = "https://www.softmaker.com/";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ liberodark ];
platforms = [ "x86_64-linux" ];
};
}

View File

@@ -0,0 +1,32 @@
{
callPackage,
fetchurl,
# This is a bit unusual, but makes version and hash easily
# overridable. This is useful when the upstream archive was replaced
# and nixpkgs is not in sync yet.
officeVersion ? {
version = "1228";
edition = "";
hash = "sha256-Va0QkLQtsPbDAo3ygfp6UKr0OkLLBS0yAup+xLoLD0s=";
},
...
}@args:
callPackage ./generic.nix (
args
// rec {
inherit (officeVersion) version edition;
pname = "softmaker-office-nx";
suiteName = "SoftMaker Office NX";
src = fetchurl {
inherit (officeVersion) hash;
url = "https://www.softmaker.net/down/softmaker-office-nx-${version}-amd64.tgz";
};
archive = "officenx.tar.lzma";
}
)

View File

@@ -0,0 +1,33 @@
{
callPackage,
fetchurl,
# This is a bit unusual, but makes version and hash easily
# overridable. This is useful when people have an older version of
# Softmaker Office or when the upstream archive was replaced and
# nixpkgs is not in sync yet.
officeVersion ? {
version = "1228";
edition = "2024";
hash = "sha256-3/pdn3LLYy5U6GZp5jABH2oMpP/kDU9oAO9KvMwo9V8=";
},
...
}@args:
callPackage ./generic.nix (
args
// rec {
inherit (officeVersion) version edition;
pname = "softmaker-office";
suiteName = "SoftMaker Office";
src = fetchurl {
inherit (officeVersion) hash;
url = "https://www.softmaker.net/down/softmaker-office-${edition}-${version}-amd64.tgz";
};
archive = "office${edition}.tar.lzma";
}
)