From 852831a9cd6780efd34676cc70f374bc934bdfc8 Mon Sep 17 00:00:00 2001 From: justanotherariel Date: Wed, 20 Dec 2023 02:21:30 +0100 Subject: [PATCH 1/3] maintainers: add justanotherariel --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 0e99aecd954d..4282ba50b6a7 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -9214,6 +9214,12 @@ githubId = 5124422; name = "Julien Urraca"; }; + justanotherariel = { + email = "ariel@ebersberger.io"; + github = "justanotherariel"; + githubId = 31776703; + name = "Ariel Ebersberger"; + }; justinas = { email = "justinas@justinas.org"; github = "justinas"; From c74ab161ff32b3922d5893553a7dc5867597379a Mon Sep 17 00:00:00 2001 From: justanotherariel Date: Wed, 20 Dec 2023 02:16:47 +0100 Subject: [PATCH 2/3] morgen: add updateScript and mainProgram --- pkgs/applications/office/morgen/default.nix | 9 ++++--- pkgs/applications/office/morgen/update.sh | 26 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 33 insertions(+), 4 deletions(-) create mode 100755 pkgs/applications/office/morgen/update.sh diff --git a/pkgs/applications/office/morgen/default.nix b/pkgs/applications/office/morgen/default.nix index f2bcd3b6a975..7bb816a3f48e 100644 --- a/pkgs/applications/office/morgen/default.nix +++ b/pkgs/applications/office/morgen/default.nix @@ -6,8 +6,8 @@ stdenv.mkDerivation rec { version = "3.0.1"; src = fetchurl { - url = "https://download.todesktop.com/210203cqcj00tw1/morgen-${version}.deb"; - sha256 = "sha256-lj+V5mntZzED2ZS62Uwlt/vTXwSuwzXeuEw8y/bA6og="; + url = "https://dl.todesktop.com/210203cqcj00tw1/versions/${version}/linux/deb"; + hash = "sha256-lj+V5mntZzED2ZS62Uwlt/vTXwSuwzXeuEw8y/bA6og="; }; nativeBuildInputs = [ @@ -46,12 +46,15 @@ stdenv.mkDerivation rec { runHook postInstall ''; + passthru.updateScript = ./update.sh; + meta = with lib; { description = "All-in-one Calendars, Tasks and Scheduler"; homepage = "https://morgen.so/download"; + mainProgram = "morgen"; sourceProvenance = with sourceTypes; [ binaryNativeCode ]; license = licenses.unfree; - maintainers = with maintainers; [ wolfangaukang ]; + maintainers = with maintainers; [ justanotherariel wolfangaukang ]; platforms = [ "x86_64-linux" ]; }; } diff --git a/pkgs/applications/office/morgen/update.sh b/pkgs/applications/office/morgen/update.sh new file mode 100755 index 000000000000..e12f86a04bbc --- /dev/null +++ b/pkgs/applications/office/morgen/update.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p curl jq common-updater-scripts + +set -euo pipefail + +# URL to check for the latest version +latestUrl="https://dl.todesktop.com/210203cqcj00tw1/linux/deb/x64" + +# Fetch the latest version information +latestInfo=$(curl -sI -X GET $latestUrl | grep -oP 'morgen-\K\d+(\.\d+)*(?=[^\d])') + +if [[ -z "$latestInfo" ]]; then + echo "Could not find the latest version number." + exit 1 +fi + +# Extract the version number +latestVersion=$(echo "$latestInfo" | head -n 1) + +echo "Latest version of Morgen is $latestVersion" + +# Update the package definition +update-source-version morgen "$latestVersion" + +# Fetch and update the hash +nix-prefetch-url --unpack "https://dl.todesktop.com/210203cqcj00tw1/versions/${latestVersion}/linux/deb" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8dd214b13296..4a0684d91943 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10985,7 +10985,7 @@ with pkgs; mole = callPackage ../tools/networking/mole { }; morgen = callPackage ../applications/office/morgen { - electron = electron_25; # blank screen with electron_26 + electron = electron_28; }; mosh = callPackage ../tools/networking/mosh { }; From f6813efd67f213d9f64bfa3644f869dc82f4d257 Mon Sep 17 00:00:00 2001 From: justanotherariel Date: Wed, 20 Dec 2023 02:18:09 +0100 Subject: [PATCH 3/3] morgen: 3.0.1 -> 3.1.6 --- pkgs/applications/office/morgen/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/office/morgen/default.nix b/pkgs/applications/office/morgen/default.nix index 7bb816a3f48e..54cd07a4e0eb 100644 --- a/pkgs/applications/office/morgen/default.nix +++ b/pkgs/applications/office/morgen/default.nix @@ -3,11 +3,11 @@ stdenv.mkDerivation rec { pname = "morgen"; - version = "3.0.1"; + version = "3.1.6"; src = fetchurl { url = "https://dl.todesktop.com/210203cqcj00tw1/versions/${version}/linux/deb"; - hash = "sha256-lj+V5mntZzED2ZS62Uwlt/vTXwSuwzXeuEw8y/bA6og="; + hash = "sha256-/rMPNIpjkHdLE0lAdWCz71DbcqIW+1Y6RdFrYAfTSKU="; }; nativeBuildInputs = [