Files
nixpkgs/pkgs/by-name/mo/morgen/package.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

77 lines
1.9 KiB
Nix

{
lib,
stdenv,
fetchurl,
dpkg,
autoPatchelfHook,
makeWrapper,
electron,
asar,
alsa-lib,
gtk3,
libxshmfence,
libgbm,
nss,
}:
stdenv.mkDerivation rec {
pname = "morgen";
version = "3.6.18";
src = fetchurl {
name = "morgen-${version}.deb";
url = "https://dl.todesktop.com/210203cqcj00tw1/versions/${version}/linux/deb";
hash = "sha256-OvV+GNKQBzUpHEOfaBV6SGRxA/gvRWFkP5D7CihY7pU=";
};
nativeBuildInputs = [
dpkg
autoPatchelfHook
makeWrapper
asar
];
buildInputs = [
alsa-lib
gtk3
libxshmfence
libgbm
nss
];
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=\".concat(process.execPath," "Exec=\".concat(\"$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 "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations,WebRTCPipeWireCapturer --enable-wayland-ime=true}} $out/opt/Morgen/resources/app.asar"
runHook postInstall
'';
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "All-in-one Calendars, Tasks and Scheduler";
homepage = "https://morgen.so/";
mainProgram = "morgen";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [ justanotherariel ];
platforms = [ "x86_64-linux" ];
};
}