From 514a5da58757df9f9418538c69bda7d5f6b6d79c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 29 Mar 2023 18:18:55 +0200 Subject: Revert "Revert "pkgs: add cyrus-sasl-xoauth2"" This reverts commit bd45b922601eeb7b5d15f9e51ed7e855a690a281. --- pkgs/cyrus-sasl-xoauth2/default.nix | 38 +++++++++++++++++++++++++++++++++++++ pkgs/default.nix | 12 ++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 pkgs/cyrus-sasl-xoauth2/default.nix (limited to 'pkgs') diff --git a/pkgs/cyrus-sasl-xoauth2/default.nix b/pkgs/cyrus-sasl-xoauth2/default.nix new file mode 100644 index 0000000..a7ec5cb --- /dev/null +++ b/pkgs/cyrus-sasl-xoauth2/default.nix @@ -0,0 +1,38 @@ +{ + lib, + stdenv, + fetchFromGitHub, + autoconf, + automake, + libtool, + pkg-config, + cyrus_sasl, +}: +with lib; + stdenv.mkDerivation rec { + pname = "cyrus-sasl-xoauth2"; + version = "0.2"; + src = fetchFromGitHub { + owner = "moriyoshi"; + repo = "cyrus-sasl-xoauth2"; + rev = "v${version}"; + sha256 = "lI8uKtVxrziQ8q/Ss+QTgg1xTObZUTAzjL3MYmtwyd8="; + }; + + nativeBuildInputs = [ + autoconf + automake + libtool + pkg-config + ]; + buildInputs = [ + cyrus_sasl + ]; + + preConfigure = '' + ./autogen.sh + ''; + installPhase = '' + make DESTDIR=$out install + ''; + } diff --git a/pkgs/default.nix b/pkgs/default.nix index 253c07e..0481720 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -27,6 +27,18 @@ pkgs: let # Elektroline packages shvspy = callPackage ./shvspy {}; + # cyrus_sasl with curus_sasl_xoauth2 + cyrus_sasl_xoauth2 = callPackage ./cyrus-sasl-xoauth2 { + cyrus_sasl = pkgs.cyrus_sasl; # prevent infinite cycle + }; + cyrus_sasl = pkgs.cyrus_sasl.overrideAttrs (div: rec { + postInstall = '' + for lib in ${cyrus_sasl_xoauth2}/usr/lib/sasl2/*; do + ln -sf $lib $out/lib/sasl2/ + done + ''; + }); + # Nixpkgs fixes khal = pkgs.khal.overrideAttrs (oldAttrs: { disabledTests = -- cgit v1.2.3