morgen: init at 2.4.3

This commit is contained in:
P. R. d. O 2022-01-24 20:03:05 -06:00
parent 48406e3fca
commit ecb18cfa77
No known key found for this signature in database
GPG key ID: 7B0FF33FF90110C7
2 changed files with 63 additions and 0 deletions

View file

@ -0,0 +1,59 @@
{ lib, stdenv, fetchurl, dpkg, autoPatchelfHook, makeWrapper, electron
, nodePackages, alsa-lib, gtk3, libxshmfence, mesa, nss }:
stdenv.mkDerivation rec {
pname = "morgen";
version = "2.4.3";
src = fetchurl {
url = "https://download.todesktop.com/210203cqcj00tw1/morgen-${version}.deb";
sha256 = "sha256-IWGeb0+IiFNYJ+jQAzGYfQ5FnrbR6HIpynS9jgd5/mY=";
};
nativeBuildInputs = [
dpkg
autoPatchelfHook
makeWrapper
nodePackages.asar
];
buildInputs = [ alsa-lib gtk3 libxshmfence mesa nss ];
dontBuild = true;
dontConfigure = true;
unpackCmd = ''
dpkg-deb -x ${src} ./morgen-${pname}
'';
installPhase = ''
runHook preInstall
mv usr $out
mv opt $out
asar extract $out/opt/Morgen/resources/app.asar "$TMP/work"
# 1. Fixes path for todesktop-runtime-config.json
# 2. Fixes startup script
substituteInPlace $TMP/work/dist/main.js \
--replace "process.resourcesPath,\"todesktop-runtime-config.json" "\"$out/opt/Morgen/resources/todesktop-runtime-config.json" \
--replace "Exec=\"+process.execPath+\"" "Exec=$out/bin/morgen"
asar pack --unpack='{*.node,*.ftz,rect-overlay}' "$TMP/work" $out/opt/Morgen/resources/app.asar
substituteInPlace $out/share/applications/morgen.desktop \
--replace '/opt/Morgen' $out/bin
makeWrapper ${electron}/bin/electron $out/bin/morgen \
--add-flags $out/opt/Morgen/resources/app.asar
runHook postInstall
'';
meta = with lib; {
description = "All-in-one Calendars, Tasks and Scheduler";
homepage = "https://morgen.so/download";
license = licenses.unfree;
maintainers = with maintainers; [ wolfangaukang ];
platforms = [ "x86_64-linux" ];
};
}

View file

@ -7696,6 +7696,10 @@ with pkgs;
mole = callPackage ../tools/networking/mole { };
morgen = callPackage ../applications/office/morgen {
electron = electron_15;
};
mosh = callPackage ../tools/networking/mosh { };
mpage = callPackage ../tools/text/mpage { };