From 5cd3cb7b2b6dc2ec7390e92c536648374ec41a4d Mon Sep 17 00:00:00 2001 From: coolneng Date: Tue, 15 Aug 2023 03:45:56 +0200 Subject: [PATCH] Build isync with oauth2 support natively --- configuration.nix | 2 -- modules/periodic.nix | 4 +++- modules/software.nix | 2 +- overlays/cyrus-sasl-oauth2.nix | 24 ------------------------ overlays/isync-oauth2.nix | 14 -------------- 5 files changed, 4 insertions(+), 42 deletions(-) delete mode 100644 overlays/cyrus-sasl-oauth2.nix delete mode 100644 overlays/isync-oauth2.nix diff --git a/configuration.nix b/configuration.nix index 066512d..1d083e2 100644 --- a/configuration.nix +++ b/configuration.nix @@ -179,8 +179,6 @@ with pkgs; ./modules/monitoring.nix ./overlays/nix-direnv.nix ./overlays/openconnect-sso.nix - ./overlays/cyrus-sasl-oauth2.nix - ./overlays/isync-oauth2.nix ./overlays/emacs-vterm.nix ]; diff --git a/modules/periodic.nix b/modules/periodic.nix index 1949019..e59a578 100644 --- a/modules/periodic.nix +++ b/modules/periodic.nix @@ -2,7 +2,9 @@ with pkgs; -{ +let isync-oauth2 = (isync.override { withCyrusSaslXoauth2 = true; }); + +in { # Upgrade Doom Emacs daily systemd.user.services.doom-upgrade = { description = "Upgrade Doom Emacs"; diff --git a/modules/software.nix b/modules/software.nix index 19071ee..2fcecd8 100644 --- a/modules/software.nix +++ b/modules/software.nix @@ -73,7 +73,7 @@ in { pdfgrep # Mail stack mu - isync-oauth2 + (isync.override { withCyrusSaslXoauth2 = true; }) msmtp # Media gimp diff --git a/overlays/cyrus-sasl-oauth2.nix b/overlays/cyrus-sasl-oauth2.nix deleted file mode 100644 index dd3f385..0000000 --- a/overlays/cyrus-sasl-oauth2.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ config, lib, pkgs, inputs, ... }: - -let - cyrus-sasl-xoauth2 = with pkgs; - stdenv.mkDerivation { - name = "cyrus-sasl-xoauth2"; - src = inputs.cyrus-sasl-xoauth2; - nativeBuildInputs = - [ autoreconfHook inputs.nixpkgs.legacyPackages."${system}".cyrus_sasl ]; - }; - -in { - nixpkgs.overlays = [ - (final: prev: { - patched-cyrus-sasl-oauth2 = prev.cyrus_sasl.overrideAttrs (div: rec { - postInstall = '' - for lib in ${cyrus-sasl-xoauth2}/lib/sasl2/*; do - ln -sf $lib $out/lib/sasl2/ - done - ''; - }); - }) - ]; -} diff --git a/overlays/isync-oauth2.nix b/overlays/isync-oauth2.nix deleted file mode 100644 index eb3446a..0000000 --- a/overlays/isync-oauth2.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ config, lib, pkgs, ... }: - -with pkgs; - -{ - - nixpkgs.overlays = [ - (final: prev: { - isync-oauth2 = isync.overrideAttrs (div: rec { - buildInputs = [ openssl db patched-cyrus-sasl-oauth2 zlib ]; - }); - }) - ]; -}