dkim-report/flake.nix

44 lines
1.1 KiB
Nix
Raw Normal View History

2024-02-19 19:34:22 +01:00
{
description = "A simple flake to generate DKIM reports.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs =
2024-03-14 20:25:07 +01:00
{ self, nixpkgs }:
let
systems = [
"aarch64-darwin"
"aarch64-linux"
"x86_64-darwin"
"x86_64-linux"
];
forEachSystem = nixpkgs.lib.genAttrs systems;
in
2024-03-10 15:00:06 +01:00
{
2024-03-14 20:25:07 +01:00
packages = forEachSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
in
{
dkim-report = pkgs.writeShellApplication {
name = "reports";
runtimeInputs = [
pkgs.dmarc-report-converter
pkgs.python3
];
text = (builtins.readFile ./reports.sh);
};
default = self.packages.${system}.dkim-report;
}
);
apps = forEachSystem (system: {
dkim-report = {
2024-02-19 19:34:22 +01:00
type = "app";
program = "${self.packages.${system}.dkim-report}/bin/reports";
};
2024-03-14 20:25:07 +01:00
default = self.apps.${system}.dkim-report;
});
};
2024-02-19 19:34:22 +01:00
}