{ stdenv, fetchurl, undmg, ... }: stdenv.mkDerivation rec { pname = "LibreOffice"; version = "7.3.3"; buildInputs = [ undmg ]; sourceRoot = "."; phases = [ "unpackPhase" "installPhase" ]; installPhase = '' mkdir -p "$out/Applications" cp -r LibreOffice.app "$out/Applications/LibreOffice.app" ''; src = fetchurl { name = "LibreOffice-${version}.dmg"; url = "https://download.documentfoundation.org/libreoffice/stable/${version}/mac/aarch64/LibreOffice_${version}_MacOS_aarch64.dmg"; sha256 = "0qy85qzy90a3syvg2yfsd5n4h5fabf3bnzk8w8b7b64wipmkvvah"; }; # meta = with stdenv.lib; { # description = "LibreOffice is a free and powerful office suite"; # homepage = "https://libreoffice.org/"; # platforms = platforms.darwin; # }; }