Compare commits

...

41 Commits

Author SHA1 Message Date
Justin Bedő
00fa9a692b R updates (#523821) 2026-06-06 13:16:27 +00:00
Yt
4bb2f933a7 python3Packages.unstructured: bundle NLTK data to fix import-time download (#528525) 2026-06-06 12:56:30 +00:00
isabel
caadd34e2c forgejo-cli: set __structuredAttrs, add versionCheckHook (#528689) 2026-06-06 12:54:09 +00:00
nixpkgs-ci[bot]
86b678832f zwave-js-ui: 11.19.0 -> 11.19.1 (#528678) 2026-06-06 12:48:30 +00:00
nixpkgs-ci[bot]
881a66fb2a phpactor: 2025.12.21.1 -> 2026.05.30.1 (#528667) 2026-06-06 12:48:25 +00:00
Guillaume Girol
8a4fdb12fa nixos/mautrix-discord: refactor (#469813) 2026-06-06 12:41:16 +00:00
Gaétan Lepage
a799d3e388 python3Packages.fastapi-pagination: 0.15.13 -> 0.15.14 (#528774) 2026-06-06 12:30:50 +00:00
R. Ryantm
5760cf8087 python3Packages.fastapi-pagination: 0.15.13 -> 0.15.14 2026-06-06 12:07:45 +00:00
Mistyttm
4e861c2161 nixos/mautrix-discord: refactor
After fixing the registration bug I determined that the module was way
too verbose and did not need to provide all of the options provided in
the application. I've stopped explicitly declaring all options that
aren't needed to make a basic version of the module function. The
assertions have also been updated to mirror this fact and will alert a
user when the specific required options are unset. A new documnetation
file was also added as this module, like other mautrix modules, is quite
complex and may need more explaining.
2026-06-06 21:43:50 +10:00
Grische
56892c177e python3Packages.unstructured: bundle NLTK data to fix import-time download
unstructured/nlp/tokenize.py downloads the `averaged_perceptron_tagger_eng`
and `punkt_tab` NLTK corpora at import time unless they are already present on
`nltk.data.path`. In offline or read-only/sandboxed environments (such as a
systemd service with a read-only filesystem) this fails with
`OSError: [Errno 30] Read-only file system: '/nltk_data'` as soon as a consumer
imports a partition module (e.g. `unstructured.partition.epub` via open-webui).

Bundle the two required corpora through `nltk-data` and register the directory
on `nltk.data.path` with a small postPatch, so importing unstructured works
without network access or a writable home. The directory is named `nltk_data`
because unstructured's resolver only uses such paths verbatim.

Also import `unstructured.nlp.tokenize` in pythonImportsCheck so the build
itself exercises the corpora lookup and guards against regressions.

Assisted-by: Claude Opus 4.8 (1M context)
2026-06-06 10:08:06 +00:00
Ethan Carter Edwards
25d7e26a99 forgejo-cli: set __structuredAttrs, add versionCheckHook
Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
2026-06-06 00:43:09 -07:00
R. Ryantm
7de43b90ed zwave-js-ui: 11.19.0 -> 11.19.1 2026-06-06 06:49:03 +00:00
R. Ryantm
f37db05b87 phpactor: 2025.12.21.1 -> 2026.05.30.1 2026-06-06 05:36:14 +00:00
Justin Bedő
476399fb33 rPackages: fix changed hashes (#527156) 2026-06-03 00:53:41 +00:00
Justin Bedo
1d7a5c4a40 rPackages.sjSDM: fix hash 2026-06-03 10:51:24 +10:00
Justin Bedo
6f46fbd12c rPackages.robust2sls: fix hash 2026-06-03 10:51:14 +10:00
Justin Bedo
5a36e09add rPackages.rYWAASB: fix hash 2026-06-03 10:51:05 +10:00
Justin Bedo
ee7a29379b rPackages.prospectr: fix hash 2026-06-03 10:50:56 +10:00
Justin Bedo
4389f0263b rPackages.poolr: fix hash 2026-06-03 10:50:48 +10:00
Justin Bedo
513d50ef4a rPackages.maczic: fix hash 2026-06-03 10:50:40 +10:00
Justin Bedo
a8cb43260b rPackages.complexlm: fix hash 2026-06-03 10:50:28 +10:00
Justin Bedo
7494fc7744 rPackages.clugenr: fix hash 2026-06-03 10:50:18 +10:00
Justin Bedo
4d6b55a1c9 rPackages.aglm: fix hash 2026-06-03 10:50:09 +10:00
Justin Bedo
6513602344 rPackages.Path_Analysis: fix hash 2026-06-03 10:49:58 +10:00
Justin Bedo
80cfb6fe57 rPackages.NCFP: fix hash 2026-06-03 10:49:46 +10:00
Justin Bedo
22ffe0a4ba rPackages.GOCompare: fix hash 2026-06-03 10:49:36 +10:00
Justin Bedo
208a93bc94 rPackages.lpsymphony: fix build 2026-06-02 17:22:43 +10:00
László Kupcsik
9ae23a4d52 rPackages.ramr: fix build 2026-06-02 17:21:51 +10:00
Justin Bedo
2f5857b93e postgresqlPackages.plr: 8.4.8 -> 8.4.8.6 2026-06-01 21:28:58 +10:00
Justin Bedo
15672e349c rPackages.FKF_SP: update hash 2026-05-29 09:02:11 +10:00
Bruno Rodrigues
56dec1ba0d rPackages.tinyimg: fixed build 2026-05-29 09:02:11 +10:00
Bruno Rodrigues
06437cadfd rPackages.survivalsvm: fixed build 2026-05-29 09:02:10 +10:00
Bruno Rodrigues
37edf38e79 rPackages.RProtoBuf: fixed build 2026-05-29 09:02:10 +10:00
Bruno Rodrigues
2ad1656d06 rPackages.metan: fixed build 2026-05-29 09:02:10 +10:00
Justin Bedo
79bcae29d4 rPackages.rlas: fix build 2026-05-29 09:02:10 +10:00
Justin Bedo
22d8ed93f3 rPackages.fixest: fix build 2026-05-29 09:02:09 +10:00
Justin Bedo
a52facf1eb rPackages.rhdf5: update patch 2026-05-29 09:02:09 +10:00
Justin Bedo
a4664b8196 rPackages.Rhdf5lib: fix build 2026-05-29 09:02:09 +10:00
Justin Bedo
8ee070ca0c rPackages.fs: fix build 2026-05-26 07:47:39 +10:00
Justin Bedo
c8c8e732c7 rPackages: CRAN and BioC update 2026-05-25 10:21:28 +10:00
Justin Bedo
bf309d01a0 R: 4.5.3 -> 4.6.0 2026-05-25 10:21:03 +10:00
18 changed files with 21444 additions and 15476 deletions

View File

@@ -65,6 +65,42 @@
"module-services-keycloak-unix-socket": [
"index.html#module-services-keycloak-unix-socket"
],
"module-services-mautrix-discord": [
"index.html#module-services-mautrix-discord"
],
"module-services-mautrix-discord-advanced": [
"index.html#module-services-mautrix-discord-advanced"
],
"module-services-mautrix-discord-authentication": [
"index.html#module-services-mautrix-discord-authentication"
],
"module-services-mautrix-discord-backfill": [
"index.html#module-services-mautrix-discord-backfill"
],
"module-services-mautrix-discord-basic-example": [
"index.html#module-services-mautrix-discord-basic-example"
],
"module-services-mautrix-discord-basic-usage": [
"index.html#module-services-mautrix-discord-basic-usage"
],
"module-services-mautrix-discord-double-puppet": [
"index.html#module-services-mautrix-discord-double-puppet"
],
"module-services-mautrix-discord-encryption": [
"index.html#module-services-mautrix-discord-encryption"
],
"module-services-mautrix-discord-server-defaults": [
"index.html#module-services-mautrix-discord-server-defaults"
],
"module-services-mautrix-discord-setup": [
"index.html#module-services-mautrix-discord-setup"
],
"module-services-mautrix-discord-synapse": [
"index.html#module-services-mautrix-discord-synapse"
],
"module-services-mautrix-discord-troubleshooting": [
"index.html#module-services-mautrix-discord-troubleshooting"
],
"module-services-tandoor-recipes-migrating-media-option-move": [
"index.html#module-services-tandoor-recipes-migrating-media-option-move",
"index.html#module-services-tandoor-recipes-migrating-media-option-1"

View File

@@ -0,0 +1,156 @@
# Mautrix-Discord {#module-services-mautrix-discord}
*Source:* {file}`modules/services/matrix/mautrix-discord`
*Upstream documentation:* <https://docs.mau.fi/bridges/go/discord/index.html>
[Mautrix-Discord](https://github.com/mautrix/discord) is a Matrix-Discord bridge.
## Basic Usage {#module-services-mautrix-discord-basic-usage}
The common setup is to enable the bridge, point it at your homeserver, and set the permissions you want to allow:
1. Set `services.mautrix-discord.enable` to `true`.
2. Set `services.mautrix-discord.settings.homeserver.address` and `services.mautrix-discord.settings.homeserver.domain`.
3. Override `services.mautrix-discord.settings.bridge.permissions` if the default relay permissions do not fit your deployment.
The module provides sensible defaults for the appservice listener, registration tokens, and relay permissions.
### Basic Example {#module-services-mautrix-discord-basic-example}
```nix
{
services.mautrix-discord = {
enable = true;
registerToSynapse = true;
settings = {
homeserver = {
address = "http://localhost:8008";
domain = "example.com";
};
bridge.permissions = {
"example.com" = "user";
"@admin:example.com" = "admin";
};
};
};
}
```
### Server Defaults {#module-services-mautrix-discord-server-defaults}
By default, the bridge listens on `http://localhost:29334` and generates its appservice tokens automatically.
## Authentication {#module-services-mautrix-discord-authentication}
If you want to store the bridge database outside the default SQLite file, set `settings.appservice.database` to use PostgreSQL instead of SQLite:
```nix
{
services.mautrix-discord.settings.appservice.database = {
type = "postgres";
uri = "postgresql:///mautrix-discord?host=/run/postgresql";
};
}
```
If the connection needs a password, combine it with `services.mautrix-discord.environmentFile`:
```nix
{
services.mautrix-discord = {
environmentFile = "/run/secrets/mautrix-discord-env";
settings.appservice.database.uri = "postgresql://mautrix:$DB_PASSWORD@localhost/mautrix-discord";
};
}
```
Use `services.mautrix-discord.environmentFile` for any secret you do not want in the Nix store.
This includes database passwords, shared secrets, and similar values.
Example:
```nix
{
services.mautrix-discord = {
environmentFile = "/run/secrets/mautrix-discord-env";
settings.bridge.login_shared_secret_map = {
"example.com" = "$SHARED_SECRET";
};
};
}
```
## Bridge Setup {#module-services-mautrix-discord-setup}
After the service starts, open a chat with `@discordbot:example.com`, send `login`, and follow the instructions to link your Discord account.
For more detail, see the [Mautrix-Discord documentation](https://docs.mau.fi/bridges/go/discord/index.html).
## Advanced Configuration {#module-services-mautrix-discord-advanced}
The upstream default configuration is available at [example-config.yaml](https://github.com/mautrix/discord/blob/main/example-config.yaml). To print the generated default configuration from the package, run:
```bash
nix-shell -p mautrix-discord --run "mautrix-discord -e"
```
### Encryption {#module-services-mautrix-discord-encryption}
```nix
{
services.mautrix-discord.settings.bridge.encryption = {
allow = true;
default = true;
require = false;
};
}
```
Encryption needs additional bridge-side setup. See the [bridge encryption documentation](https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html) for details.
### Backfill {#module-services-mautrix-discord-backfill}
```nix
{
services.mautrix-discord.settings.bridge.backfill.forward_limits.initial = {
dm = 50;
channel = 50;
thread = 50;
};
}
```
### Double Puppeting {#module-services-mautrix-discord-double-puppet}
```nix
{
services.mautrix-discord = {
environmentFile = "/run/secrets/mautrix-discord-env";
settings.bridge.login_shared_secret_map = {
"example.com" = "$SHARED_SECRET";
};
};
}
```
where `/run/secrets/mautrix-discord-env` contains
```
SHARED_SECRET=aProtectedSecret
```
## Synapse Integration {#module-services-mautrix-discord-synapse}
When `services.mautrix-discord.registerToSynapse` is `true`, the bridge writes its registration file automatically and Synapse picks it up.
If Synapse is enabled, this option defaults to `true`.
## Troubleshooting {#module-services-mautrix-discord-troubleshooting}
- View logs with `journalctl -u mautrix-discord.service -f`.
- Check `systemctl status mautrix-discord` if the bridge does not start.
- Verify the homeserver can reach the configured appservice address.
- Ensure the registration file exists and Synapse can read it.
For more help, see the
[Mautrix-Discord documentation](https://docs.mau.fi/bridges/go/discord/index.html)
or the support room at [#discord:maunium.net](https://matrix.to/#/#discord:maunium.net).

View File

@@ -5,15 +5,59 @@
...
}:
let
defaultDataDir = "/var/lib/mautrix-discord";
cfg = config.services.mautrix-discord;
dataDir = cfg.dataDir;
format = pkgs.formats.yaml { };
serviceDependencies = [
"mautrix-discord-registration.service"
]
++ (lib.lists.optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit)
++ (lib.lists.optional config.services.matrix-conduit.enable "matrix-conduit.service")
++ (lib.lists.optional config.services.dendrite.enable "dendrite.service");
registrationFile = "${dataDir}/discord-registration.yaml";
settingsFile = "${dataDir}/config.yaml";
settingsFileUnformatted = format.generate "discord-config-unsubstituted.yaml" cfg.settings;
default_token = "This value is generated when generating the registration";
settingsDefault = {
homeserver = {
address = "";
domain = "";
};
appservice = {
address = "http://localhost:29334";
hostname = "0.0.0.0";
port = 29334;
database = {
type = "sqlite3";
uri = "file:${defaultDataDir}/mautrix-discord.db?_txlock=immediate";
};
id = "discord";
bot = {
username = "discordbot";
displayname = "Discord bridge bot";
avatar = "mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC";
};
as_token = default_token;
hs_token = default_token;
};
bridge.permissions."*" = "relay";
logging = {
min_level = "info";
writers = [
{
type = "stdout";
format = "pretty-colored";
time_format = " ";
}
];
};
};
in
{
options = {
@@ -23,238 +67,14 @@ in
package = lib.mkPackageOption pkgs "mautrix-discord" { };
settings = lib.mkOption {
type = lib.types.submodule {
freeformType = format.type;
config = {
_module.args = { inherit cfg lib; };
};
options = {
homeserver = lib.mkOption {
type = lib.types.attrs;
default = {
software = "standard";
status_endpoint = null;
message_send_checkpoint_endpoint = null;
async_media = false;
websocket = false;
ping_interval_seconds = 0;
};
description = ''
fullDataDiration.
See [example-config.yaml](https://github.com/mautrix/discord/blob/main/example-config.yaml)
for more information.
'';
};
appservice = lib.mkOption {
type = lib.types.attrs;
default = {
address = "http://localhost:29334";
hostname = "0.0.0.0";
port = 29334;
database = {
type = "sqlite3";
uri = "file:/var/lib/mautrix-discord/mautrix-discord.db?_txlock=immediate";
max_open_conns = 20;
max_idle_conns = 2;
max_conn_idle_time = null;
max_conn_lifetime = null;
};
id = "discord";
bot = {
username = "discordbot";
displayname = "Discord bridge bot";
avatar = "mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC";
};
ephemeral_events = true;
async_transactions = false;
as_token = "This value is generated when generating the registration";
hs_token = "This value is generated when generating the registration";
};
defaultText = lib.literalExpression ''
{
address = "http://localhost:29334";
hostname = "0.0.0.0";
port = 29334;
database = {
type = "sqlite3";
uri = "file:''${config.services.mautrix-discord.dataDir}/mautrix-discord.db?_txlock=immediate";
max_open_conns = 20;
max_idle_conns = 2;
max_conn_idle_time = null;
max_conn_lifetime = null;
};
id = "discord";
bot = {
username = "discordbot";
displayname = "Discord bridge bot";
avatar = "mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC";
};
ephemeral_events = true;
async_transactions = false;
as_token = "This value is generated when generating the registration";
hs_token = "This value is generated when generating the registration";
}
'';
description = ''
Appservice configuration.
See [example-config.yaml](https://github.com/mautrix/discord/blob/main/example-config.yaml)
for more information.
'';
};
bridge = lib.mkOption {
type = lib.types.attrs;
default = {
username_template = "discord_{{.}}";
displayname_template = "{{if .Webhook}}Webhook{{else}}{{or .GlobalName .Username}}{{if .Bot}} (bot){{end}}{{end}}";
channel_name_template = "{{if or (eq .Type 3) (eq .Type 4)}}{{.Name}}{{else}}#{{.Name}}{{end}}";
guild_name_template = "{{.Name}}";
private_chat_portal_meta = "default";
public_address = null;
avatar_proxy_key = "generate";
portal_message_buffer = 128;
startup_private_channel_create_limit = 5;
delivery_receipts = false;
message_status_events = false;
message_error_notices = true;
restricted_rooms = true;
autojoin_thread_on_open = true;
embed_fields_as_tables = true;
mute_channels_on_create = false;
sync_direct_chat_list = false;
resend_bridge_info = false;
custom_emoji_reactions = true;
delete_portal_on_channel_delete = false;
delete_guild_on_leave = true;
federate_rooms = true;
prefix_webhook_messages = true;
enable_webhook_avatars = false;
use_discord_cdn_upload = true;
#proxy =
cache_media = "unencrypted";
direct_media = {
enabled = false;
#server_name = "discord-media.example.com";
#well_known_response =
allow_proxy = true;
server_key = "generate";
};
animated_sticker = {
target = "webp";
args = {
width = 320;
height = 320;
fps = 25;
};
};
double_puppet_server_map = {
#"example.com" = "https://example.com";
};
double_puppet_allow_discovery = false;
login_shared_secret_map = {
#"example.com" = "foobar";
};
command_prefix = "!discord";
management_room_text = {
welcome = "Hello, I'm a Discord bridge bot.";
welcome_connected = "Use `help` for help.";
welcome_unconnected = "Use `help` for help or `login` to log in.";
additional_help = "";
};
backfill = {
forward_limits = {
initial = {
dm = 0;
channel = 0;
thread = 0;
};
missed = {
dm = 0;
channel = 0;
thread = 0;
};
max_guild_members = -1;
};
};
encryption = {
allow = false;
default = false;
appservice = false;
msc4190 = false;
require = false;
allow_key_sharing = false;
plaintext_mentions = false;
delete_keys = {
delete_outbound_on_ack = false;
dont_store_outbound = false;
ratchet_on_decrypt = false;
delete_fully_used_on_decrypt = false;
delete_prev_on_new_session = false;
delete_on_device_delete = false;
periodically_delete_expired = false;
delete_outdated_inbound = false;
};
verification_levels = {
receive = "unverified";
send = "unverified";
share = "cross-signed-tofu";
};
rotation = {
enable_custom = false;
milliseconds = 604800000;
messages = 100;
disable_device_change_key_rotation = false;
};
};
provisioning = {
prefix = "/_matrix/provision";
shared_secret = "generate";
debug_endpoints = false;
};
permissions = {
"*" = "relay";
#"example.com" = "user";
#"@admin:example.com": "admin";
};
};
description = ''
Bridge configuration.
See [example-config.yaml](https://github.com/mautrix/discord/blob/main/example-config.yaml)
for more information.
'';
};
logging = lib.mkOption {
type = lib.types.attrs;
default = {
min_level = "info";
writers = lib.singleton {
type = "stdout";
format = "pretty-colored";
time_format = " ";
};
};
description = ''
Logging configuration.
See [example-config.yaml](https://github.com/mautrix/discord/blob/main/example-config.yaml)
for more information.
'';
};
};
};
default = { };
apply = lib.recursiveUpdate settingsDefault;
type = format.type;
default = settingsDefault;
example = lib.literalExpression ''
{
homeserver = {
address = "http://localhost:8008";
domain = "public-domain.tld";
};
appservice.public = {
prefix = "/public";
external = "https://public-appservice-address/public";
domain = "example.com";
};
bridge.permissions = {
@@ -265,8 +85,12 @@ in
'';
description = ''
{file}`config.yaml` configuration as a Nix attribute set.
Configuration options should match those described in
[example-config.yaml](https://github.com/mautrix/discord/blob/main/example-config.yaml).
Secret tokens should be specified using {option}`environmentFile`
instead of this world-readable attribute set.
'';
};
@@ -282,12 +106,9 @@ in
dataDir = lib.mkOption {
type = lib.types.path;
default = "/var/lib/mautrix-discord";
defaultText = "/var/lib/mautrix-discord";
description = ''
Directory to store the bridge's configuration and database files.
This directory will be created if it does not exist.
'';
default = defaultDataDir;
defaultText = defaultDataDir;
description = "Directory to store the bridge's data.";
};
# TODO: Get upstream to add an environment File option. Refer to https://github.com/NixOS/nixpkgs/pull/404871#issuecomment-2895663652 and https://github.com/mautrix/discord/issues/187
@@ -295,92 +116,31 @@ in
type = lib.types.nullOr lib.types.path;
default = null;
description = ''
File containing environment variables to substitute when copying the configuration
out of Nix store to the `services.mautrix-discord.dataDir`.
Can be used for storing the secrets without making them available in the Nix store.
For example, you can set `services.mautrix-discord.settings.appservice.as_token = "$MAUTRIX_DISCORD_APPSERVICE_AS_TOKEN"`
and then specify `MAUTRIX_DISCORD_APPSERVICE_AS_TOKEN="{token}"` in the environment file.
This value will get substituted into the configuration file as a token.
File containing environment variables for secret substitution.
Variables in the config like `$VARIABLE` will be replaced.
'';
};
serviceUnit = lib.mkOption {
type = lib.types.str;
readOnly = true;
default = "mautrix-discord.service";
description = ''
The systemd unit (a service or a target) for other services to depend on if they
need to be started after matrix-synapse.
This option is useful as the actual parent unit for all matrix-synapse processes
changes when configuring workers.
'';
};
registrationServiceUnit = lib.mkOption {
type = lib.types.str;
readOnly = true;
default = "mautrix-discord-registration.service";
description = ''
The registration service that generates the registration file.
Systemd unit (a service or a target) for other services to depend on if they
need to be started after mautrix-discord registration service.
This option is useful as the actual parent unit for all matrix-synapse processes
changes when configuring workers.
'';
};
serviceDependencies = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [
cfg.registrationServiceUnit
]
++ (lib.lists.optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit)
++ (lib.lists.optional config.services.matrix-conduit.enable "matrix-conduit.service")
++ (lib.lists.optional config.services.dendrite.enable "dendrite.service");
defaultText = ''
[ cfg.registrationServiceUnit ] ++
(lib.lists.optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit) ++
(lib.lists.optional config.services.matrix-conduit.enable "matrix-conduit.service") ++
(lib.lists.optional config.services.dendrite.enable "dendrite.service");
'';
description = ''
List of Systemd services to require and wait for when starting the application service.
'';
};
};
};
config = lib.mkIf cfg.enable {
assertions = [
{
assertion =
cfg.settings.homeserver.domain or "" != "" && cfg.settings.homeserver.address or "" != "";
message = ''
The options with information about the homeserver:
`services.mautrix-discord.settings.homeserver.domain` and
`services.mautrix-discord.settings.homeserver.address` have to be set.
'';
}
{
assertion = cfg.settings.bridge.permissions or { } != { };
message = ''
The option `services.mautrix-discord.settings.bridge.permissions` has to be set.
'';
cfg.settings.homeserver.address or "" != "" && cfg.settings.homeserver.domain or "" != "";
message = "services.mautrix-discord.settings.homeserver.{address,domain} must be set.";
}
];
users.users.mautrix-discord = {
isSystemUser = true;
group = "mautrix-discord";
extraGroups = [ "mautrix-discord-registration" ];
home = dataDir;
description = "Mautrix-Discord bridge user";
};
users.groups.mautrix-discord = { };
users.groups.mautrix-discord-registration = {
members = lib.lists.optional config.services.matrix-synapse.enable "matrix-synapse";
};
services.matrix-synapse = lib.mkIf cfg.registerToSynapse {
settings.app_service_config_files = [ registrationFile ];
@@ -392,7 +152,9 @@ in
systemd.services = {
matrix-synapse = lib.mkIf cfg.registerToSynapse {
serviceConfig.SupplementaryGroups = [ "mautrix-discord-registration" ];
serviceConfig.SupplementaryGroups = [
"mautrix-discord"
];
# Make synapse depend on the registration service when auto-registering
wants = [ "mautrix-discord-registration.service" ];
after = [ "mautrix-discord-registration.service" ];
@@ -471,15 +233,18 @@ in
'${settingsFile}' '${registrationFile}' > '${registrationFile}.tmp'
mv '${registrationFile}.tmp' '${registrationFile}'
# Application services should not be rate limited by default.
yq -Y '.rate_limited = false' '${registrationFile}' > '${registrationFile}.tmp'
mv '${registrationFile}.tmp' '${registrationFile}'
umask $old_umask
chown :mautrix-discord-registration '${registrationFile}'
chmod 640 '${registrationFile}'
'';
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
UMask = 27;
UMask = "027";
User = "mautrix-discord";
Group = "mautrix-discord";
@@ -501,8 +266,8 @@ in
description = "Mautrix-Discord, a Matrix-Discord puppeting/relaybot bridge";
wantedBy = [ "multi-user.target" ];
wants = [ "network-online.target" ] ++ cfg.serviceDependencies;
after = [ "network-online.target" ] ++ cfg.serviceDependencies;
wants = [ "network-online.target" ] ++ serviceDependencies;
after = [ "network-online.target" ] ++ serviceDependencies;
path = [
pkgs.lottieconverter
pkgs.ffmpeg-headless
@@ -536,6 +301,8 @@ in
ProtectHostname = true;
ProtectClock = true;
UMask = "027";
SystemCallArchitectures = "native";
SystemCallErrorNumber = "EPERM";
SystemCallFilter = "@system-service";
@@ -546,10 +313,12 @@ in
};
};
meta = {
maintainers = with lib.maintainers; [
mistyttm
];
};
};
meta = {
maintainers = with lib.maintainers; [
mistyttm
];
doc = ./mautrix-discord.md;
};
}

View File

@@ -1,4 +1,4 @@
{ pkgs, lib, ... }:
{ pkgs, ... }:
let
homeserverUrl = "http://homeserver:8008";
in
@@ -53,6 +53,7 @@ in
appservice = {
address = "http://homeserver:8009";
hostname = "0.0.0.0";
port = 8009;
id = "discord";
bot = {
@@ -60,8 +61,6 @@ in
displayname = "Discord bridge bot";
avatar = "mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC";
};
# Don't override as_token/hs_token - let them use the default placeholder
# which will trigger automatic generation
database = {
type = "sqlite3";
@@ -75,6 +74,17 @@ in
"*" = "relay";
};
};
logging = {
min_level = "info";
writers = [
{
type = "stdout";
format = "pretty-colored";
time_format = " ";
}
];
};
};
};
@@ -157,6 +167,57 @@ in
with subtest("verify registration file was created"):
homeserver.wait_until_succeeds("test -f /var/lib/mautrix-discord/discord-registration.yaml")
# Verify the module wrote the expected bridge configuration.
config_homeserver_address = homeserver.succeed("yq -r '.homeserver.address' /var/lib/mautrix-discord/config.yaml").strip()
config_homeserver_domain = homeserver.succeed("yq -r '.homeserver.domain' /var/lib/mautrix-discord/config.yaml").strip()
config_appservice_address = homeserver.succeed("yq -r '.appservice.address' /var/lib/mautrix-discord/config.yaml").strip()
config_appservice_hostname = homeserver.succeed("yq -r '.appservice.hostname' /var/lib/mautrix-discord/config.yaml").strip()
config_appservice_port = homeserver.succeed("yq -r '.appservice.port' /var/lib/mautrix-discord/config.yaml").strip()
config_appservice_id = homeserver.succeed("yq -r '.appservice.id' /var/lib/mautrix-discord/config.yaml").strip()
config_bot_username = homeserver.succeed("yq -r '.appservice.bot.username' /var/lib/mautrix-discord/config.yaml").strip()
config_bot_displayname = homeserver.succeed("yq -r '.appservice.bot.displayname' /var/lib/mautrix-discord/config.yaml").strip()
config_bot_avatar = homeserver.succeed("yq -r '.appservice.bot.avatar' /var/lib/mautrix-discord/config.yaml").strip()
config_database_type = homeserver.succeed("yq -r '.appservice.database.type' /var/lib/mautrix-discord/config.yaml").strip()
config_database_uri = homeserver.succeed("yq -r '.appservice.database.uri' /var/lib/mautrix-discord/config.yaml").strip()
config_permission = homeserver.succeed("yq -r '.bridge.permissions[\"*\"]' /var/lib/mautrix-discord/config.yaml").strip()
config_logging_min_level = homeserver.succeed("yq -r '.logging.min_level' /var/lib/mautrix-discord/config.yaml").strip()
config_logging_writer_type = homeserver.succeed("yq -r '.logging.writers[0].type' /var/lib/mautrix-discord/config.yaml").strip()
config_logging_writer_format = homeserver.succeed("yq -r '.logging.writers[0].format' /var/lib/mautrix-discord/config.yaml").strip()
reg_rate_limited = homeserver.succeed("yq -r '.rate_limited' /var/lib/mautrix-discord/discord-registration.yaml").strip()
assert config_homeserver_address == "http://homeserver:8008", \
f"Unexpected homeserver address: {config_homeserver_address}"
assert config_homeserver_domain == "homeserver", \
f"Unexpected homeserver domain: {config_homeserver_domain}"
assert config_appservice_address == "http://homeserver:8009", \
f"Unexpected appservice address: {config_appservice_address}"
assert config_appservice_hostname == "0.0.0.0", \
f"Unexpected appservice hostname: {config_appservice_hostname}"
assert config_appservice_port == "8009", \
f"Unexpected appservice port: {config_appservice_port}"
assert config_appservice_id == "discord", \
f"Unexpected appservice id: {config_appservice_id}"
assert config_bot_username == "discordbot", \
f"Unexpected bot username: {config_bot_username}"
assert config_bot_displayname == "Discord bridge bot", \
f"Unexpected bot displayname: {config_bot_displayname}"
assert config_bot_avatar == "mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC", \
f"Unexpected bot avatar: {config_bot_avatar}"
assert config_database_type == "sqlite3-fk-wal", \
f"Unexpected database type: {config_database_type}"
assert config_database_uri == "file:/var/lib/mautrix-discord/mautrix-discord.db?_txlock=immediate", \
f"Unexpected database uri: {config_database_uri}"
assert config_permission == "relay", \
f"Unexpected default permission mapping: {config_permission}"
assert config_logging_min_level == "info", \
f"Unexpected logging min_level: {config_logging_min_level}"
assert config_logging_writer_type == "stdout", \
f"Unexpected logging writer type: {config_logging_writer_type}"
assert config_logging_writer_format == "pretty-colored", \
f"Unexpected logging writer format: {config_logging_writer_format}"
assert reg_rate_limited == "false", \
f"Registration file should disable rate limiting by default, got: {reg_rate_limited}"
# Verify tokens were generated and are not default values
config_as_token = homeserver.succeed("yq -r '.appservice.as_token' /var/lib/mautrix-discord/config.yaml").strip()
config_hs_token = homeserver.succeed("yq -r '.appservice.hs_token' /var/lib/mautrix-discord/config.yaml").strip()

View File

@@ -45,7 +45,7 @@ assert (!blas.isILP64) && (!lapack.isILP64);
stdenv.mkDerivation (finalAttrs: {
pname = "R";
version = "4.5.3";
version = "4.6.0";
src =
let
@@ -53,7 +53,7 @@ stdenv.mkDerivation (finalAttrs: {
in
fetchurl {
url = "https://cran.r-project.org/src/base/R-${lib.versions.major version}/${pname}-${version}.tar.gz";
hash = "sha256-qlwe1Ck8cnGsUT1lRnA1asDopq1eQr4BQ2XREVC1uPI=";
hash = "sha256-uNybRUNmDHtZa4eTjfUyOUNQNgl2Un00QijuDtEuRew=";
};
outputs = [

View File

@@ -10,11 +10,14 @@
oniguruma,
openssl,
zlib,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "forgejo-cli";
version = "0.5.0";
__structuredAttrs = true;
src = fetchFromCodeberg {
owner = "forgejo-contrib";
repo = "forgejo-cli";
@@ -49,6 +52,10 @@ rustPlatform.buildRustPackage (finalAttrs: {
--zsh <($out/bin/fj completion zsh)
'';
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "version";
doInstallCheck = true;
meta = {
description = "CLI application for interacting with Forgejo";
homepage = "https://codeberg.org/forgejo-contrib/forgejo-cli";

View File

@@ -7,16 +7,16 @@
}:
php.buildComposerProject2 (finalAttrs: {
pname = "phpactor";
version = "2025.12.21.1";
version = "2026.05.30.1";
src = fetchFromGitHub {
owner = "phpactor";
repo = "phpactor";
tag = finalAttrs.version;
hash = "sha256-9hkYU/Mhxl49tIZa3Vyj3kXftNIgZXUlH1T6/4obM7I=";
hash = "sha256-Harrs0SM00MVBicMfvs3bcLQf/PSTp6k7hcEExGELWE=";
};
vendorHash = "sha256-XsybPL391WGHztWPaZAN1l2hWQMQ0tklZ9yjkKjGzsI=";
vendorHash = "sha256-PztP3qN6LL+1UshNyuJof0WT9Dg5MfXwfQr57kBG9hM=";
nativeBuildInputs = [ installShellFiles ];

View File

@@ -7,15 +7,15 @@
buildNpmPackage rec {
pname = "zwave-js-ui";
version = "11.19.0";
version = "11.19.1";
src = fetchFromGitHub {
owner = "zwave-js";
repo = "zwave-js-ui";
tag = "v${version}";
hash = "sha256-hn5Y5ADAybwSK5hv3J7qlyjPztD6QRB4oq9JTuLg9Vk=";
hash = "sha256-9dqvQxlk+DdYcpCgoLR8EqtgwJwMA4Dvtwc8n1K8Cic=";
};
npmDepsHash = "sha256-hHalQUYj2T6AnxU0/EcbobY5UxgwvaS2NAy95FASTCk=";
npmDepsHash = "sha256-dED08xcbgO3zfNRP9iNuTcL+73HnfBnwDrPCGY4TZBQ=";
passthru.tests.zwave-js-ui = nixosTests.zwave-js-ui;

View File

@@ -14,7 +14,7 @@
buildPythonPackage (finalAttrs: {
pname = "fastapi-pagination";
version = "0.15.13";
version = "0.15.14";
pyproject = true;
__structuredAttrs = true;
@@ -22,7 +22,7 @@ buildPythonPackage (finalAttrs: {
owner = "uriyyo";
repo = "fastapi-pagination";
tag = finalAttrs.version;
hash = "sha256-c+bXtc4MQdd+UlsBHtVL6F2lBu46yry9OTKsMbu1Mhw=";
hash = "sha256-W3SgSne3GgRl2W6l3NWUguvzxigLCVgMLiT/fMIWSAE=";
};
build-system = [

View File

@@ -2,6 +2,7 @@
lib,
buildPythonPackage,
fetchFromGitHub,
symlinkJoin,
# build-system
setuptools,
@@ -30,6 +31,7 @@
joblib,
# jsonpath-python,
nltk,
nltk-data,
olefile,
orderly-set,
python-dateutil,
@@ -118,6 +120,18 @@
}:
let
version = "0.18.31";
# unstructured downloads these NLTK corpora at import time unless they are already on
# nltk.data.path, which fails in offline or read-only builds. Bundle them and register
# the directory in postPatch. It must be named "nltk_data": unstructured's resolver
# uses paths ending in "nltk_data" as-is and appends "/nltk_data" to any others.
nltkData = symlinkJoin {
name = "nltk_data";
paths = with nltk-data; [
averaged-perceptron-tagger-eng
punkt-tab
];
};
in
buildPythonPackage rec {
pname = "unstructured";
@@ -133,6 +147,11 @@ buildPythonPackage rec {
build-system = [ setuptools ];
postPatch = ''
substituteInPlace unstructured/nlp/tokenize.py \
--replace-fail 'import nltk' 'import nltk; nltk.data.path.append("${nltkData}")'
'';
dependencies = [
# Base dependencies
anyio
@@ -257,10 +276,14 @@ buildPythonPackage rec {
];
};
pythonImportsCheck = [ "unstructured" ];
pythonImportsCheck = [
"unstructured"
# exercises the bundled NLTK corpora lookup, so the build catches an attempted download
"unstructured.nlp.tokenize"
];
# test try to download punkt from nltk
# figure out how to make it available to enable the tests
# the import-time NLTK download is handled via nltkData above, but the test suite has
# further offline/data requirements that are not yet verified, so keep it disabled.
doCheck = false;
nativeCheckInputs = [

View File

@@ -1,6 +1,6 @@
{
"extraArgs": {
"biocVersion": "3.22"
"biocVersion": "3.23"
},
"packages": {
"AHCytoBands": {
@@ -737,8 +737,8 @@
},
"BioMartGOGeneSets": {
"name": "BioMartGOGeneSets",
"version": "0.99.11",
"sha256": "1ack8v1q0zg15gs816n9f4pwrzrpsv4va6j0r8847pw0pvavwpiq",
"version": "0.99.12",
"sha256": "11x00v18vd5ppm9asg120dmhmqamzsacy64v3kmmxfn7rhxl25b2",
"depends": ["GenomicRanges", "S4Vectors"]
},
"CENTREannotation": {
@@ -749,8 +749,8 @@
},
"CTCF": {
"name": "CTCF",
"version": "0.99.13",
"sha256": "097w2rad5fxyg2dkghz6ws93q1l7hlc6f9dnw1n30gs2bdv5hbyb",
"version": "0.99.14",
"sha256": "06nyz5758mq04hzvc7bl0ld2d173zabs9xyhva01y92b19yy8nfp",
"depends": []
},
"ChemmineDrugs": {
@@ -887,14 +887,14 @@
},
"GO_db": {
"name": "GO.db",
"version": "3.22.0",
"sha256": "1liyl1ic2d08an0h6yxllggkv9n8vyp1bfjwvqzk5ana17lzmimf",
"version": "3.23.1",
"sha256": "0ays2n3jivigpr7m3y3rba8gjyqr7g3qxdslppww0z0zzm4m808z",
"depends": ["AnnotationDbi"]
},
"GeneSummary": {
"name": "GeneSummary",
"version": "0.99.6",
"sha256": "0h6afrjb00afrcw6mwslxp7cmwfzp4qfxh0aa4f41kfjd3cymmp5",
"version": "0.99.7",
"sha256": "0pl843r230cgq0nh5pwp19zz823dwdv789kfcgdhylijx3h2ymfk",
"depends": []
},
"GenomeInfoDbData": {
@@ -1241,8 +1241,8 @@
},
"Orthology_eg_db": {
"name": "Orthology.eg.db",
"version": "3.22.0",
"sha256": "14wng7izmr7wx3yimjlvmk87vf1z3z0n88y2nghn8a2iqci1rl3s",
"version": "3.23.0",
"sha256": "0640jwylw67cw8sylmyfcqm8cak5i2bx9k925bwm0bjmayxl8yw3",
"depends": ["AnnotationDbi"]
},
"PANTHER_db": {
@@ -1673,8 +1673,8 @@
},
"UniProtKeywords": {
"name": "UniProtKeywords",
"version": "0.99.7",
"sha256": "10id2lk2mbccay7p44pk58zhkiqc58x237qr76plivgpcc8xhjzq",
"version": "0.99.8",
"sha256": "1mhbhar70acwgjmlfkfrqc2hskqvbgsaf9xlzv8ph66x6gvbyqb7",
"depends": []
},
"XtraSNPlocs_Hsapiens_dbSNP144_GRCh37": {
@@ -2093,8 +2093,8 @@
},
"excluderanges": {
"name": "excluderanges",
"version": "0.99.10",
"sha256": "0j9njpnbh731ffimr1sbvix3wsivnh9nwxg6sbrpwp8gl0pnl7r0",
"version": "0.99.11",
"sha256": "1czr9hr84hzwa7fyzm51425nphy0b9h5yfvgkij5v8qgq565w02a",
"depends": ["GenomicRanges"]
},
"fitCons_UCSC_hg19": {
@@ -2513,8 +2513,8 @@
},
"hpAnnot": {
"name": "hpAnnot",
"version": "1.1.1",
"sha256": "0bkfcj9igi7ylhf3arszqnqzaxsxvfv2gn2smzx6ymzq5a8sc0yg",
"version": "1.1.3",
"sha256": "0gnir407flzzkkljxf2brqrw2kaycl8azi0wc5yn1fhl7x5zidq1",
"depends": ["AnnotationHub"]
},
"hs25kresogen_db": {
@@ -3749,20 +3749,20 @@
},
"org_Hs_eg_db": {
"name": "org.Hs.eg.db",
"version": "3.22.0",
"sha256": "0bia1ppxnyjpw4p3rk19q1l8rrcraccpz4w69f3ja0q0im0xrgfi",
"version": "3.23.1",
"sha256": "1zlwsk1hq40xi8xd7wc974jp8gky6x7icc9788ch77glbik201j7",
"depends": ["AnnotationDbi"]
},
"org_Mm_eg_db": {
"name": "org.Mm.eg.db",
"version": "3.22.0",
"sha256": "16liabdbkfqzhna3rw1zgf777r3xm8knrbvy0181c2nsn2jkxsv3",
"version": "3.23.0",
"sha256": "0i252737v6wk0im41gnksz4qkzf286kwgfq60yqc1mfva77m8yjh",
"depends": ["AnnotationDbi"]
},
"org_Mmu_eg_db": {
"name": "org.Mmu.eg.db",
"version": "3.22.0",
"sha256": "0ga0c9635pkigmr0l9vazh3qdpyxki1y8l7mbgcp1y8sfkyjn33c",
"version": "3.23.0",
"sha256": "08l4bckvn42yjgpkcmq87c1c2z4g8cfjc9jm5ibb84v5ffjw92ij",
"depends": ["AnnotationDbi"]
},
"org_Mxanthus_db": {
@@ -3779,14 +3779,14 @@
},
"org_Pt_eg_db": {
"name": "org.Pt.eg.db",
"version": "3.22.0",
"sha256": "1i67vccx3a6zak34nwdhrbhm7hkjz9qbai9jvwrlql6z8xc6n6q0",
"version": "3.23.0",
"sha256": "1hfvrv2n9gc0h4s6ql4lv8q8qjf75c4y5p2hlplhphzi38j54vhl",
"depends": ["AnnotationDbi"]
},
"org_Rn_eg_db": {
"name": "org.Rn.eg.db",
"version": "3.22.0",
"sha256": "0vqpmbivxd1yvapa5gz9mrxlk6ivrzak55dw2sfjm8sl308rmaj4",
"version": "3.23.0",
"sha256": "1j1gs8bk1a247shhs5z41s4pk6hw4ssy7405fv5q16m5ilpwgc1g",
"depends": ["AnnotationDbi"]
},
"org_Sc_sgd_db": {
@@ -3797,14 +3797,14 @@
},
"org_Ss_eg_db": {
"name": "org.Ss.eg.db",
"version": "3.22.0",
"sha256": "03qlbkvxfmdgpl8dwx72msd9asx12izvq2vmidqfyipyr7r79cbm",
"version": "3.23.0",
"sha256": "0ijn7dfh485lww1d9bp8j40fcjr1lx8vdnlq6ydwq3ni4bifkzqp",
"depends": ["AnnotationDbi"]
},
"org_Xl_eg_db": {
"name": "org.Xl.eg.db",
"version": "3.22.0",
"sha256": "1h8jvdzhpp9d4zaaczhmg6hk32p77l63v3095ln58rhy9m18pg0f",
"version": "3.23.0",
"sha256": "1w856a5hkp9a5g41nd69xwvzaf1nmq7zqjsn7w5p1i2zsxv1i1k1",
"depends": ["AnnotationDbi"]
},
"paeg1acdf": {
@@ -5111,8 +5111,8 @@
},
"reactome_db": {
"name": "reactome.db",
"version": "1.95.0",
"sha256": "1b87byr45cmqa7jyd5fw3askmrzfhdljjp2d7jcmm88baf45mfg6",
"version": "1.96.0",
"sha256": "0b43ri3clg6ynp197vy24936n762k0f43v9m51g1lar2w4qc2zhb",
"depends": ["AnnotationDbi"]
},
"rgu34a_db": {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -765,7 +765,9 @@ let
];
RGtk2 = [ pkgs.gtk2.dev ];
rhdf5 = [ pkgs.zlib ];
Rhdf5lib = with pkgs; [ zlib.dev ];
Rhdf5lib = with pkgs; [
cmake
];
Rhpc = with pkgs; [
zlib
bzip2.dev
@@ -821,7 +823,10 @@ let
rpanel = [ pkgs.tclPackages.bwidget ];
Rpoppler = [ pkgs.poppler ];
RPostgreSQL = with pkgs; [ libpq.pg_config ];
RProtoBuf = [ pkgs.protobuf ];
RProtoBuf = with pkgs; [
protobuf
abseil-cpp.dev
];
rsamplr = with pkgs; [
cargo
rustc
@@ -865,6 +870,10 @@ let
cargo
rustc
];
tinyimg = with pkgs; [
cargo
rustc
];
caugi = with pkgs; [
cargo
rustc
@@ -966,6 +975,7 @@ let
fontconfig.dev
freetype.dev
];
rlas = [ pkgs.pkg-config ];
TAQMNGR = [ pkgs.zlib.dev ];
TDA = [ pkgs.gmp ];
tesseract = with pkgs; [
@@ -1227,10 +1237,16 @@ let
xz.dev
zlib.dev
];
fs = [ pkgs.libuv ];
pgenlibr = [ pkgs.zlib.dev ];
fftw = [ pkgs.pkg-config ];
gdtools = [ pkgs.pkg-config ];
archive = [ pkgs.libarchive ];
lpsymphony = with pkgs; [
symphony
cgl
clp
];
gdalcubes = with pkgs; [
proj.dev
gdal
@@ -1251,6 +1267,10 @@ let
fftw.dev
pkg-config
];
Rhdf5lib = with pkgs; [
curl
zlib.dev
];
GRAB = [ pkgs.zlib.dev ];
jqr = [ pkgs.jq.out ];
kza = [ pkgs.pkg-config ];
@@ -1541,7 +1561,13 @@ let
redux = [ pkgs.hiredis ];
RmecabKo = [ pkgs.mecab ];
markets = [ pkgs.gsl ];
rlas = [ pkgs.boost ];
rlas = with pkgs; [
boost
gdal
proj
sqlite
geos
];
bgx = [ pkgs.boost ];
PoissonBinomial = [ pkgs.fftw.dev ];
poisbinom = [ pkgs.fftw.dev ];
@@ -1947,6 +1973,10 @@ let
postPatch = "patchShebangs configure";
});
fixest = old.fixest.overrideAttrs (attrs: {
postPatch = "patchShebangs configure";
});
arcgisplaces = old.arcgisplaces.overrideAttrs (attrs: {
postPatch = "patchShebangs configure";
});
@@ -1979,6 +2009,10 @@ let
postPatch = "patchShebangs configure";
});
ramr = old.ramr.overrideAttrs (attrs: {
postPatch = "patchShebangs configure";
});
roxigraph = old.roxigraph.overrideAttrs (attrs: {
env = (attrs.env or { }) // {
LIBCLANG_PATH = "${lib.getLib pkgs.libclang}/lib";
@@ -2440,6 +2474,10 @@ let
'';
});
RProtoBuf = old.RProtoBuf.overrideAttrs (attrs: {
configureFlags = [ "ac_cv_prog_cxx_cxx11=" ];
});
JavaGD = old.JavaGD.overrideAttrs (attrs: {
preConfigure = ''
export JAVA_CPPFLAGS=-I${pkgs.jdk}/include/
@@ -2948,7 +2986,10 @@ let
);
lpsymphony = old.lpsymphony.overrideAttrs (attrs: {
preConfigure = ''
postPatch = ''
substituteInPlace configure \
--replace-fail '--libs SYMPHONY' '--libs symphony' \
--replace-fail '--cflags SYMPHONY' '--cflags symphony'
patchShebangs configure
'';
});
@@ -3108,7 +3149,13 @@ let
Rhdf5lib =
let
hdf5 = pkgs.hdf5_1_10;
hdf5 = pkgs.hdf5.overrideAttrs (attrs: {
cmakeFlags = attrs.cmakeFlags ++ [ "-DHDF5_ENABLE_ROS3_VFD:BOOL=TRUE" ];
buildInputs = attrs.buildInputs ++ [ pkgs.curl.dev ];
postInstall = attrs.postInstall or "" + ''
cp src/libhdf5.settings $dev/lib
'';
});
in
old.Rhdf5lib.overrideAttrs (attrs: {
propagatedBuildInputs = attrs.propagatedBuildInputs ++ [

View File

@@ -1,8 +1,8 @@
diff --git a/R/zzz.R b/R/zzz.R
index 97becd7..803ca39 100644
index 2af2b3e..21ddc00 100644
--- a/R/zzz.R
+++ b/R/zzz.R
@@ -20,7 +20,7 @@ pkgconfig <- function(opt = c("PKG_CXX_LIBS", "PKG_C_LIBS", "PKG_CXX_HL_LIBS", "
@@ -22,7 +22,7 @@ pkgconfig <- function(opt = c("PKG_CXX_LIBS", "PKG_C_LIBS", "PKG_CXX_HL_LIBS", "
path <- Sys.getenv(
x = "RHDF5LIB_RPATH",
@@ -10,70 +10,48 @@ index 97becd7..803ca39 100644
+ unset = ""
)
if (nzchar(.Platform$r_arch)) {
@@ -59,7 +59,7 @@ pkgconfig <- function(opt = c("PKG_CXX_LIBS", "PKG_C_LIBS", "PKG_CXX_HL_LIBS", "
sprintf('-L%s -lhdf5 %s',
sysname <- Sys.info()['sysname']
@@ -47,7 +47,7 @@ pkgconfig <- function(opt = c("PKG_CXX_LIBS", "PKG_C_LIBS", "PKG_CXX_HL_LIBS", "
sprintf('-L%s -lhdf5 %s',
patharch, winlibs)
}, {
- sprintf('"%s/libhdf5.a"%s%s',
+ sprintf('-lhdf5',
patharch, .getSzipLoc(patharch), .getDynamicLinks())
+ sprintf('-lhdf5',
patharch, .getSzipLoc(patharch), .getDynamicLinks(patharch))
}
)
@@ -70,7 +70,7 @@ pkgconfig <- function(opt = c("PKG_CXX_LIBS", "PKG_C_LIBS", "PKG_CXX_HL_LIBS", "
sprintf('-L%s -lhdf5_cpp -lhdf5 %s',
@@ -58,7 +58,7 @@ pkgconfig <- function(opt = c("PKG_CXX_LIBS", "PKG_C_LIBS", "PKG_CXX_HL_LIBS", "
sprintf('-L%s -lhdf5_cpp -lhdf5 %s',
patharch, winlibs)
}, {
- sprintf('"%s/libhdf5_cpp.a" "%s/libhdf5.a"%s%s',
+ sprintf('-lhdf5_cpp -lhdf5',
patharch, patharch, .getSzipLoc(patharch), .getDynamicLinks())
patharch, patharch, .getSzipLoc(patharch), .getDynamicLinks(patharch))
}
)
@@ -81,7 +81,7 @@ pkgconfig <- function(opt = c("PKG_CXX_LIBS", "PKG_C_LIBS", "PKG_CXX_HL_LIBS", "
sprintf('-L%s -lhdf5_hl -lhdf5 %s',
@@ -69,7 +69,7 @@ pkgconfig <- function(opt = c("PKG_CXX_LIBS", "PKG_C_LIBS", "PKG_CXX_HL_LIBS", "
sprintf('-L%s -lhdf5_hl -lhdf5 %s',
patharch, winlibs)
}, {
- sprintf('"%s/libhdf5_hl.a" "%s/libhdf5.a"%s%s',
+ sprintf('-lhdf5_hl -lhdf5',
patharch, patharch, .getSzipLoc(patharch), .getDynamicLinks())
+ sprintf('-lhdf5_hl -lhdf5',
patharch, patharch, .getSzipLoc(patharch), .getDynamicLinks(patharch))
}
)
@@ -92,7 +92,7 @@ pkgconfig <- function(opt = c("PKG_CXX_LIBS", "PKG_C_LIBS", "PKG_CXX_HL_LIBS", "
sprintf('-L%s -lhdf5_hl_cpp -lhdf5_hl -lhdf5_cpp -lhdf5 %s',
@@ -80,7 +80,7 @@ pkgconfig <- function(opt = c("PKG_CXX_LIBS", "PKG_C_LIBS", "PKG_CXX_HL_LIBS", "
sprintf('-L%s -lhdf5_hl_cpp -lhdf5_hl -lhdf5_cpp -lhdf5 %s',
patharch, winlibs)
}, {
- sprintf('"%s/libhdf5_hl_cpp.a" "%s/libhdf5_hl.a" "%s/libhdf5_cpp.a" "%s/libhdf5.a"%s%s',
+ sprintf('-lhdf5_hl_cpp -lhdf5_hl -lhdf5_cpp -lhdf5',
patharch, patharch, patharch, patharch, .getSzipLoc(patharch), .getDynamicLinks())
patharch, patharch, patharch, patharch, .getSzipLoc(patharch), .getDynamicLinks(patharch))
}
)
@@ -124,6 +124,7 @@ getHdf5Version <- function() {
#'
@@ -113,6 +113,7 @@ getHdf5Version <- function() {
#' @noRd
#' @keywords internal
.getDynamicLinks <- function() {
.getDynamicLinks <- function(path) {
+ return("")
sysname <- Sys.info()['sysname']
if(sysname == "Windows") {
links <- "-lz"
diff --git a/src/Makevars.in b/src/Makevars.in
index addb6a0..590784a 100644
--- a/src/Makevars.in
+++ b/src/Makevars.in
@@ -18,7 +18,7 @@ USER_LIB_DIR = ${R_PACKAGE_DIR}/lib${R_ARCH}/
PKG_CPPFLAGS = -I${USER_INCLUDE_DIR} ${ZLIB_INCLUDE}
PKG_CFLAGS = ${ZLIB_LIB}
-PKG_LIBS = "${USER_LIB_DIR}libhdf5.a" @SZIP_LIB@ -lz
+PKG_LIBS = -lhdf5 -lsz
@@ -26,7 +26,7 @@ all: $(SHLIB)
$(SHLIB): Rhdf5lib.o
-Rhdf5lib.o: copy-hdf5 @COPY_SZIP@
+Rhdf5lib.o:
copy-szip: copy-hdf5
cp hdf5/libaec-1.0.4/build/szip/lib/libsz.a "${USER_LIB_DIR}"
settings_file <- file.path(path, "libhdf5.settings")
libhdf5_settings <- readLines(settings_file)
libstr <- grep("Extra libraries", x = libhdf5_settings, fixed = TRUE, value = TRUE) |>

View File

@@ -9,39 +9,3 @@ index 713b44c..704ac17 100644
#PKG_CFLAGS = -Wall
diff --git a/src/h5testLock.c b/src/h5testLock.c
index b326444..5d58b4a 100644
--- a/src/h5testLock.c
+++ b/src/h5testLock.c
@@ -8,16 +8,16 @@ SEXP _h5fileLock(SEXP _file_name) {
int lk = -1;
/* create the temporary file */
- fd = HDopen(file_name, O_RDWR | O_CREAT | O_TRUNC, 0666);
+ fd = open(file_name, O_RDWR | O_CREAT | O_TRUNC, 0666);
/* try to lock file */
- lk = HDflock(fd, LOCK_EX | LOCK_NB);
+ lk = flock(fd, LOCK_EX | LOCK_NB);
/* unlock so we can remove */
- HDflock(fd, LOCK_UN);
+ flock(fd, LOCK_UN);
/* close */
- HDclose(fd);
+ close(fd);
/* return value of lock attempt */
PROTECT(Rval = allocVector(INTSXP, 1));
diff --git a/src/h5testLock.h b/src/h5testLock.h
index 2c1c5e4..25914ff 100644
--- a/src/h5testLock.h
+++ b/src/h5testLock.h
@@ -1,5 +1,5 @@
#include <fcntl.h>
+#include <unistd.h>
#include "myhdf5.h"
-#include <H5private.h>
SEXP _h5fileLock();

View File

@@ -13,13 +13,13 @@
postgresqlBuildExtension (finalAttrs: {
pname = "plr";
version = "8.4.8";
version = "8.4.8.6";
src = fetchFromGitHub {
owner = "postgres-plr";
repo = "plr";
tag = "REL${lib.replaceString "." "_" finalAttrs.version}";
hash = "sha256-FLL61HsZ6WaWBP9NqrJjhMFSVyVBIpVO0wv+kXMuAaU=";
hash = "sha256-SBLv9GsyYmYdxrWmGiMIiFRGl5FA+j2RcSmKz9pMv2E=";
};
nativeBuildInputs = [ pkg-config ];