diff options
author | Karel Kočí <cynerd@email.cz> | 2022-10-28 09:53:50 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2022-10-28 09:53:50 +0200 |
commit | a5b7a8482adb4d8bd829a9a6e50819c2784185b0 (patch) | |
tree | 629903ab007819cb518fcb24d8e4fa8d700c6ebf | |
parent | 73c30ecbeee78a78d46567edb8875283977637ac (diff) | |
download | nixos-personal-a5b7a8482adb4d8bd829a9a6e50819c2784185b0.tar.gz nixos-personal-a5b7a8482adb4d8bd829a9a6e50819c2784185b0.tar.bz2 nixos-personal-a5b7a8482adb4d8bd829a9a6e50819c2784185b0.zip |
pkgs: add cyrus-sasl-xoauth2
-rw-r--r-- | pkgs/cyrus-sasl-xoauth2/default.nix | 31 | ||||
-rw-r--r-- | pkgs/default.nix | 12 |
2 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/cyrus-sasl-xoauth2/default.nix b/pkgs/cyrus-sasl-xoauth2/default.nix new file mode 100644 index 0000000..2bd8713 --- /dev/null +++ b/pkgs/cyrus-sasl-xoauth2/default.nix @@ -0,0 +1,31 @@ +{ 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 7c1350b..2486095 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -31,6 +31,18 @@ let ]; }; + # cyrus_sasl with curus_sasl_xoauth2 + cyrus_sasl_xoauth2 = callPackage ./cyrus-sasl-xoauth2 { + cyrus_sasl = nixpkgs.cyrus_sasl; # prevent infinite cycle + }; + cyrus_sasl = nixpkgs.cyrus_sasl.overrideAttrs (div: rec { + postInstall = '' + for lib in ${cyrus_sasl_xoauth2}/usr/lib/sasl2/*; do + ln -sf $lib $out/lib/sasl2/ + done + ''; + }); + }; in personalpkgs |