mailmig: Stalwart -> SNM IMAP migration tool (initial)
This commit is contained in:
commit
be16176b6e
24 files changed
+7804
No files matched your search
@@ -0,0 +1,53 @@
|
||||
{
|
||||
description = "mailmig: migrate mail from Stalwart to Simple NixOS Mailserver over IMAP";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
|
||||
# Same branch the cnx-network-clan mx1 runs.
|
||||
nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-26.05";
|
||||
nixos-mailserver.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
nixos-mailserver,
|
||||
}:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
inherit (pkgs) lib;
|
||||
mailmig = pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "mailmig";
|
||||
version = (lib.importTOML ./Cargo.toml).package.version;
|
||||
src = lib.fileset.toSource {
|
||||
root = ./.;
|
||||
fileset = lib.fileset.unions [
|
||||
./Cargo.toml
|
||||
./Cargo.lock
|
||||
./src
|
||||
./mailmig.example.toml
|
||||
];
|
||||
};
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
meta.mainProgram = "mailmig";
|
||||
};
|
||||
in
|
||||
{
|
||||
packages.${system}.default = mailmig;
|
||||
|
||||
checks.${system} = {
|
||||
inherit mailmig;
|
||||
e2e = pkgs.testers.runNixOSTest (import ./tests/e2e.nix { inherit mailmig nixos-mailserver; });
|
||||
};
|
||||
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
inputsFrom = [ mailmig ];
|
||||
packages = [
|
||||
pkgs.rustfmt
|
||||
pkgs.clippy
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user