Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge pull request #280940 from e1mo/fix-parsedmarc-smtp-to

authored by Sandro and committed by GitHub 4a2f53b6 33489534

+56 -14
+4 -4
nixos/modules/services/monitoring/parsedmarc.nix
··· 301 301 description = '' 302 302 The addresses to send outgoing mail to. 303 303 ''; 304 - apply = x: if x == [] then null else lib.concatStringsSep "," x; 304 + apply = x: if x == [] || x == null then null else lib.concatStringsSep "," x; 305 305 }; 306 306 }; 307 307 ··· 438 438 ]; 439 439 dashboards.settings.providers = lib.mkIf cfg.provision.grafana.dashboard [{ 440 440 name = "parsedmarc"; 441 - options.path = "${pkgs.python3Packages.parsedmarc.dashboard}"; 441 + options.path = "${pkgs.parsedmarc.dashboard}"; 442 442 }]; 443 443 }; 444 444 }; ··· 446 446 services.parsedmarc.settings = lib.mkMerge [ 447 447 (lib.mkIf cfg.provision.elasticsearch { 448 448 elasticsearch = { 449 - hosts = [ "localhost:9200" ]; 449 + hosts = [ "http://localhost:9200" ]; 450 450 ssl = false; 451 451 }; 452 452 }) ··· 530 530 MemoryDenyWriteExecute = true; 531 531 LockPersonality = true; 532 532 SystemCallArchitectures = "native"; 533 - ExecStart = "${pkgs.python3Packages.parsedmarc}/bin/parsedmarc -c /run/parsedmarc/parsedmarc.ini"; 533 + ExecStart = "${lib.getExe pkgs.parsedmarc} -c /run/parsedmarc/parsedmarc.ini"; 534 534 }; 535 535 }; 536 536
+41
pkgs/by-name/pa/parsedmarc/package.nix
··· 1 + { lib 2 + , python3 3 + , fetchFromGitHub 4 + }: 5 + 6 + let 7 + python = python3.override { 8 + packageOverrides = self: super: { 9 + # https://github.com/domainaware/parsedmarc/issues/464 10 + msgraph-core = super.msgraph-core.overridePythonAttrs (old: rec { 11 + version = "0.2.2"; 12 + 13 + src = fetchFromGitHub { 14 + owner = "microsoftgraph"; 15 + repo = "msgraph-sdk-python-core"; 16 + rev = "v${version}"; 17 + hash = "sha256-eRRlG3GJX3WeKTNJVWgNTTHY56qiUGOlxtvEZ2xObLA="; 18 + }; 19 + 20 + nativeBuildInputs = with self; [ 21 + flit-core 22 + ]; 23 + 24 + propagatedBuildInputs = with self; [ 25 + requests 26 + ]; 27 + 28 + nativeCheckInputs = with self; [ 29 + pytestCheckHook 30 + responses 31 + ]; 32 + 33 + disabledTestPaths = [ 34 + "tests/integration" 35 + ]; 36 + 37 + pythonImportsCheck = [ "msgraph.core" ]; 38 + }); 39 + }; 40 + }; 41 + in with python.pkgs; toPythonApplication parsedmarc
+11 -8
pkgs/development/python-modules/parsedmarc/default.nix
··· 24 24 , mailsuite 25 25 , msgraph-core 26 26 , nixosTests 27 + , opensearch-py 27 28 , publicsuffixlist 28 29 , pythonOlder 30 + , pythonRelaxDepsHook 29 31 , requests 30 32 , tqdm 31 - , urllib3 32 33 , xmltodict 33 34 }: 34 35 ··· 50 51 hash = "sha256-tK/cxOw50awcDAGRDTQ+Nxb9aJl2+zLZHuJq88xNmXM="; 51 52 }; 52 53 53 - postPatch = '' 54 - substituteInPlace pyproject.toml \ 55 - --replace "elasticsearch<7.14.0" "elasticsearch" \ 56 - --replace "elasticsearch-dsl==7.4.0" "elasticsearch-dsl" 57 - ''; 58 - 59 54 nativeBuildInputs = [ 60 55 hatchling 56 + pythonRelaxDepsHook 57 + ]; 58 + 59 + pythonRelaxDeps = [ 60 + "elasticsearch" 61 + "elasticsearch-dsl" 61 62 ]; 62 63 63 64 propagatedBuildInputs = [ ··· 84 85 publicsuffixlist 85 86 requests 86 87 tqdm 87 - urllib3 88 88 xmltodict 89 + opensearch-py 89 90 ]; 90 91 91 92 # no tests on PyPI, no tags on GitHub ··· 108 109 license = licenses.asl20; 109 110 maintainers = with maintainers; [ talyz ]; 110 111 mainProgram = "parsedmarc"; 112 + # https://github.com/domainaware/parsedmarc/issues/464 113 + broken = lib.versionAtLeast msgraph-core.version "1.0.0"; 111 114 }; 112 115 }
-2
pkgs/top-level/all-packages.nix
··· 40014 40014 40015 40015 OSCAR = qt5.callPackage ../applications/misc/OSCAR { }; 40016 40016 40017 - parsedmarc = with python3Packages; toPythonApplication parsedmarc; 40018 - 40019 40017 pgmanage = callPackage ../applications/misc/pgmanage { }; 40020 40018 40021 40019 pgadmin4 = callPackage ../tools/admin/pgadmin { };