From 787e3e6fdbae411e40cb4c6b852faf488eb0006e Mon Sep 17 00:00:00 2001 From: flakeuser Date: Tue, 1 Oct 2024 07:22:59 -0700 Subject: [PATCH] isync: add post-1.5.0 commits and build from git --- pkgs/tools/networking/isync/default.nix | 62 +++++++++++++++++++------ 1 file changed, 47 insertions(+), 15 deletions(-) diff --git a/pkgs/tools/networking/isync/default.nix b/pkgs/tools/networking/isync/default.nix index 280be724a8aa..14d57703a320 100644 --- a/pkgs/tools/networking/isync/default.nix +++ b/pkgs/tools/networking/isync/default.nix @@ -1,32 +1,64 @@ -{ lib, stdenv, fetchurl, pkg-config, perl -, openssl, db, cyrus_sasl, zlib -, Security -# Disabled by default as XOAUTH2 is an "OBSOLETE" SASL mechanism and this relies -# on a package that isn't really maintained anymore: -, withCyrusSaslXoauth2 ? false, cyrus-sasl-xoauth2, makeWrapper +{ + lib, + stdenv, + fetchgit, + pkg-config, + perl, + openssl, + db, + cyrus_sasl, + zlib, + perl538Packages, + autoreconfHook, + Security, + # Disabled by default as XOAUTH2 is an "OBSOLETE" SASL mechanism and this relies + # on a package that isn't really maintained anymore: + withCyrusSaslXoauth2 ? false, + cyrus-sasl-xoauth2, + makeWrapper, }: stdenv.mkDerivation (finalAttrs: { pname = "isync"; - version = "1.5.0"; + version = "1.5.0-unstable-2024-09-29"; - src = fetchurl { - url = "mirror://sourceforge/isync/isync-${finalAttrs.version}.tar.gz"; - hash = "sha256-oMgeEJOHvyedoWFFMQM5nneUav7PXFH5QTxedzVX940="; + src = fetchgit { + url = "https://git.code.sf.net/p/isync/isync"; + rev = "3c4b5f1c83a568f18c14c93aab95c9a853edfd15"; + hash = "sha256-MRjWr88sxd3C+YTMCqEymxmLj5h+uJKh9mcG+aEqf64="; }; # Fixes "Fatal: buffer too small" error # see https://sourceforge.net/p/isync/mailman/isync-devel/thread/87fsevvebj.fsf%40steelpick.2x.cz/ env.NIX_CFLAGS_COMPILE = "-DQPRINTF_BUFF=4000"; - nativeBuildInputs = [ pkg-config perl ] - ++ lib.optionals withCyrusSaslXoauth2 [ makeWrapper ]; - buildInputs = [ openssl db cyrus_sasl zlib ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; + autoreconfPhase = '' + echo "1.5.0-3c4b5" > VERSION + echo "See https://sourceforge.net/p/isync/isync/ci/3c4b5f1c83a568f18c14c93aab95c9a853edfd15/log/?path=" > ChangeLog + ./autogen.sh + ''; + + nativeBuildInputs = [ + autoreconfHook + pkg-config + perl + ] ++ lib.optionals withCyrusSaslXoauth2 [ makeWrapper ]; + buildInputs = [ + perl538Packages.TimeDate + openssl + db + cyrus_sasl + zlib + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ]; postInstall = lib.optionalString withCyrusSaslXoauth2 '' wrapProgram "$out/bin/mbsync" \ - --prefix SASL_PATH : "${lib.makeSearchPath "lib/sasl2" [ cyrus-sasl-xoauth2 cyrus_sasl.out ]}" + --prefix SASL_PATH : "${ + lib.makeSearchPath "lib/sasl2" [ + cyrus-sasl-xoauth2 + cyrus_sasl.out + ] + }" ''; meta = with lib; {