mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-31 09:14:28 +00:00
Merge pull request #326149 from mguentner/remove_mxisd_ma1sd
nixos/mxisd: remove module
This commit is contained in:
commit
e62de266ad
@ -197,6 +197,9 @@
|
||||
|
||||
- `services.roundcube.maxAttachmentSize` will multiply the value set with `1.37` to offset overhead introduced by the base64 encoding applied to attachments.
|
||||
|
||||
- The `services.mxisd` module has been removed as both [mxisd](https://github.com/kamax-matrix/mxisd) and [ma1sd](https://github.com/ma1uta/ma1sd) are not maintained any longer.
|
||||
Consequently the package `pkgs.ma1sd` has also been removed.
|
||||
|
||||
## Other Notable Changes {#sec-release-24.11-notable-changes}
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
@ -180,7 +180,7 @@ in
|
||||
#dnsmasq = 141;# dynamically allocated as of 2021-09-03
|
||||
#uhub = 142; # unused
|
||||
yandexdisk = 143;
|
||||
mxisd = 144; # was once collectd
|
||||
# mxisd = 144; # removed 2024-07-10
|
||||
#consul = 145;# dynamically allocated as of 2021-09-03
|
||||
#mailpile = 146; # removed 2022-01-12
|
||||
redmine = 147;
|
||||
@ -503,7 +503,7 @@ in
|
||||
#dnsmasq = 141; # unused
|
||||
uhub = 142;
|
||||
#yandexdisk = 143; # unused
|
||||
mxisd = 144; # was once collectd
|
||||
# mxisd = 144; # removed 2024-07-10
|
||||
#consul = 145; # unused
|
||||
#mailpile = 146; # removed 2022-01-12
|
||||
redmine = 147;
|
||||
|
@ -1087,7 +1087,6 @@
|
||||
./services/networking/mullvad-vpn.nix
|
||||
./services/networking/multipath.nix
|
||||
./services/networking/murmur.nix
|
||||
./services/networking/mxisd.nix
|
||||
./services/networking/mycelium.nix
|
||||
./services/networking/namecoind.nix
|
||||
./services/networking/nar-serve.nix
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{ lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib)
|
||||
@ -74,6 +74,7 @@ in
|
||||
(mkRemovedOptionModule [ "services" "mathics" ] "The Mathics module has been removed")
|
||||
(mkRemovedOptionModule [ "services" "meguca" ] "Use meguca has been removed from nixpkgs")
|
||||
(mkRemovedOptionModule [ "services" "mesos" ] "The corresponding package was removed from nixpkgs.")
|
||||
(mkRemovedOptionModule [ "services" "mxisd" ] "The mxisd module has been removed as both mxisd and ma1sd got removed.")
|
||||
(mkRemovedOptionModule [ "services" "moinmoin" ] "The corresponding package was removed from nixpkgs.")
|
||||
(mkRemovedOptionModule [ "services" "mwlib" ] "The corresponding package was removed from nixpkgs.")
|
||||
(mkRemovedOptionModule [ "services" "pantheon" "files" ] ''
|
||||
|
@ -1,137 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
isMa1sd =
|
||||
package:
|
||||
lib.hasPrefix "ma1sd" package.name;
|
||||
|
||||
isMxisd =
|
||||
package:
|
||||
lib.hasPrefix "mxisd" package.name;
|
||||
|
||||
cfg = config.services.mxisd;
|
||||
|
||||
server = optionalAttrs (cfg.server.name != null) { inherit (cfg.server) name; }
|
||||
// optionalAttrs (cfg.server.port != null) { inherit (cfg.server) port; };
|
||||
|
||||
baseConfig = {
|
||||
matrix.domain = cfg.matrix.domain;
|
||||
key.path = "${cfg.dataDir}/signing.key";
|
||||
storage = {
|
||||
provider.sqlite.database = if isMa1sd cfg.package
|
||||
then "${cfg.dataDir}/ma1sd.db"
|
||||
else "${cfg.dataDir}/mxisd.db";
|
||||
};
|
||||
} // optionalAttrs (server != {}) { inherit server; };
|
||||
|
||||
# merges baseConfig and extraConfig into a single file
|
||||
fullConfig = recursiveUpdate baseConfig cfg.extraConfig;
|
||||
|
||||
configFile = if isMa1sd cfg.package
|
||||
then pkgs.writeText "ma1sd-config.yaml" (builtins.toJSON fullConfig)
|
||||
else pkgs.writeText "mxisd-config.yaml" (builtins.toJSON fullConfig);
|
||||
|
||||
in {
|
||||
options = {
|
||||
services.mxisd = {
|
||||
enable = mkEnableOption "matrix federated identity server";
|
||||
|
||||
package = mkPackageOption pkgs "ma1sd" { };
|
||||
|
||||
environmentFile = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Path to an environment-file which may contain secrets to be
|
||||
substituted via `envsubst`.
|
||||
'';
|
||||
};
|
||||
|
||||
dataDir = mkOption {
|
||||
type = types.str;
|
||||
default = "/var/lib/mxisd";
|
||||
description = "Where data mxisd/ma1sd uses resides";
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.attrs;
|
||||
default = {};
|
||||
description = "Extra options merged into the mxisd/ma1sd configuration";
|
||||
};
|
||||
|
||||
matrix = {
|
||||
|
||||
domain = mkOption {
|
||||
type = types.str;
|
||||
description = ''
|
||||
the domain of the matrix homeserver
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
server = {
|
||||
|
||||
name = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Public hostname of mxisd/ma1sd, if different from the Matrix domain.
|
||||
'';
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.nullOr types.int;
|
||||
default = null;
|
||||
description = ''
|
||||
HTTP port to listen on (unencrypted)
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
users.users.mxisd =
|
||||
{
|
||||
group = "mxisd";
|
||||
home = cfg.dataDir;
|
||||
createHome = true;
|
||||
shell = "${pkgs.bash}/bin/bash";
|
||||
uid = config.ids.uids.mxisd;
|
||||
};
|
||||
|
||||
users.groups.mxisd =
|
||||
{
|
||||
gid = config.ids.gids.mxisd;
|
||||
};
|
||||
|
||||
systemd.services.mxisd = {
|
||||
description = "a federated identity server for the matrix ecosystem";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = let
|
||||
executable = if isMa1sd cfg.package then "ma1sd" else "mxisd";
|
||||
in {
|
||||
Type = "simple";
|
||||
User = "mxisd";
|
||||
Group = "mxisd";
|
||||
EnvironmentFile = mkIf (cfg.environmentFile != null) [ cfg.environmentFile ];
|
||||
ExecStart = "${cfg.package}/bin/${executable} -c ${cfg.dataDir}/mxisd-config.yaml";
|
||||
ExecStartPre = "${pkgs.writeShellScript "mxisd-substitute-secrets" ''
|
||||
umask 0077
|
||||
${pkgs.envsubst}/bin/envsubst -o ${cfg.dataDir}/mxisd-config.yaml \
|
||||
-i ${configFile}
|
||||
''}";
|
||||
WorkingDirectory = cfg.dataDir;
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -596,7 +596,6 @@ in {
|
||||
musescore = handleTestOn ["x86_64-linux"] ./musescore.nix {};
|
||||
munin = handleTest ./munin.nix {};
|
||||
mutableUsers = handleTest ./mutable-users.nix {};
|
||||
mxisd = handleTest ./mxisd.nix {};
|
||||
mycelium = handleTest ./mycelium {};
|
||||
mympd = handleTest ./mympd.nix {};
|
||||
mysql = handleTest ./mysql/mysql.nix {};
|
||||
|
@ -1,21 +0,0 @@
|
||||
import ./make-test-python.nix ({ pkgs, ... } : {
|
||||
|
||||
name = "mxisd";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ mguentner ];
|
||||
};
|
||||
|
||||
nodes = {
|
||||
server = args : {
|
||||
services.mxisd.enable = true;
|
||||
services.mxisd.matrix.domain = "example.org";
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
server.wait_for_unit("mxisd.service")
|
||||
server.wait_for_open_port(8090)
|
||||
server.succeed("curl -Ssf 'http://127.0.0.1:8090/_matrix/identity/api/v1'")
|
||||
'';
|
||||
})
|
@ -1,101 +0,0 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, jre
|
||||
, git
|
||||
, gradle_7
|
||||
, perl
|
||||
, makeWrapper
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "ma1sd";
|
||||
version = "2.5.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ma1uta";
|
||||
repo = "ma1sd";
|
||||
rev = version;
|
||||
hash = "sha256-K3kaujAhWsRQuTMW3SZOnE7Rmu8+tDXaxpLrb45OI4A=";
|
||||
};
|
||||
|
||||
gradle = gradle_7;
|
||||
|
||||
patches = [
|
||||
# https://github.com/ma1uta/ma1sd/pull/122
|
||||
(fetchpatch {
|
||||
name = "java-16-compatibility.patch";
|
||||
url = "https://github.com/ma1uta/ma1sd/commit/be2e2e97ce21741ca6a2e29a06f5748f45dd414e.patch";
|
||||
hash = "sha256-dvCeK/0InNJtUG9CWrsg7BE0FGWtXuHo3TU0iFFUmIk=";
|
||||
})
|
||||
];
|
||||
|
||||
deps = stdenv.mkDerivation {
|
||||
pname = "${pname}-deps";
|
||||
inherit src version patches;
|
||||
nativeBuildInputs = [ gradle perl git ];
|
||||
|
||||
buildPhase = ''
|
||||
export MA1SD_BUILD_VERSION=${version}
|
||||
export GRADLE_USER_HOME=$(mktemp -d);
|
||||
gradle --no-daemon build -x test
|
||||
'';
|
||||
|
||||
# perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar)
|
||||
installPhase = ''
|
||||
find $GRADLE_USER_HOME/caches/modules-2 -type f -regex '.*\.\(jar\|pom\)' \
|
||||
| perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/$x/$3/$4/$5" #e' \
|
||||
| sh
|
||||
'';
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
outputHashAlgo = "sha256";
|
||||
outputHashMode = "recursive";
|
||||
outputHash = "sha256-Px8FLnREBC6pADcEPn/GfhrtGnmZqjXIX7l1xPjiCvQ=";
|
||||
};
|
||||
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
inherit pname src version patches;
|
||||
nativeBuildInputs = [ gradle perl makeWrapper ];
|
||||
buildInputs = [ jre ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace build.gradle \
|
||||
--replace 'gradlePluginPortal()' "" \
|
||||
--replace 'mavenCentral()' "mavenLocal(); maven { url '${deps}' }"
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
export MA1SD_BUILD_VERSION=${version}
|
||||
export GRADLE_USER_HOME=$(mktemp -d)
|
||||
|
||||
gradle --offline --no-daemon build -x test
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -D build/libs/source.jar $out/lib/ma1sd.jar
|
||||
makeWrapper ${jre}/bin/java $out/bin/ma1sd --add-flags "-jar $out/lib/ma1sd.jar"
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Federated matrix identity server; fork of mxisd";
|
||||
homepage = "https://github.com/ma1uta/ma1sd";
|
||||
changelog = "https://github.com/ma1uta/ma1sd/releases/tag/${version}";
|
||||
sourceProvenance = with sourceTypes; [
|
||||
fromSource
|
||||
binaryBytecode # deps
|
||||
];
|
||||
license = licenses.agpl3Only;
|
||||
maintainers = with maintainers; [ mguentner ];
|
||||
platforms = platforms.all;
|
||||
mainProgram = "ma1sd";
|
||||
};
|
||||
|
||||
}
|
@ -857,6 +857,7 @@ mapAliases ({
|
||||
|
||||
### M ###
|
||||
|
||||
ma1sd = throw "ma1sd was dropped as it is unmaintained"; # Added 2024-07-10
|
||||
MACS2 = macs2; # Added 2023-06-12
|
||||
mailman-rss = throw "The mailman-rss package was dropped since it was unmaintained."; # Added 2024-06-21
|
||||
mariadb_104 = throw "mariadb_104 has been removed from nixpkgs, please switch to another version like mariadb_106"; # Added 2023-09-11
|
||||
|
@ -9652,8 +9652,6 @@ with pkgs;
|
||||
|
||||
kzipmix = pkgsi686Linux.callPackage ../tools/compression/kzipmix { };
|
||||
|
||||
ma1sd = callPackage ../servers/ma1sd { };
|
||||
|
||||
mailcatcher = callPackage ../development/web/mailcatcher { };
|
||||
|
||||
makebootfat = callPackage ../tools/misc/makebootfat { };
|
||||
|
Loading…
Reference in New Issue
Block a user