mirror of
https://seed.flo-the.dev/z3gWc1qgaeZaoGwL4WTstLNoqjayM.git
synced 2025-12-06 04:47:35 +01:00
62 lines
1.6 KiB
Nix
62 lines
1.6 KiB
Nix
{
|
|
description = "SMTP forwarding relay daemon with signing and encryption";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
|
};
|
|
|
|
outputs =
|
|
{ self
|
|
, nixpkgs
|
|
, flake-utils
|
|
, pre-commit-hooks
|
|
,
|
|
}:
|
|
let
|
|
supportedSystems = [
|
|
"x86_64-linux"
|
|
"aarch64-darwin"
|
|
];
|
|
in
|
|
{
|
|
overlays.default = import ./overlay.nix { inherit self; };
|
|
}
|
|
// flake-utils.lib.eachSystem supportedSystems (
|
|
system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
in
|
|
{
|
|
packages = {
|
|
smtprd-ng = pkgs.callPackage ./. { };
|
|
};
|
|
|
|
packages.default = self.packages.${system}.smtprd-ng;
|
|
|
|
checks = {
|
|
pre-commit-check = pre-commit-hooks.lib.${system}.run rec {
|
|
src = ./.;
|
|
hooks = {
|
|
nixpkgs-fmt.enable = true;
|
|
autoflake.enable = true;
|
|
black.enable = true;
|
|
isort.enable = true;
|
|
isort.settings.flags = "--profile black";
|
|
pylint.enable = false; # doesn't work correctly with module imports in flake
|
|
detect-private-keys.enable = true;
|
|
detect-private-keys.excludes = [ "tests/" ];
|
|
};
|
|
};
|
|
app = self.packages.${system}.smtprd-ng;
|
|
};
|
|
|
|
apps.default = {
|
|
type = "app";
|
|
program = "${self.packages.${system}.smtprd-ng}/bin/smtprd-ng";
|
|
};
|
|
}
|
|
);
|
|
}
|