Merge master into staging-next

authored by nixpkgs-ci[bot] and committed by GitHub 4339ec5d 7e4f0fbf

+840 -156
+9
nixos/doc/manual/redirects.json
··· 749 749 "module-services-davis-basic-usage": [ 750 750 "index.html#module-services-davis-basic-usage" 751 751 ], 752 + "module-services-draupnir": [ 753 + "index.html#module-services-draupnir" 754 + ], 755 + "module-services-draupnir-setup": [ 756 + "index.html#module-services-draupnir-setup" 757 + ], 758 + "module-services-draupnir-setup-ems": [ 759 + "index.html#module-services-draupnir-setup-ems" 760 + ], 752 761 "module-services-castopod": [ 753 762 "index.html#module-services-castopod" 754 763 ],
+2
nixos/doc/manual/release-notes/rl-2511.section.md
··· 22 22 23 23 - [Broadcast Box](https://github.com/Glimesh/broadcast-box), a WebRTC broadcast server. Available as [services.broadcast-box](options.html#opt-services.broadcast-box.enable). 24 24 25 + - [Draupnir](https://github.com/the-draupnir-project/draupnir), a Matrix moderation bot. Available as [services.draupnir](#opt-services.draupnir.enable). 26 + 25 27 - [SuiteNumérique Docs](https://github.com/suitenumerique/docs), a collaborative note taking, wiki and documentation web platform and alternative to Notion or Outline. Available as [services.lasuite-docs](#opt-services.lasuite-docs.enable). 26 28 27 29 [dwl](https://codeberg.org/dwl/dwl), a compact, hackable compositor for Wayland based on wlroots. Available as [programs.dwl](#opt-programs.dwl.enable).
+1
nixos/modules/module-list.nix
··· 758 758 ./services/matrix/conduit.nix 759 759 ./services/matrix/continuwuity.nix 760 760 ./services/matrix/dendrite.nix 761 + ./services/matrix/draupnir.nix 761 762 ./services/matrix/hebbot.nix 762 763 ./services/matrix/hookshot.nix 763 764 ./services/matrix/lk-jwt-service.nix
+62
nixos/modules/services/matrix/draupnir.md
··· 1 + # Draupnir (Matrix Moderation Bot) {#module-services-draupnir} 2 + 3 + This chapter will show you how to set up your own, self-hosted 4 + [Draupnir](https://github.com/the-draupnir-project/Draupnir) instance. 5 + 6 + As an all-in-one moderation tool, it can protect your server from 7 + malicious invites, spam messages, and whatever else you don't want. 8 + In addition to server-level protection, Draupnir is great for communities 9 + wanting to protect their rooms without having to use their personal 10 + accounts for moderation. 11 + 12 + The bot by default includes support for bans, redactions, anti-spam, 13 + server ACLs, room directory changes, room alias transfers, account 14 + deactivation, room shutdown, and more. (This depends on homeserver configuration and implementation.) 15 + 16 + See the [README](https://github.com/the-draupnir-project/draupnir#readme) 17 + page and the [Moderator's guide](https://the-draupnir-project.github.io/draupnir-documentation/moderator/setting-up-and-configuring) 18 + for additional instructions on how to setup and use Draupnir. 19 + 20 + For [additional settings](#opt-services.draupnir.settings) 21 + see [the default configuration](https://github.com/the-draupnir-project/Draupnir/blob/main/config/default.yaml). 22 + 23 + ## Draupnir Setup {#module-services-draupnir-setup} 24 + 25 + First create a new unencrypted, private room which will be used as the management room for Draupnir. 26 + This is the room in which moderators will interact with Draupnir and where it will log possible errors and debugging information. 27 + You'll need to set this room ID or alias in [services.draupnir.settings.managementRoom](#opt-services.draupnir.settings.managementRoom). 28 + 29 + Next, create a new user for Draupnir on your homeserver, if one does not already exist. 30 + 31 + The Draupnir Matrix user expects to be free of any rate limiting. 32 + See [Synapse #6286](https://github.com/matrix-org/synapse/issues/6286) 33 + for an example on how to achieve this. 34 + 35 + If you want Draupnir to be able to deactivate users, move room aliases, shut down rooms, etc. 36 + you'll need to make the Draupnir user a Matrix server admin. 37 + 38 + Now invite the Draupnir user to the management room. 39 + Draupnir will automatically try to join this room on startup. 40 + 41 + ```nix 42 + { 43 + services.draupnir = { 44 + enable = true; 45 + 46 + settings = { 47 + homeserverUrl = "https://matrix.org"; 48 + managementRoom = "!yyy:example.org"; 49 + }; 50 + 51 + secrets = { 52 + accessToken = "/path/to/secret/containing/access-token"; 53 + }; 54 + }; 55 + } 56 + ``` 57 + 58 + ### Element Matrix Services (EMS) {#module-services-draupnir-setup-ems} 59 + 60 + If you are using a managed ["Element Matrix Services (EMS)"](https://ems.element.io/) 61 + server, you will need to consent to the terms and conditions. Upon startup, an error 62 + log entry with a URL to the consent page will be generated.
+257
nixos/modules/services/matrix/draupnir.nix
··· 1 + { 2 + config, 3 + options, 4 + lib, 5 + pkgs, 6 + ... 7 + }: 8 + 9 + let 10 + cfg = config.services.draupnir; 11 + opt = options.services.draupnir; 12 + 13 + format = pkgs.formats.yaml { }; 14 + configFile = format.generate "draupnir.yaml" cfg.settings; 15 + 16 + inherit (lib) 17 + literalExpression 18 + mkEnableOption 19 + mkOption 20 + mkPackageOption 21 + mkRemovedOptionModule 22 + mkRenamedOptionModule 23 + types 24 + ; 25 + in 26 + { 27 + imports = [ 28 + # Removed options for those migrating from the Mjolnir module 29 + (mkRenamedOptionModule 30 + [ "services" "draupnir" "dataPath" ] 31 + [ "services" "draupnir" "settings" "dataPath" ] 32 + ) 33 + (mkRenamedOptionModule 34 + [ "services" "draupnir" "homeserverUrl" ] 35 + [ "services" "draupnir" "settings" "homeserverUrl" ] 36 + ) 37 + (mkRenamedOptionModule 38 + [ "services" "draupnir" "managementRoom" ] 39 + [ "services" "draupnir" "settings" "managementRoom" ] 40 + ) 41 + (mkRenamedOptionModule 42 + [ "services" "draupnir" "accessTokenFile" ] 43 + [ "services" "draupnir" "secrets" "accessToken" ] 44 + ) 45 + (mkRemovedOptionModule [ "services" "draupnir" "pantalaimon" ] '' 46 + `services.draupnir.pantalaimon.*` has been removed because it depends on the deprecated and vulnerable 47 + libolm library for end-to-end encryption and upstream support for Pantalaimon in Draupnir is limited. 48 + See <https://the-draupnir-project.github.io/draupnir-documentation/bot/encryption> for details. 49 + If you nontheless require E2EE via Pantalaimon, you can configure `services.pantalaimon-headless.instances` 50 + yourself and use that with `services.draupnir.settings.pantalaimon` and `services.draupnir.secrets.pantalaimon.password`. 51 + '') 52 + ]; 53 + 54 + options.services.draupnir = { 55 + enable = mkEnableOption "Draupnir, a moderations bot for Matrix"; 56 + 57 + package = mkPackageOption pkgs "draupnir" { }; 58 + 59 + settings = mkOption { 60 + example = literalExpression '' 61 + { 62 + homeserverUrl = "https://matrix.org"; 63 + managementRoom = "#moderators:example.org"; 64 + 65 + autojoinOnlyIfManager = true; 66 + automaticallyRedactForReasons = [ "spam" "advertising" ]; 67 + } 68 + ''; 69 + description = '' 70 + Free-form settings written to Draupnir's configuration file. 71 + See [Draupnir's default configuration](https://github.com/the-draupnir-project/Draupnir/blob/main/config/default.yaml) for available settings. 72 + ''; 73 + default = { }; 74 + type = types.submodule { 75 + freeformType = format.type; 76 + options = { 77 + homeserverUrl = mkOption { 78 + type = types.str; 79 + example = "https://matrix.org"; 80 + description = '' 81 + Base URL of the Matrix homeserver that provides the Client-Server API. 82 + 83 + ::: {.note} 84 + When using Pantalaimon, set this to the Pantalaimon URL and 85 + {option}`${opt.settings}.rawHomeserverUrl` to the public URL. 86 + ::: 87 + ''; 88 + }; 89 + 90 + rawHomeserverUrl = mkOption { 91 + type = types.str; 92 + example = "https://matrix.org"; 93 + default = cfg.settings.homeserverUrl; 94 + defaultText = literalExpression "config.${opt.settings}.homeserverUrl"; 95 + description = '' 96 + Public base URL of the Matrix homeserver that provides the Client-Server API when using the Draupnir's 97 + [Report forwarding feature](https://the-draupnir-project.github.io/draupnir-documentation/bot/homeserver-administration#report-forwarding). 98 + 99 + ::: {.warning} 100 + When using Pantalaimon, do not set this to the Pantalaimon URL! 101 + ::: 102 + ''; 103 + }; 104 + 105 + managementRoom = mkOption { 106 + type = types.str; 107 + example = "#moderators:example.org"; 108 + description = '' 109 + The room ID or alias where moderators can use the bot's functionality. 110 + 111 + The bot has no access controls, so anyone in this room can use the bot - secure this room! 112 + Do not enable end-to-end encryption for this room, unless set up with Pantalaimon. 113 + 114 + ::: {.warning} 115 + When using a room alias, make sure the alias used is on the local homeserver! 116 + This prevents an issue where the control room becomes undefined when the alias can't be resolved. 117 + ::: 118 + ''; 119 + }; 120 + 121 + dataPath = mkOption { 122 + type = types.path; 123 + readOnly = true; 124 + default = "/var/lib/draupnir"; 125 + description = '' 126 + The path Draupnir will store its state/data in. 127 + 128 + ::: {.warning} 129 + This option is read-only. 130 + ::: 131 + 132 + ::: {.note} 133 + If you want to customize where this data is stored, use a bind mount. 134 + ::: 135 + ''; 136 + }; 137 + }; 138 + }; 139 + }; 140 + 141 + secrets = { 142 + accessToken = mkOption { 143 + type = types.nullOr types.path; 144 + default = null; 145 + description = '' 146 + File containing the access token for Draupnir's Matrix account 147 + to be used in place of {option}`${opt.settings}.accessToken`. 148 + ''; 149 + }; 150 + 151 + pantalaimon.password = mkOption { 152 + type = types.nullOr types.path; 153 + default = null; 154 + description = '' 155 + File containing the password for Draupnir's Matrix account when used in 156 + conjunction with Pantalaimon to be used in place of 157 + {option}`${opt.settings}.pantalaimon.password`. 158 + 159 + ::: {.warning} 160 + Take note that upstream has limited Pantalaimon and E2EE support: 161 + <https://the-draupnir-project.github.io/draupnir-documentation/bot/encryption> and 162 + <https://the-draupnir-project.github.io/draupnir-documentation/shared/dogfood#e2ee-support>. 163 + ::: 164 + ''; 165 + }; 166 + 167 + web.synapseHTTPAntispam.authorization = mkOption { 168 + type = types.nullOr types.path; 169 + default = null; 170 + description = '' 171 + File containing the secret token when using the Synapse HTTP Antispam module 172 + to be used in place of 173 + {option}`${opt.settings}.web.synapseHTTPAntispam.authorization`. 174 + 175 + See <https://the-draupnir-project.github.io/draupnir-documentation/bot/synapse-http-antispam> for details. 176 + ''; 177 + }; 178 + }; 179 + }; 180 + 181 + config = lib.mkIf cfg.enable { 182 + assertions = [ 183 + { 184 + # Removed option for those migrating from the Mjolnir module - mkRemovedOption module does *not* work with submodules. 185 + assertion = !(cfg.settings ? protectedRooms); 186 + message = "Unset ${opt.settings}.protectedRooms, as it is unsupported on Draupnir. Add these rooms via `!draupnir rooms add` instead."; 187 + } 188 + ]; 189 + 190 + systemd.services.draupnir = { 191 + description = "Draupnir - a moderation bot for Matrix"; 192 + wants = [ 193 + "network-online.target" 194 + "matrix-synapse.service" 195 + "conduit.service" 196 + "dendrite.service" 197 + ]; 198 + after = [ 199 + "network-online.target" 200 + "matrix-synapse.service" 201 + "conduit.service" 202 + "dendrite.service" 203 + ]; 204 + wantedBy = [ "multi-user.target" ]; 205 + 206 + startLimitIntervalSec = 0; 207 + serviceConfig = { 208 + ExecStart = toString ( 209 + [ 210 + (lib.getExe cfg.package) 211 + "--draupnir-config" 212 + configFile 213 + ] 214 + ++ lib.optionals (cfg.secrets.accessToken != null) [ 215 + "--access-token-path" 216 + "%d/access_token" 217 + ] 218 + ++ lib.optionals (cfg.secrets.pantalaimon.password != null) [ 219 + "--pantalaimon-password-path" 220 + "%d/pantalaimon_password" 221 + ] 222 + ++ lib.optionals (cfg.secrets.web.synapseHTTPAntispam.authorization != null) [ 223 + "--http-antispam-authorization-path" 224 + "%d/http_antispam_authorization" 225 + ] 226 + ); 227 + 228 + WorkingDirectory = "/var/lib/draupnir"; 229 + StateDirectory = "draupnir"; 230 + StateDirectoryMode = "0700"; 231 + ProtectHome = true; 232 + PrivateDevices = true; 233 + Restart = "on-failure"; 234 + RestartSec = "5s"; 235 + DynamicUser = true; 236 + LoadCredential = 237 + lib.optionals (cfg.secrets.accessToken != null) [ 238 + "access_token:${cfg.secrets.accessToken}" 239 + ] 240 + ++ lib.optionals (cfg.secrets.pantalaimon.password != null) [ 241 + "pantalaimon_password:${cfg.secrets.pantalaimon.password}" 242 + ] 243 + ++ lib.optionals (cfg.secrets.web.synapseHTTPAntispam.authorization != null) [ 244 + "http_antispam_authorization:${cfg.secrets.web.synapseHTTPAntispam.authorization}" 245 + ]; 246 + }; 247 + }; 248 + }; 249 + 250 + meta = { 251 + doc = ./draupnir.md; 252 + maintainers = with lib.maintainers; [ 253 + RorySys 254 + emilylange 255 + ]; 256 + }; 257 + }
+1
nixos/tests/all-tests.nix
··· 409 409 domination = runTest ./domination.nix; 410 410 dovecot = handleTest ./dovecot.nix { }; 411 411 drawterm = discoverTests (import ./drawterm.nix); 412 + draupnir = runTest ./matrix/draupnir.nix; 412 413 drbd = runTest ./drbd.nix; 413 414 druid = handleTestOn [ "x86_64-linux" ] ./druid { }; 414 415 drupal = runTest ./drupal.nix;
+150
nixos/tests/matrix/draupnir.nix
··· 1 + { 2 + lib, 3 + ... 4 + }: 5 + 6 + { 7 + name = "draupnir"; 8 + meta.maintainers = with lib.maintainers; [ 9 + RorySys 10 + emilylange 11 + ]; 12 + 13 + nodes = { 14 + homeserver = 15 + { pkgs, ... }: 16 + { 17 + services.matrix-synapse = { 18 + enable = true; 19 + log.root.level = "WARNING"; 20 + settings = { 21 + database.name = "sqlite3"; 22 + registration_shared_secret = "supersecret-registration"; 23 + 24 + listeners = [ 25 + { 26 + bind_addresses = [ 27 + "::" 28 + ]; 29 + port = 8008; 30 + resources = [ 31 + { 32 + compress = true; 33 + names = [ "client" ]; 34 + } 35 + { 36 + compress = false; 37 + names = [ "federation" ]; 38 + } 39 + ]; 40 + tls = false; 41 + type = "http"; 42 + x_forwarded = false; 43 + } 44 + ]; 45 + }; 46 + }; 47 + 48 + specialisation.draupnir = { 49 + inheritParentConfig = true; 50 + 51 + configuration.services.draupnir = { 52 + enable = true; 53 + settings = { 54 + homeserverUrl = "http://localhost:8008"; 55 + managementRoom = "#moderators:homeserver"; 56 + }; 57 + secrets = { 58 + accessToken = "/tmp/draupnir-access-token"; 59 + }; 60 + }; 61 + }; 62 + 63 + environment.systemPackages = with pkgs; [ 64 + curl 65 + jq 66 + (writers.writePython3Bin "test_draupnir_in_matrix" 67 + { 68 + libraries = [ python3Packages.matrix-nio ]; 69 + flakeIgnore = [ "E501" ]; 70 + } 71 + '' 72 + import asyncio 73 + from nio import AsyncClient, MatrixRoom, RoomMemberEvent, RoomMessageNotice 74 + 75 + 76 + async def main() -> None: 77 + client = AsyncClient("http://localhost:8008", "moderator") 78 + 79 + async def member_callback(room: MatrixRoom, event: RoomMemberEvent) -> None: 80 + if event.membership == "join" and event.sender == "@draupnir:homeserver": 81 + await client.room_send( 82 + room_id=room.room_id, 83 + message_type="m.room.message", 84 + content={ 85 + "msgtype": "m.text", 86 + "body": "!draupnir status" 87 + } 88 + ) 89 + 90 + async def message_callback(room: MatrixRoom, event: RoomMessageNotice) -> None: 91 + print(f"{event.sender}: {event.body}") 92 + if event.sender == "@draupnir:homeserver": 93 + await client.close() 94 + exit(0) 95 + 96 + client.add_event_callback(member_callback, RoomMemberEvent) 97 + client.add_event_callback(message_callback, RoomMessageNotice) 98 + 99 + print(await client.login("password")) 100 + 101 + room = await client.room_create( 102 + name="Moderators", 103 + alias="moderators", 104 + invite=["@draupnir:homeserver"], 105 + power_level_override={ 106 + "users": { 107 + "@draupnir:homeserver": 100, 108 + "@moderator:homeserver": 100, 109 + } 110 + } 111 + ) 112 + print(room) 113 + 114 + print(await client.join(room.room_id)) 115 + 116 + await client.sync_forever(timeout=30000) 117 + 118 + 119 + asyncio.run(main()) 120 + '' 121 + ) 122 + ]; 123 + }; 124 + }; 125 + 126 + testScript = 127 + { nodes, ... }: 128 + '' 129 + import json 130 + 131 + homeserver.wait_for_unit("matrix-synapse.service") 132 + homeserver.wait_until_succeeds("curl --fail -L http://localhost:8008/") 133 + 134 + homeserver.succeed("matrix-synapse-register_new_matrix_user -u draupnir -p password --no-admin") 135 + homeserver.succeed("matrix-synapse-register_new_matrix_user -u moderator -p password --no-admin") 136 + 137 + # get draupnir access token 138 + payload = json.dumps({ "type": "m.login.password", "user": "draupnir", "password": "password" }) 139 + homeserver.succeed( 140 + f"curl --fail --json '{payload}' http://localhost:8008/_matrix/client/v3/login" 141 + + " | jq -r .access_token" 142 + + " | tee /tmp/draupnir-access-token" 143 + ) 144 + 145 + homeserver.succeed("${nodes.homeserver.system.build.toplevel}/specialisation/draupnir/bin/switch-to-configuration test") 146 + homeserver.wait_for_unit("draupnir.service") 147 + 148 + print(homeserver.succeed("test_draupnir_in_matrix >&2", timeout=60)) 149 + ''; 150 + }
+5 -1
pkgs/by-name/dr/draupnir/package.nix
··· 12 12 fetchYarnDeps, 13 13 stdenv, 14 14 cctools, 15 + nixosTests, 15 16 }: 16 17 17 18 # docs: https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/javascript.section.md#yarn2nix-javascript-yarn2nix ··· 95 96 96 97 distPhase = "true"; 97 98 98 - passthru.updateScript = ./update.sh; 99 + passthru = { 100 + tests = { inherit (nixosTests) draupnir; }; 101 + updateScript = ./update.sh; 102 + }; 99 103 100 104 meta = with lib; { 101 105 description = "Moderation tool for Matrix";
+2 -2
pkgs/by-name/ex/exploitdb/package.nix
··· 7 7 8 8 stdenv.mkDerivation rec { 9 9 pname = "exploitdb"; 10 - version = "2025-05-30"; 10 + version = "2025-06-06"; 11 11 12 12 src = fetchFromGitLab { 13 13 owner = "exploit-database"; 14 14 repo = "exploitdb"; 15 15 rev = "refs/tags/${version}"; 16 - hash = "sha256-X90stp4BiHOHoh030eqGeUGiWytF5ryY08/VYEsbnIw="; 16 + hash = "sha256-DOzhxZZ66p49tECn0z1lGSNHq3GEpEbayhwsiJ6IGG4="; 17 17 }; 18 18 19 19 nativeBuildInputs = [ makeWrapper ];
+34
pkgs/by-name/so/solarus-launcher/github-fetches.patch
··· 1 + diff --git a/CMakeLists.txt b/CMakeLists.txt 2 + index 80b9aab..e56ca84 100644 3 + --- a/CMakeLists.txt 4 + +++ b/CMakeLists.txt 5 + @@ -88,8 +88,7 @@ include(FetchContent) 6 + 7 + # Qlementine Icons: an SVG icon library made for Qt. 8 + FetchContent_Declare(qlementine-icons 9 + - GIT_REPOSITORY "https://github.com/oclero/qlementine-icons.git" 10 + - GIT_TAG v1.8.0 11 + + SOURCE_DIR "@qlementine-icons-src@" 12 + ) 13 + FetchContent_MakeAvailable(qlementine-icons) 14 + set_target_properties(qlementine-icons 15 + @@ -99,8 +98,7 @@ set_target_properties(qlementine-icons 16 + 17 + # Qlementine: the QStyle library to have a modern look n' feel. 18 + FetchContent_Declare(qlementine 19 + - GIT_REPOSITORY "https://github.com/oclero/qlementine.git" 20 + - GIT_TAG v1.2.0 21 + + SOURCE_DIR "@qlementine-src@" 22 + ) 23 + FetchContent_MakeAvailable(qlementine) 24 + set_target_properties(qlementine 25 + @@ -109,8 +107,7 @@ set_target_properties(qlementine 26 + ) 27 + 28 + FetchContent_Declare(QtAppInstanceManager 29 + - GIT_REPOSITORY "https://github.com/oclero/qtappinstancemanager.git" 30 + - GIT_TAG v1.3.0 31 + + SOURCE_DIR "@qtappinstancemanager-src@" 32 + ) 33 + FetchContent_MakeAvailable(QtAppInstanceManager) 34 + set_target_properties(QtAppInstanceManager
+109
pkgs/by-name/so/solarus-launcher/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitLab, 5 + fetchFromGitHub, 6 + replaceVars, 7 + cmake, 8 + ninja, 9 + luajit, 10 + SDL2, 11 + SDL2_image, 12 + SDL2_ttf, 13 + physfs, 14 + openal, 15 + libmodplug, 16 + libvorbis, 17 + solarus, 18 + glm, 19 + qt6Packages, 20 + kdePackages, 21 + }: 22 + 23 + let 24 + qlementine-icons-src = fetchFromGitHub { 25 + owner = "oclero"; 26 + repo = "qlementine-icons"; 27 + tag = "v1.8.0"; 28 + hash = "sha256-FPndzMEOQvYNYUbT2V6iDlwoYqOww38GW/T3zUID3g0="; 29 + }; 30 + 31 + qlementine-src = fetchFromGitHub { 32 + owner = "oclero"; 33 + repo = "qlementine"; 34 + tag = "v1.2.1"; 35 + hash = "sha256-CPQMmTXyUW+CyLjHYx+IdXY4I2mVPudOmAksjd+izPA="; 36 + }; 37 + 38 + qtappinstancemanager-src = fetchFromGitHub { 39 + owner = "oclero"; 40 + repo = "qtappinstancemanager"; 41 + tag = "v1.3.0"; 42 + hash = "sha256-/zvNR/RHNV19ZI8d+58sotWxY16q2a7wWIBuKO52H5M="; 43 + }; 44 + 45 + inherit (qt6Packages) 46 + qtbase 47 + qttools 48 + wrapQtAppsHook 49 + ; 50 + in 51 + stdenv.mkDerivation (finalAttrs: { 52 + pname = "solarus-launcher"; 53 + version = "2.0.0"; 54 + 55 + src = fetchFromGitLab { 56 + owner = "solarus-games"; 57 + repo = "solarus-launcher"; 58 + tag = "v${finalAttrs.version}"; 59 + hash = "sha256-zBJnHzYJyhfzP1m6TgMkDLRA3EXC1oG8PC0Jq/fC2+Q="; 60 + }; 61 + 62 + patches = [ 63 + (replaceVars ./github-fetches.patch { 64 + inherit qlementine-src qlementine-icons-src qtappinstancemanager-src; 65 + }) 66 + ]; 67 + 68 + strictDeps = true; 69 + nativeBuildInputs = [ 70 + cmake 71 + ninja 72 + qttools 73 + wrapQtAppsHook 74 + ]; 75 + 76 + buildInputs = [ 77 + luajit 78 + SDL2 79 + SDL2_image 80 + SDL2_ttf 81 + physfs 82 + openal 83 + libmodplug 84 + libvorbis 85 + solarus 86 + qtbase 87 + kdePackages.qtsvg 88 + glm 89 + ]; 90 + 91 + meta = { 92 + description = "Launcher for the Zelda-like ARPG game engine, Solarus"; 93 + longDescription = '' 94 + Solarus is a game engine for Zelda-like ARPG games written in lua. 95 + Many full-fledged games have been writen for the engine. 96 + Games can be created easily using the editor. 97 + ''; 98 + homepage = "https://www.solarus-games.org"; 99 + mainProgram = "solarus-launcher"; 100 + license = with lib.licenses; [ 101 + # code 102 + gpl3Plus 103 + # assets 104 + cc-by-sa-40 105 + ]; 106 + maintainers = with lib.maintainers; [ marcin-serwin ]; 107 + platforms = lib.platforms.linux; 108 + }; 109 + })
+88
pkgs/by-name/so/solarus-quest-editor/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitLab, 5 + fetchFromGitHub, 6 + replaceVars, 7 + cmake, 8 + ninja, 9 + luajit, 10 + SDL2, 11 + SDL2_image, 12 + SDL2_ttf, 13 + physfs, 14 + openal, 15 + libmodplug, 16 + libvorbis, 17 + solarus, 18 + glm, 19 + qt6Packages, 20 + kdePackages, 21 + }: 22 + 23 + let 24 + qlementine-src = fetchFromGitHub { 25 + owner = "oclero"; 26 + repo = "qlementine"; 27 + tag = "v1.2.0"; 28 + hash = "sha256-25PKOpQl3IkBXX14gt8KKYXXJKeutQ75O7BftEqCAxk="; 29 + }; 30 + 31 + inherit (qt6Packages) 32 + qtbase 33 + qttools 34 + wrapQtAppsHook 35 + ; 36 + in 37 + stdenv.mkDerivation (finalAttrs: { 38 + pname = "solarus-quest-editor"; 39 + version = "2.0.0"; 40 + 41 + src = fetchFromGitLab { 42 + owner = "solarus-games"; 43 + repo = "solarus-quest-editor"; 44 + tag = "v${finalAttrs.version}"; 45 + hash = "sha256-GTslxValldReWGb3x67zRPrvQUuCO/HQSXOEQlJfAmw="; 46 + }; 47 + 48 + patches = [ 49 + (replaceVars ./qlementine-src.patch { inherit qlementine-src; }) 50 + ]; 51 + 52 + strictDeps = true; 53 + nativeBuildInputs = [ 54 + cmake 55 + ninja 56 + qttools 57 + wrapQtAppsHook 58 + ]; 59 + 60 + buildInputs = [ 61 + luajit 62 + SDL2 63 + SDL2_image 64 + SDL2_ttf 65 + physfs 66 + openal 67 + libmodplug 68 + libvorbis 69 + solarus 70 + qtbase 71 + kdePackages.qtsvg 72 + glm 73 + ]; 74 + 75 + meta = { 76 + description = "Editor for the Zelda-like ARPG game engine, Solarus"; 77 + mainProgram = "solarus-editor"; 78 + longDescription = '' 79 + Solarus is a game engine for Zelda-like ARPG games written in lua. 80 + Many full-fledged games have been writen for the engine. 81 + Games can be created easily using the editor. 82 + ''; 83 + homepage = "https://www.solarus-games.org"; 84 + license = lib.licenses.gpl3; 85 + maintainers = with lib.maintainers; [ marcin-serwin ]; 86 + platforms = lib.platforms.linux; 87 + }; 88 + })
+13
pkgs/by-name/so/solarus-quest-editor/qlementine-src.patch
··· 1 + diff --git a/cmake/AddDependencies.cmake b/cmake/AddDependencies.cmake 2 + index 8272d14..054c079 100644 3 + --- a/cmake/AddDependencies.cmake 4 + +++ b/cmake/AddDependencies.cmake 5 + @@ -51,7 +51,6 @@ endif() 6 + include(FetchContent) 7 + FetchContent_Declare( 8 + qlementine 9 + - GIT_REPOSITORY https://github.com/oclero/qlementine.git 10 + - GIT_TAG v1.2.0 11 + + SOURCE_DIR "@qlementine-src@" 12 + ) 13 + FetchContent_MakeAvailable(qlementine)
+92
pkgs/by-name/so/solarus/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitLab, 5 + fetchpatch, 6 + cmake, 7 + ninja, 8 + luajit, 9 + SDL2, 10 + SDL2_image, 11 + SDL2_ttf, 12 + physfs, 13 + glm, 14 + openal, 15 + libmodplug, 16 + libvorbis, 17 + 18 + # tests 19 + solarus-quest-editor, 20 + solarus-launcher, 21 + }: 22 + 23 + stdenv.mkDerivation (finalAttrs: { 24 + pname = "solarus"; 25 + version = "2.0.0"; 26 + 27 + src = fetchFromGitLab { 28 + owner = "solarus-games"; 29 + repo = "solarus"; 30 + tag = "v${finalAttrs.version}"; 31 + hash = "sha256-Kfg4pFZrEhsIU4RQlOox3hMpk2PXbOzrkwDElPGnDjA="; 32 + }; 33 + 34 + patches = [ 35 + # https://gitlab.com/solarus-games/solarus/-/merge_requests/1570 36 + (fetchpatch { 37 + url = "https://gitlab.com/solarus-games/solarus/-/commit/8e1eee51cbfa5acf2511b059739153065b0ba21d.patch"; 38 + hash = "sha256-KevGavtUhpHRt85WLh9ApmZ8a+NeWB1zDDHKGT08yhQ="; 39 + }) 40 + ]; 41 + 42 + outputs = [ 43 + "out" 44 + "lib" 45 + "dev" 46 + ]; 47 + 48 + strictDeps = true; 49 + nativeBuildInputs = [ 50 + cmake 51 + ninja 52 + ]; 53 + buildInputs = [ 54 + luajit 55 + SDL2 56 + SDL2_image 57 + SDL2_ttf 58 + physfs 59 + openal 60 + libmodplug 61 + libvorbis 62 + glm 63 + ]; 64 + 65 + cmakeFlags = [ 66 + (lib.cmakeFeature "CMAKE_CXX_FLAGS" "-DGLM_ENABLE_EXPERIMENTAL") 67 + (lib.cmakeFeature "CMAKE_INSTALL_DATADIR" "${placeholder "lib"}/share") 68 + ]; 69 + 70 + passthru.tests = { 71 + inherit solarus-quest-editor solarus-launcher; 72 + }; 73 + 74 + meta = { 75 + description = "Zelda-like ARPG game engine"; 76 + longDescription = '' 77 + Solarus is a game engine for Zelda-like ARPG games written in lua. 78 + Many full-fledged games have been writen for the engine. 79 + ''; 80 + homepage = "https://www.solarus-games.org"; 81 + mainProgram = "solarus-run"; 82 + license = with lib.licenses; [ 83 + # code 84 + gpl3Plus 85 + # assets 86 + cc-by-sa-30 87 + cc-by-sa-40 88 + ]; 89 + maintainers = with lib.maintainers; [ marcin-serwin ]; 90 + platforms = lib.platforms.linux; 91 + }; 92 + })
+3 -3
pkgs/by-name/zi/zipline/package.nix
··· 29 29 30 30 stdenv.mkDerivation (finalAttrs: { 31 31 pname = "zipline"; 32 - version = "4.1.1"; 32 + version = "4.1.2"; 33 33 34 34 src = fetchFromGitHub { 35 35 owner = "diced"; 36 36 repo = "zipline"; 37 37 tag = "v${finalAttrs.version}"; 38 - hash = "sha256-5/qVczCypQ2HybpBzEJe9THsrT5Iu3md+IXffLJnVmQ="; 38 + hash = "sha256-xxe64tGxZ2Udr+p21CKTZCHJ19ZOsdgPLlil+v+j5j4="; 39 39 }; 40 40 41 41 pnpmDeps = pnpm_10.fetchDeps { 42 42 inherit (finalAttrs) pname version src; 43 - hash = "sha256-zpNl6Ua4xRvBa62IHf+frnk4tWQHHF/HyEYGuUF2a78="; 43 + hash = "sha256-O8RLaKff4Dj/JDeUOyf7GtcFcOu/aOuclyaZmVqVi5s="; 44 44 }; 45 45 46 46 buildInputs = [ vips ];
+11 -1
pkgs/development/compilers/llvm/common/llvm/default.nix
··· 294 294 ++ 295 295 lib.optional (lib.versionAtLeast release_version "15") 296 296 # Just like the `llvm-lit-cfg` patch, but for `polly`. 297 - (getVersionFile "llvm/polly-lit-cfg-add-libs-to-dylib-path.patch"); 297 + (getVersionFile "llvm/polly-lit-cfg-add-libs-to-dylib-path.patch") 298 + ++ 299 + lib.optional (lib.versions.major release_version == "20") 300 + # https://github.com/llvm/llvm-project/pull/139822 adds a commit which didn't get backported but is necessary for tests. 301 + ( 302 + fetchpatch { 303 + url = "https://github.com/llvm/llvm-project/commit/ff2e8f93f6090965e82d799af43f6dfef52baa66.patch"; 304 + stripLen = 1; 305 + hash = "sha256-CZBTZKzi4cYkZhgTB5oXIo1UdEAArg9I4vR/m0upSRk="; 306 + } 307 + ); 298 308 299 309 nativeBuildInputs = 300 310 [
+1 -1
pkgs/development/compilers/llvm/default.nix
··· 31 31 "17.0.6".officialRelease.sha256 = "sha256-8MEDLLhocshmxoEBRSKlJ/GzJ8nfuzQ8qn0X/vLA+ag="; 32 32 "18.1.8".officialRelease.sha256 = "sha256-iiZKMRo/WxJaBXct9GdAcAT3cz9d9pnAcO1mmR6oPNE="; 33 33 "19.1.7".officialRelease.sha256 = "sha256-cZAB5vZjeTsXt9QHbP5xluWNQnAHByHtHnAhVDV0E6I="; 34 - "20.1.6".officialRelease.sha256 = "sha256-PfCzECiCM+k0hHqEUSr1TSpnII5nqIxg+Z8ICjmMj0Y="; 34 + "20.1.5".officialRelease.sha256 = "sha256-WKfY+VvAsZEEc0xYgF6+MsXDXZz7haMU6bxqmUpaHuQ="; 35 35 "21.0.0-git".gitRelease = { 36 36 rev = "9e2684e4cfb0a7e30d5e49f812127d07cdda600d"; 37 37 rev-version = "21.0.0-unstable-2025-06-06";
-70
pkgs/development/tools/solarus-quest-editor/default.nix
··· 1 - { 2 - lib, 3 - mkDerivation, 4 - fetchFromGitLab, 5 - cmake, 6 - luajit, 7 - SDL2, 8 - SDL2_image, 9 - SDL2_ttf, 10 - physfs, 11 - fetchpatch, 12 - openal, 13 - libmodplug, 14 - libvorbis, 15 - solarus, 16 - qtbase, 17 - qttools, 18 - glm, 19 - }: 20 - 21 - mkDerivation rec { 22 - pname = "solarus-quest-editor"; 23 - version = "1.6.4"; 24 - 25 - src = fetchFromGitLab { 26 - owner = "solarus-games"; 27 - repo = pname; 28 - rev = "v${version}"; 29 - sha256 = "1qbc2j9kalk7xqk9j27s7wnm5zawiyjs47xqkqphw683idmzmjzn"; 30 - }; 31 - 32 - patches = [ 33 - (fetchpatch { 34 - url = "https://gitlab.com/solarus-games/solarus-quest-editor/-/commit/81d5c7f1602cf355684d70a5e3449fefccfc44b8.patch"; 35 - sha256 = "tVUxkkDp2PcOHGy4dGvUcYj9gF7k4LN21VuxohCw9NE="; 36 - }) 37 - ]; 38 - 39 - nativeBuildInputs = [ cmake ]; 40 - 41 - buildInputs = [ 42 - luajit 43 - SDL2 44 - SDL2_image 45 - SDL2_ttf 46 - physfs 47 - openal 48 - libmodplug 49 - libvorbis 50 - solarus 51 - qtbase 52 - qttools 53 - glm 54 - ]; 55 - 56 - meta = with lib; { 57 - description = "Editor for the Zelda-like ARPG game engine, Solarus"; 58 - mainProgram = "solarus-quest-editor"; 59 - longDescription = '' 60 - Solarus is a game engine for Zelda-like ARPG games written in lua. 61 - Many full-fledged games have been writen for the engine. 62 - Games can be created easily using the editor. 63 - ''; 64 - homepage = "https://www.solarus-games.org"; 65 - license = licenses.gpl3; 66 - maintainers = [ ]; 67 - platforms = platforms.linux; 68 - }; 69 - 70 - }
-74
pkgs/games/solarus/default.nix
··· 1 - { 2 - lib, 3 - mkDerivation, 4 - fetchFromGitLab, 5 - cmake, 6 - luajit, 7 - SDL2, 8 - SDL2_image, 9 - SDL2_ttf, 10 - physfs, 11 - glm, 12 - openal, 13 - libmodplug, 14 - libvorbis, 15 - qtbase, 16 - qttools, 17 - }: 18 - 19 - mkDerivation rec { 20 - pname = "solarus"; 21 - version = "1.6.4"; 22 - 23 - src = fetchFromGitLab { 24 - owner = "solarus-games"; 25 - repo = pname; 26 - rev = "v${version}"; 27 - sha256 = "sbdlf+R9OskDQ5U5rqUX2gF8l/fj0sDJv6BL7H1I1Ng="; 28 - }; 29 - 30 - outputs = [ 31 - "out" 32 - "lib" 33 - "dev" 34 - ]; 35 - 36 - nativeBuildInputs = [ 37 - cmake 38 - qttools 39 - ]; 40 - buildInputs = [ 41 - luajit 42 - SDL2 43 - SDL2_image 44 - SDL2_ttf 45 - physfs 46 - openal 47 - libmodplug 48 - libvorbis 49 - qtbase 50 - glm 51 - ]; 52 - 53 - cmakeFlags = [ 54 - (lib.cmakeFeature "CMAKE_CXX_FLAGS" "-DGLM_ENABLE_EXPERIMENTAL") 55 - ]; 56 - 57 - preFixup = '' 58 - mkdir $lib/ 59 - mv $out/lib $lib 60 - ''; 61 - 62 - meta = with lib; { 63 - description = "Zelda-like ARPG game engine"; 64 - longDescription = '' 65 - Solarus is a game engine for Zelda-like ARPG games written in lua. 66 - Many full-fledged games have been writen for the engine. 67 - ''; 68 - homepage = "https://www.solarus-games.org"; 69 - license = licenses.gpl3; 70 - maintainers = [ ]; 71 - platforms = platforms.linux; 72 - }; 73 - 74 - }
-4
pkgs/top-level/all-packages.nix
··· 15229 15229 lua = lua5_1; 15230 15230 }; 15231 15231 15232 - # solarus and solarus-quest-editor must use the same version of Qt. 15233 - solarus = libsForQt5.callPackage ../games/solarus { }; 15234 - solarus-quest-editor = libsForQt5.callPackage ../development/tools/solarus-quest-editor { }; 15235 - 15236 15232 # You still can override by passing more arguments. 15237 15233 spring = callPackage ../games/spring { asciidoc = asciidoc-full; }; 15238 15234