Commit a85c3148 authored by Martin Joerg's avatar Martin Joerg
Browse files

nixos/magic-wormhole-mailbox-server: use Python 3.11, adopt

magic-wormhole-mailbox-server is not yet supported with Python 3.12.
https://github.com/magic-wormhole/magic-wormhole-mailbox-server/issues/41
parent 12de9a74
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -5,22 +5,23 @@
  ...
}:

with lib;

let
  cfg = config.services.magic-wormhole-mailbox-server;
  # keep semicolon in dataDir for backward compatibility
  dataDir = "/var/lib/magic-wormhole-mailbox-server;";
  python = pkgs.python3.withPackages (py: [
    py.magic-wormhole-mailbox-server
    py.twisted
  ]);
  python = pkgs.python311.withPackages (
    py: with py; [
      magic-wormhole-mailbox-server
      twisted
    ]
  );
in
{
  options.services.magic-wormhole-mailbox-server = {
    enable = mkEnableOption "Magic Wormhole Mailbox Server";
    enable = lib.mkEnableOption "Magic Wormhole Mailbox Server";
  };

  config = mkIf cfg.enable {
  config = lib.mkIf cfg.enable {
    systemd.services.magic-wormhole-mailbox-server = {
      after = [ "network.target" ];
      wantedBy = [ "multi-user.target" ];
@@ -32,4 +33,6 @@ in
      };
    };
  };

  meta.maintainers = [ lib.maintainers.mjoerg ];
}