Merge pull request #280940 from e1mo/fix-parsedmarc-smtp-to
This commit is contained in:
commit
4a2f53b67a
@ -301,7 +301,7 @@ in
|
||||
description = ''
|
||||
The addresses to send outgoing mail to.
|
||||
'';
|
||||
apply = x: if x == [] then null else lib.concatStringsSep "," x;
|
||||
apply = x: if x == [] || x == null then null else lib.concatStringsSep "," x;
|
||||
};
|
||||
};
|
||||
|
||||
@ -438,7 +438,7 @@ in
|
||||
];
|
||||
dashboards.settings.providers = lib.mkIf cfg.provision.grafana.dashboard [{
|
||||
name = "parsedmarc";
|
||||
options.path = "${pkgs.python3Packages.parsedmarc.dashboard}";
|
||||
options.path = "${pkgs.parsedmarc.dashboard}";
|
||||
}];
|
||||
};
|
||||
};
|
||||
@ -446,7 +446,7 @@ in
|
||||
services.parsedmarc.settings = lib.mkMerge [
|
||||
(lib.mkIf cfg.provision.elasticsearch {
|
||||
elasticsearch = {
|
||||
hosts = [ "localhost:9200" ];
|
||||
hosts = [ "http://localhost:9200" ];
|
||||
ssl = false;
|
||||
};
|
||||
})
|
||||
@ -530,7 +530,7 @@ in
|
||||
MemoryDenyWriteExecute = true;
|
||||
LockPersonality = true;
|
||||
SystemCallArchitectures = "native";
|
||||
ExecStart = "${pkgs.python3Packages.parsedmarc}/bin/parsedmarc -c /run/parsedmarc/parsedmarc.ini";
|
||||
ExecStart = "${lib.getExe pkgs.parsedmarc} -c /run/parsedmarc/parsedmarc.ini";
|
||||
};
|
||||
};
|
||||
|
||||
|
41
pkgs/by-name/pa/parsedmarc/package.nix
Normal file
41
pkgs/by-name/pa/parsedmarc/package.nix
Normal file
@ -0,0 +1,41 @@
|
||||
{ lib
|
||||
, python3
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
let
|
||||
python = python3.override {
|
||||
packageOverrides = self: super: {
|
||||
# https://github.com/domainaware/parsedmarc/issues/464
|
||||
msgraph-core = super.msgraph-core.overridePythonAttrs (old: rec {
|
||||
version = "0.2.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "microsoftgraph";
|
||||
repo = "msgraph-sdk-python-core";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-eRRlG3GJX3WeKTNJVWgNTTHY56qiUGOlxtvEZ2xObLA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with self; [
|
||||
flit-core
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with self; [
|
||||
requests
|
||||
];
|
||||
|
||||
nativeCheckInputs = with self; [
|
||||
pytestCheckHook
|
||||
responses
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
"tests/integration"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "msgraph.core" ];
|
||||
});
|
||||
};
|
||||
};
|
||||
in with python.pkgs; toPythonApplication parsedmarc
|
@ -24,11 +24,12 @@
|
||||
, mailsuite
|
||||
, msgraph-core
|
||||
, nixosTests
|
||||
, opensearch-py
|
||||
, publicsuffixlist
|
||||
, pythonOlder
|
||||
, pythonRelaxDepsHook
|
||||
, requests
|
||||
, tqdm
|
||||
, urllib3
|
||||
, xmltodict
|
||||
}:
|
||||
|
||||
@ -50,14 +51,14 @@ buildPythonPackage rec {
|
||||
hash = "sha256-tK/cxOw50awcDAGRDTQ+Nxb9aJl2+zLZHuJq88xNmXM=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace "elasticsearch<7.14.0" "elasticsearch" \
|
||||
--replace "elasticsearch-dsl==7.4.0" "elasticsearch-dsl"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
hatchling
|
||||
pythonRelaxDepsHook
|
||||
];
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"elasticsearch"
|
||||
"elasticsearch-dsl"
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
@ -84,8 +85,8 @@ buildPythonPackage rec {
|
||||
publicsuffixlist
|
||||
requests
|
||||
tqdm
|
||||
urllib3
|
||||
xmltodict
|
||||
opensearch-py
|
||||
];
|
||||
|
||||
# no tests on PyPI, no tags on GitHub
|
||||
@ -108,5 +109,7 @@ buildPythonPackage rec {
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ talyz ];
|
||||
mainProgram = "parsedmarc";
|
||||
# https://github.com/domainaware/parsedmarc/issues/464
|
||||
broken = lib.versionAtLeast msgraph-core.version "1.0.0";
|
||||
};
|
||||
}
|
||||
|
@ -40014,8 +40014,6 @@ with pkgs;
|
||||
|
||||
OSCAR = qt5.callPackage ../applications/misc/OSCAR { };
|
||||
|
||||
parsedmarc = with python3Packages; toPythonApplication parsedmarc;
|
||||
|
||||
pgmanage = callPackage ../applications/misc/pgmanage { };
|
||||
|
||||
pgadmin4 = callPackage ../tools/admin/pgadmin { };
|
||||
|
Loading…
Reference in New Issue
Block a user