panacea/overlays/cyrus-sasl-oauth2.nix

25 lines
589 B
Nix

{ 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
'';
});
})
];
}