diff --git a/pkgs/by-name/an/anytype/package.nix b/pkgs/by-name/an/anytype/package.nix index 5a6135a4f3f9..58195f1454b9 100644 --- a/pkgs/by-name/an/anytype/package.nix +++ b/pkgs/by-name/an/anytype/package.nix @@ -1,15 +1,23 @@ -{ lib, fetchurl, appimageTools, makeWrapper, commandLineArgs ? "" }: +{ + lib, + fetchurl, + appimageTools, + makeWrapper, + nix-update-script, + commandLineArgs ? "", +}: let pname = "anytype"; - version = "0.43.8"; + version = "0.44.0"; name = "Anytype-${version}"; src = fetchurl { url = "https://github.com/anyproto/anytype-ts/releases/download/v${version}/${name}.AppImage"; - hash = "sha256-inqJvx5K/k97X50E0FYlzJDKqrVjAU6ZKIVdCWHr8NI="; + hash = "sha256-+Ae0xH6ipNZgIVrrAmgeG8bibm/I3NLiDMzS+fwf9RQ="; }; appimageContents = appimageTools.extractType2 { inherit pname version src; }; -in appimageTools.wrapType2 { +in +appimageTools.wrapType2 { inherit pname version src; nativeBuildInputs = [ makeWrapper ]; @@ -29,6 +37,17 @@ in appimageTools.wrapType2 { done ''; + passthru.updateScript = nix-update-script { + # Prevent updating to versions with '-' in them. + # Necessary since Anytype uses Electron-based 'MAJOR.MINOR.PATCH(-{alpha,beta})?' versioning scheme where each + # {alpha,beta} version increases the PATCH version, releasing a new full release version in GitHub instead of a + # pre-release version. + extraArgs = [ + "--version-regex" + "[^-]*" + ]; + }; + meta = with lib; { description = "P2P note-taking tool"; homepage = "https://anytype.io/";