libreoffice: separates darwin into its own file `darwin.nix`

main
Thibault Gagnaux 2 years ago
parent a2adccbadf
commit f7e43bf1fc
No known key found for this signature in database
GPG Key ID: 44BD0764ACAE8E25
  1. 51
      pkgs/applications/office/libreoffice/darwin.nix
  2. 957
      pkgs/applications/office/libreoffice/default.nix
  3. 8
      pkgs/top-level/all-packages.nix

@ -0,0 +1,51 @@
{ stdenv
, lib
, fetchurl
, undmg
}:
let
appName = "LibreOffice.app";
version = "7.2.5";
dist = {
aarch64-darwin = {
arch = "aarch64";
sha256 = "bdbcb9a98211f866ca089d440aebcd1d313aa99e8ab4104aae4e65ea3cee74ca";
};
x86_64-darwin = {
arch = "x86_64";
sha256 = "0b7ef18ed08341ac6c15339fe9a161ad17f6b469009d987cfc7d50c628d12a4e";
};
}."${stdenv.hostPlatform.system}";
in
stdenv.mkDerivation {
inherit version;
pname = "libreoffice";
src = fetchurl {
url = "https://download.documentfoundation.org/libreoffice/stable/${version}/mac/${dist.arch}/LibreOffice_${version}_MacOS_${dist.arch}.dmg";
inherit (dist) sha256;
};
nativeBuildInputs = [ undmg ];
sourceRoot = "${appName}";
dontPatch = true;
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstallPhase
mkdir -p $out/{Applications/${appName},bin}
cp -R . $out/Applications/${appName}
ln -s $out/Applications/${appName}/Contents/MacOS/soffice $out/bin
runHook postInstallPhase
'';
meta = with lib; {
description = "Comprehensive, professional-quality productivity suite, a variant of openoffice.org";
homepage = "https://libreoffice.org/";
license = licenses.lgpl3;
maintainers = with maintainers; [ tricktron ];
platforms = [ "aarch64-darwin" "x86_64-darwin" ];
};
}

File diff suppressed because it is too large Load Diff

@ -26901,12 +26901,10 @@ with pkgs;
boost = boost175;
};
libreoffice = if stdenv.hostPlatform.isDarwin
then callPackage ../applications/office/libreoffice libreoffice-args
libreoffice = if stdenv.isDarwin
then callPackage ../applications/office/libreoffice/darwin.nix {}
else hiPrio libreoffice-still;
libreoffice-unwrapped = if stdenv.hostPlatform.isDarwin
then libreoffice
else libreoffice.libreoffice;
libreoffice-unwrapped = (hiPrio libreoffice-still).libreoffice;
libreoffice-args = {
inherit (perlPackages) ArchiveZip IOCompress;

Loading…
Cancel
Save