Build mbsync with with OAUTH2 support
This commit is contained in:
parent
6c706c5a1b
commit
9e89e81a08
|
@ -113,6 +113,7 @@ with pkgs;
|
|||
./overlays/emacs.nix
|
||||
./overlays/nix-direnv.nix
|
||||
./overlays/openconnect-sso.nix
|
||||
./overlays/cyrus-sasl-oauth2.nix
|
||||
];
|
||||
|
||||
}
|
||||
|
|
17
flake.lock
17
flake.lock
|
@ -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": 1642217228,
|
||||
|
@ -69,6 +85,7 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"agenix": "agenix",
|
||||
"cyrus-sasl-xoauth2": "cyrus-sasl-xoauth2",
|
||||
"emacs-overlay": "emacs-overlay",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"openconnect-sso": "openconnect-sso"
|
||||
|
|
|
@ -18,6 +18,10 @@
|
|||
url = "github:vlaci/openconnect-sso";
|
||||
flake = false;
|
||||
};
|
||||
cyrus-sasl-xoauth2 = {
|
||||
url = "github:robn/sasl2-oauth";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, agenix, ... }@inputs:
|
||||
|
|
|
@ -11,6 +11,8 @@ let
|
|||
sed -i -e "s|#!/usr/bin/env node|#! ${pkgs.nodejs}/bin/node|" node_modules/node-gyp-build/bin.js
|
||||
'';
|
||||
};
|
||||
isync-oauth2 = isync.overrideAttrs
|
||||
(div: rec { buildInputs = [ openssl patched-cyrus-sasl-oauth2 zlib ]; });
|
||||
|
||||
in {
|
||||
environment.systemPackages = [
|
||||
|
@ -67,7 +69,7 @@ in {
|
|||
citrix_workspace
|
||||
# Mail stack
|
||||
neomutt
|
||||
isync
|
||||
isync-oauth2
|
||||
notmuch
|
||||
msmtp
|
||||
w3m
|
||||
|
|
|
@ -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: {
|
||||
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
|
||||
'';
|
||||
});
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue