Rebuild cyrus-sasl with XOAUTH2 support

This commit is contained in:
coolneng 2021-11-14 17:08:33 +01:00
parent ca0e576484
commit dea7abd19a
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
4 changed files with 46 additions and 0 deletions

View File

@ -113,6 +113,7 @@
./modules/cachix.nix
./overlays/emacs.nix
./overlays/nix-direnv.nix
./overlays/cyrus-sasl.nix
];
}

View File

@ -20,6 +20,22 @@
"type": "github"
}
},
"cyrus-sasl-xoauth2": {
"flake": false,
"locked": {
"lastModified": 1611713742,
"narHash": "sha256-IaH8tNUhM0lUOmFiG4G9cGzsuM9mTWfQrzoQ78MIgZ0=",
"owner": "robn",
"repo": "sasl2-oauth",
"rev": "4236b6fb904d836b85b55ba32128b843fd8c2362",
"type": "github"
},
"original": {
"owner": "robn",
"repo": "sasl2-oauth",
"type": "github"
}
},
"emacs-overlay": {
"locked": {
"lastModified": 1635758635,
@ -53,6 +69,7 @@
"root": {
"inputs": {
"agenix": "agenix",
"cyrus-sasl-xoauth2": "cyrus-sasl-xoauth2",
"emacs-overlay": "emacs-overlay",
"nixpkgs": "nixpkgs"
}

View File

@ -6,6 +6,10 @@
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
emacs-overlay.url = "github:nix-community/emacs-overlay";
cyrus-sasl-xoauth2 = {
url = "github:robn/sasl2-oauth";
flake = false;
};
};
outputs = { self, nixpkgs, agenix, ... }@inputs:

24
overlays/cyrus-sasl.nix Normal file
View File

@ -0,0 +1,24 @@
{ 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: {
cyrus_sasl = prev.cyrus_sasl.overrideAttrs (div: rec {
postInstall = ''
for lib in ${cyrus-sasl-xoauth2}/lib/sasl2/*; do
ln -sf $lib $out/lib/sasl2/
done
'';
});
})
];
}