Merge master into staging-next

authored by github-actions[bot] and committed by GitHub 421a9e64 c93daf97

+1391 -479
+8
nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
··· 1152 1152 <literal>coursier</literal>, you can create a shell alias. 1153 1153 </para> 1154 1154 </listitem> 1155 + <listitem> 1156 + <para> 1157 + The <literal>services.mosquitto</literal> module has been 1158 + rewritten to support multiple listeners and per-listener 1159 + configuration. Module configurations from previous releases 1160 + will no longer work and must be updated. 1161 + </para> 1162 + </listitem> 1155 1163 </itemizedlist> 1156 1164 </section> 1157 1165 <section xml:id="sec-release-21.11-notable-changes">
+3
nixos/doc/manual/release-notes/rl-2111.section.md
··· 355 355 356 356 - The `coursier` package's binary was renamed from `coursier` to `cs`. Completions which haven't worked for a while should now work with the renamed binary. To keep using `coursier`, you can create a shell alias. 357 357 358 + - The `services.mosquitto` module has been rewritten to support multiple listeners and per-listener configuration. 359 + Module configurations from previous releases will no longer work and must be updated. 360 + 358 361 ## Other Notable Changes {#sec-release-21.11-notable-changes} 359 362 360 363
+35 -8
nixos/modules/services/backup/borgbackup.nix
··· 42 42 ${cfg.postInit} 43 43 fi 44 44 '' + '' 45 - borg create $extraArgs \ 46 - --compression ${cfg.compression} \ 47 - --exclude-from ${mkExcludeFile cfg} \ 48 - $extraCreateArgs \ 49 - "::$archiveName$archiveSuffix" \ 50 - ${escapeShellArgs cfg.paths} 45 + ( 46 + set -o pipefail 47 + ${optionalString (cfg.dumpCommand != null) ''${escapeShellArg cfg.dumpCommand} | \''} 48 + borg create $extraArgs \ 49 + --compression ${cfg.compression} \ 50 + --exclude-from ${mkExcludeFile cfg} \ 51 + $extraCreateArgs \ 52 + "::$archiveName$archiveSuffix" \ 53 + ${if cfg.paths == null then "-" else escapeShellArgs cfg.paths} 54 + ) 51 55 '' + optionalString cfg.appendFailedSuffix '' 52 56 borg rename $extraArgs \ 53 57 "::$archiveName$archiveSuffix" "$archiveName" ··· 182 186 + " without at least one public key"; 183 187 }; 184 188 189 + mkSourceAssertions = name: cfg: { 190 + assertion = count isNull [ cfg.dumpCommand cfg.paths ] == 1; 191 + message = '' 192 + Exactly one of borgbackup.jobs.${name}.paths or borgbackup.jobs.${name}.dumpCommand 193 + must be set. 194 + ''; 195 + }; 196 + 185 197 mkRemovableDeviceAssertions = name: cfg: { 186 198 assertion = !(isLocalPath cfg.repo) -> !cfg.removableDevice; 187 199 message = '' ··· 240 252 options = { 241 253 242 254 paths = mkOption { 243 - type = with types; coercedTo str lib.singleton (listOf str); 244 - description = "Path(s) to back up."; 255 + type = with types; nullOr (coercedTo str lib.singleton (listOf str)); 256 + default = null; 257 + description = '' 258 + Path(s) to back up. 259 + Mutually exclusive with <option>dumpCommand</option>. 260 + ''; 245 261 example = "/home/user"; 262 + }; 263 + 264 + dumpCommand = mkOption { 265 + type = with types; nullOr path; 266 + default = null; 267 + description = '' 268 + Backup the stdout of this program instead of filesystem paths. 269 + Mutually exclusive with <option>paths</option>. 270 + ''; 271 + example = "/path/to/createZFSsend.sh"; 246 272 }; 247 273 248 274 repo = mkOption { ··· 657 683 assertions = 658 684 mapAttrsToList mkPassAssertion jobs 659 685 ++ mapAttrsToList mkKeysAssertion repos 686 + ++ mapAttrsToList mkSourceAssertions jobs 660 687 ++ mapAttrsToList mkRemovableDeviceAssertions jobs; 661 688 662 689 system.activationScripts = mapAttrs' mkActivationScript jobs;
+511 -167
nixos/modules/services/networking/mosquitto.nix
··· 5 5 let 6 6 cfg = config.services.mosquitto; 7 7 8 - listenerConf = optionalString cfg.ssl.enable '' 9 - listener ${toString cfg.ssl.port} ${cfg.ssl.host} 10 - cafile ${cfg.ssl.cafile} 11 - certfile ${cfg.ssl.certfile} 12 - keyfile ${cfg.ssl.keyfile} 13 - ''; 8 + # note that mosquitto config parsing is very simplistic as of may 2021. 9 + # often times they'll e.g. strtok() a line, check the first two tokens, and ignore the rest. 10 + # there's no escaping available either, so we have to prevent any being necessary. 11 + str = types.strMatching "[^\r\n]*" // { 12 + description = "single-line string"; 13 + }; 14 + path = types.addCheck types.path (p: str.check "${p}"); 15 + configKey = types.strMatching "[^\r\n\t ]+"; 16 + optionType = with types; oneOf [ str path bool int ] // { 17 + description = "string, path, bool, or integer"; 18 + }; 19 + optionToString = v: 20 + if isBool v then boolToString v 21 + else if path.check v then "${v}" 22 + else toString v; 14 23 15 - passwordConf = optionalString cfg.checkPasswords '' 16 - password_file ${cfg.dataDir}/passwd 17 - ''; 24 + assertKeysValid = prefix: valid: config: 25 + mapAttrsToList 26 + (n: _: { 27 + assertion = valid ? ${n}; 28 + message = "Invalid config key ${prefix}.${n}."; 29 + }) 30 + config; 18 31 19 - mosquittoConf = pkgs.writeText "mosquitto.conf" '' 20 - acl_file ${aclFile} 21 - persistence true 22 - allow_anonymous ${boolToString cfg.allowAnonymous} 23 - listener ${toString cfg.port} ${cfg.host} 24 - ${passwordConf} 25 - ${listenerConf} 26 - ${cfg.extraConf} 27 - ''; 32 + formatFreeform = { prefix ? "" }: mapAttrsToList (n: v: "${prefix}${n} ${optionToString v}"); 28 33 29 - userAcl = (concatStringsSep "\n\n" (mapAttrsToList (n: c: 30 - "user ${n}\n" + (concatStringsSep "\n" c.acl)) cfg.users 31 - )); 34 + userOptions = with types; submodule { 35 + options = { 36 + password = mkOption { 37 + type = uniq (nullOr str); 38 + default = null; 39 + description = '' 40 + Specifies the (clear text) password for the MQTT User. 41 + ''; 42 + }; 32 43 33 - aclFile = pkgs.writeText "mosquitto.acl" '' 34 - ${cfg.aclExtraConf} 35 - ${userAcl} 36 - ''; 44 + passwordFile = mkOption { 45 + type = uniq (nullOr types.path); 46 + example = "/path/to/file"; 47 + default = null; 48 + description = '' 49 + Specifies the path to a file containing the 50 + clear text password for the MQTT user. 51 + ''; 52 + }; 37 53 38 - in 54 + hashedPassword = mkOption { 55 + type = uniq (nullOr str); 56 + default = null; 57 + description = '' 58 + Specifies the hashed password for the MQTT User. 59 + To generate hashed password install <literal>mosquitto</literal> 60 + package and use <literal>mosquitto_passwd</literal>. 61 + ''; 62 + }; 39 63 40 - { 64 + hashedPasswordFile = mkOption { 65 + type = uniq (nullOr types.path); 66 + example = "/path/to/file"; 67 + default = null; 68 + description = '' 69 + Specifies the path to a file containing the 70 + hashed password for the MQTT user. 71 + To generate hashed password install <literal>mosquitto</literal> 72 + package and use <literal>mosquitto_passwd</literal>. 73 + ''; 74 + }; 41 75 42 - ###### Interface 76 + acl = mkOption { 77 + type = listOf str; 78 + example = [ "read A/B" "readwrite A/#" ]; 79 + default = []; 80 + description = '' 81 + Control client access to topics on the broker. 82 + ''; 83 + }; 84 + }; 85 + }; 86 + 87 + userAsserts = prefix: users: 88 + mapAttrsToList 89 + (n: _: { 90 + assertion = builtins.match "[^:\r\n]+" n != null; 91 + message = "Invalid user name ${n} in ${prefix}"; 92 + }) 93 + users 94 + ++ mapAttrsToList 95 + (n: u: { 96 + assertion = count (s: s != null) [ 97 + u.password u.passwordFile u.hashedPassword u.hashedPasswordFile 98 + ] <= 1; 99 + message = "Cannot set more than one password option for user ${n} in ${prefix}"; 100 + }) users; 101 + 102 + makePasswordFile = users: path: 103 + let 104 + makeLines = store: file: 105 + mapAttrsToList 106 + (n: u: "addLine ${escapeShellArg n} ${escapeShellArg u.${store}}") 107 + (filterAttrs (_: u: u.${store} != null) users) 108 + ++ mapAttrsToList 109 + (n: u: "addFile ${escapeShellArg n} ${escapeShellArg "${u.${file}}"}") 110 + (filterAttrs (_: u: u.${file} != null) users); 111 + plainLines = makeLines "password" "passwordFile"; 112 + hashedLines = makeLines "hashedPassword" "hashedPasswordFile"; 113 + in 114 + pkgs.writeScript "make-mosquitto-passwd" 115 + ('' 116 + #! ${pkgs.runtimeShell} 117 + 118 + set -eu 119 + 120 + file=${escapeShellArg path} 43 121 44 - options = { 45 - services.mosquitto = { 46 - enable = mkEnableOption "the MQTT Mosquitto broker"; 122 + rm -f "$file" 123 + touch "$file" 47 124 48 - host = mkOption { 49 - default = "127.0.0.1"; 50 - example = "0.0.0.0"; 51 - type = types.str; 125 + addLine() { 126 + echo "$1:$2" >> "$file" 127 + } 128 + addFile() { 129 + if [ $(wc -l <"$2") -gt 1 ]; then 130 + echo "invalid mosquitto password file $2" >&2 131 + return 1 132 + fi 133 + echo "$1:$(cat "$2")" >> "$file" 134 + } 135 + '' 136 + + concatStringsSep "\n" 137 + (plainLines 138 + ++ optional (plainLines != []) '' 139 + ${pkgs.mosquitto}/bin/mosquitto_passwd -U "$file" 140 + '' 141 + ++ hashedLines)); 142 + 143 + makeACLFile = idx: users: supplement: 144 + pkgs.writeText "mosquitto-acl-${toString idx}.conf" 145 + (concatStringsSep 146 + "\n" 147 + (flatten [ 148 + supplement 149 + (mapAttrsToList 150 + (n: u: [ "user ${n}" ] ++ map (t: "topic ${t}") u.acl) 151 + users) 152 + ])); 153 + 154 + authPluginOptions = with types; submodule { 155 + options = { 156 + plugin = mkOption { 157 + type = path; 52 158 description = '' 53 - Host to listen on without SSL. 159 + Plugin path to load, should be a <literal>.so</literal> file. 54 160 ''; 55 161 }; 56 162 57 - port = mkOption { 58 - default = 1883; 59 - type = types.int; 163 + denySpecialChars = mkOption { 164 + type = bool; 60 165 description = '' 61 - Port on which to listen without SSL. 166 + Automatically disallow all clients using <literal>#</literal> 167 + or <literal>+</literal> in their name/id. 62 168 ''; 169 + default = true; 63 170 }; 64 171 65 - ssl = { 66 - enable = mkEnableOption "SSL listener"; 172 + options = mkOption { 173 + type = attrsOf optionType; 174 + description = '' 175 + Options for the auth plugin. Each key turns into a <literal>auth_opt_*</literal> 176 + line in the config. 177 + ''; 178 + default = {}; 179 + }; 180 + }; 181 + }; 67 182 68 - cafile = mkOption { 69 - type = types.nullOr types.path; 70 - default = null; 71 - description = "Path to PEM encoded CA certificates."; 72 - }; 183 + authAsserts = prefix: auth: 184 + mapAttrsToList 185 + (n: _: { 186 + assertion = configKey.check n; 187 + message = "Invalid auth plugin key ${prefix}.${n}"; 188 + }) 189 + auth; 73 190 74 - certfile = mkOption { 75 - type = types.nullOr types.path; 76 - default = null; 77 - description = "Path to PEM encoded server certificate."; 78 - }; 191 + formatAuthPlugin = plugin: 192 + [ 193 + "auth_plugin ${plugin.plugin}" 194 + "auth_plugin_deny_special_chars ${optionToString plugin.denySpecialChars}" 195 + ] 196 + ++ formatFreeform { prefix = "auth_opt_"; } plugin.options; 79 197 80 - keyfile = mkOption { 81 - type = types.nullOr types.path; 82 - default = null; 83 - description = "Path to PEM encoded server key."; 84 - }; 198 + freeformListenerKeys = { 199 + allow_anonymous = 1; 200 + allow_zero_length_clientid = 1; 201 + auto_id_prefix = 1; 202 + cafile = 1; 203 + capath = 1; 204 + certfile = 1; 205 + ciphers = 1; 206 + "ciphers_tls1.3" = 1; 207 + crlfile = 1; 208 + dhparamfile = 1; 209 + http_dir = 1; 210 + keyfile = 1; 211 + max_connections = 1; 212 + max_qos = 1; 213 + max_topic_alias = 1; 214 + mount_point = 1; 215 + protocol = 1; 216 + psk_file = 1; 217 + psk_hint = 1; 218 + require_certificate = 1; 219 + socket_domain = 1; 220 + tls_engine = 1; 221 + tls_engine_kpass_sha1 = 1; 222 + tls_keyform = 1; 223 + tls_version = 1; 224 + use_identity_as_username = 1; 225 + use_subject_as_username = 1; 226 + use_username_as_clientid = 1; 227 + }; 85 228 86 - host = mkOption { 87 - default = "0.0.0.0"; 88 - example = "localhost"; 89 - type = types.str; 90 - description = '' 91 - Host to listen on with SSL. 92 - ''; 93 - }; 229 + listenerOptions = with types; submodule { 230 + options = { 231 + port = mkOption { 232 + type = port; 233 + description = '' 234 + Port to listen on. Must be set to 0 to listen on a unix domain socket. 235 + ''; 236 + default = 1883; 237 + }; 94 238 95 - port = mkOption { 96 - default = 8883; 97 - type = types.int; 98 - description = '' 99 - Port on which to listen with SSL. 100 - ''; 101 - }; 239 + address = mkOption { 240 + type = nullOr str; 241 + description = '' 242 + Address to listen on. Listen on <literal>0.0.0.0</literal>/<literal>::</literal> 243 + when unset. 244 + ''; 245 + default = null; 102 246 }; 103 247 104 - dataDir = mkOption { 105 - default = "/var/lib/mosquitto"; 106 - type = types.path; 248 + authPlugins = mkOption { 249 + type = listOf authPluginOptions; 107 250 description = '' 108 - The data directory. 251 + Authentication plugin to attach to this listener. 252 + Refer to the <link xlink:href="https://mosquitto.org/man/mosquitto-conf-5.html"> 253 + mosquitto.conf documentation</link> for details on authentication plugins. 109 254 ''; 255 + default = []; 110 256 }; 111 257 112 258 users = mkOption { 113 - type = types.attrsOf (types.submodule { 114 - options = { 115 - password = mkOption { 116 - type = with types; uniq (nullOr str); 117 - default = null; 118 - description = '' 119 - Specifies the (clear text) password for the MQTT User. 120 - ''; 121 - }; 259 + type = attrsOf userOptions; 260 + example = { john = { password = "123456"; acl = [ "topic readwrite john/#" ]; }; }; 261 + description = '' 262 + A set of users and their passwords and ACLs. 263 + ''; 264 + default = {}; 265 + }; 122 266 123 - passwordFile = mkOption { 124 - type = with types; uniq (nullOr str); 125 - example = "/path/to/file"; 126 - default = null; 127 - description = '' 128 - Specifies the path to a file containing the 129 - clear text password for the MQTT user. 130 - ''; 131 - }; 267 + acl = mkOption { 268 + type = listOf str; 269 + description = '' 270 + Additional ACL items to prepend to the generated ACL file. 271 + ''; 272 + default = []; 273 + }; 132 274 133 - hashedPassword = mkOption { 134 - type = with types; uniq (nullOr str); 135 - default = null; 136 - description = '' 137 - Specifies the hashed password for the MQTT User. 138 - To generate hashed password install <literal>mosquitto</literal> 139 - package and use <literal>mosquitto_passwd</literal>. 140 - ''; 141 - }; 275 + settings = mkOption { 276 + type = submodule { 277 + freeformType = attrsOf optionType; 278 + }; 279 + description = '' 280 + Additional settings for this listener. 281 + ''; 282 + default = {}; 283 + }; 284 + }; 285 + }; 142 286 143 - hashedPasswordFile = mkOption { 144 - type = with types; uniq (nullOr str); 145 - example = "/path/to/file"; 146 - default = null; 287 + listenerAsserts = prefix: listener: 288 + assertKeysValid prefix freeformListenerKeys listener.settings 289 + ++ userAsserts prefix listener.users 290 + ++ imap0 291 + (i: v: authAsserts "${prefix}.authPlugins.${toString i}" v) 292 + listener.authPlugins; 293 + 294 + formatListener = idx: listener: 295 + [ 296 + "listener ${toString listener.port} ${toString listener.address}" 297 + "password_file ${cfg.dataDir}/passwd-${toString idx}" 298 + "acl_file ${makeACLFile idx listener.users listener.acl}" 299 + ] 300 + ++ formatFreeform {} listener.settings 301 + ++ concatMap formatAuthPlugin listener.authPlugins; 302 + 303 + freeformBridgeKeys = { 304 + bridge_alpn = 1; 305 + bridge_attempt_unsubscribe = 1; 306 + bridge_bind_address = 1; 307 + bridge_cafile = 1; 308 + bridge_capath = 1; 309 + bridge_certfile = 1; 310 + bridge_identity = 1; 311 + bridge_insecure = 1; 312 + bridge_keyfile = 1; 313 + bridge_max_packet_size = 1; 314 + bridge_outgoing_retain = 1; 315 + bridge_protocol_version = 1; 316 + bridge_psk = 1; 317 + bridge_require_ocsp = 1; 318 + bridge_tls_version = 1; 319 + cleansession = 1; 320 + idle_timeout = 1; 321 + keepalive_interval = 1; 322 + local_cleansession = 1; 323 + local_clientid = 1; 324 + local_password = 1; 325 + local_username = 1; 326 + notification_topic = 1; 327 + notifications = 1; 328 + notifications_local_only = 1; 329 + remote_clientid = 1; 330 + remote_password = 1; 331 + remote_username = 1; 332 + restart_timeout = 1; 333 + round_robin = 1; 334 + start_type = 1; 335 + threshold = 1; 336 + try_private = 1; 337 + }; 338 + 339 + bridgeOptions = with types; submodule { 340 + options = { 341 + addresses = mkOption { 342 + type = listOf (submodule { 343 + options = { 344 + address = mkOption { 345 + type = str; 147 346 description = '' 148 - Specifies the path to a file containing the 149 - hashed password for the MQTT user. 150 - To generate hashed password install <literal>mosquitto</literal> 151 - package and use <literal>mosquitto_passwd</literal>. 347 + Address of the remote MQTT broker. 152 348 ''; 153 349 }; 154 350 155 - acl = mkOption { 156 - type = types.listOf types.str; 157 - example = [ "topic read A/B" "topic A/#" ]; 351 + port = mkOption { 352 + type = port; 158 353 description = '' 159 - Control client access to topics on the broker. 354 + Port of the remote MQTT broker. 160 355 ''; 356 + default = 1883; 161 357 }; 162 358 }; 163 359 }); 164 - example = { john = { password = "123456"; acl = [ "topic readwrite john/#" ]; }; }; 360 + default = []; 165 361 description = '' 166 - A set of users and their passwords and ACLs. 362 + Remote endpoints for the bridge. 167 363 ''; 168 364 }; 169 365 170 - allowAnonymous = mkOption { 171 - default = false; 172 - type = types.bool; 366 + topics = mkOption { 367 + type = listOf str; 173 368 description = '' 174 - Allow clients to connect without authentication. 369 + Topic patterns to be shared between the two brokers. 370 + Refer to the <link xlink:href="https://mosquitto.org/man/mosquitto-conf-5.html"> 371 + mosquitto.conf documentation</link> for details on the format. 175 372 ''; 373 + default = []; 374 + example = [ "# both 2 local/topic/ remote/topic/" ]; 176 375 }; 177 376 178 - checkPasswords = mkOption { 179 - default = false; 180 - example = true; 181 - type = types.bool; 377 + settings = mkOption { 378 + type = submodule { 379 + freeformType = attrsOf optionType; 380 + }; 182 381 description = '' 183 - Refuse connection when clients provide incorrect passwords. 382 + Additional settings for this bridge. 184 383 ''; 384 + default = {}; 185 385 }; 386 + }; 387 + }; 186 388 187 - extraConf = mkOption { 188 - default = ""; 189 - type = types.lines; 190 - description = '' 191 - Extra config to append to `mosquitto.conf` file. 192 - ''; 193 - }; 389 + bridgeAsserts = prefix: bridge: 390 + assertKeysValid prefix freeformBridgeKeys bridge.settings 391 + ++ [ { 392 + assertion = length bridge.addresses > 0; 393 + message = "Bridge ${prefix} needs remote broker addresses"; 394 + } ]; 395 + 396 + formatBridge = name: bridge: 397 + [ 398 + "connection ${name}" 399 + "addresses ${concatMapStringsSep " " (a: "${a.address}:${toString a.port}") bridge.addresses}" 400 + ] 401 + ++ map (t: "topic ${t}") bridge.topics 402 + ++ formatFreeform {} bridge.settings; 403 + 404 + freeformGlobalKeys = { 405 + allow_duplicate_messages = 1; 406 + autosave_interval = 1; 407 + autosave_on_changes = 1; 408 + check_retain_source = 1; 409 + connection_messages = 1; 410 + log_facility = 1; 411 + log_timestamp = 1; 412 + log_timestamp_format = 1; 413 + max_inflight_bytes = 1; 414 + max_inflight_messages = 1; 415 + max_keepalive = 1; 416 + max_packet_size = 1; 417 + max_queued_bytes = 1; 418 + max_queued_messages = 1; 419 + memory_limit = 1; 420 + message_size_limit = 1; 421 + persistence_file = 1; 422 + persistence_location = 1; 423 + persistent_client_expiration = 1; 424 + pid_file = 1; 425 + queue_qos0_messages = 1; 426 + retain_available = 1; 427 + set_tcp_nodelay = 1; 428 + sys_interval = 1; 429 + upgrade_outgoing_qos = 1; 430 + websockets_headers_size = 1; 431 + websockets_log_level = 1; 432 + }; 433 + 434 + globalOptions = with types; { 435 + enable = mkEnableOption "the MQTT Mosquitto broker"; 436 + 437 + bridges = mkOption { 438 + type = attrsOf bridgeOptions; 439 + default = {}; 440 + description = '' 441 + Bridges to build to other MQTT brokers. 442 + ''; 443 + }; 444 + 445 + listeners = mkOption { 446 + type = listOf listenerOptions; 447 + default = {}; 448 + description = '' 449 + Listeners to configure on this broker. 450 + ''; 451 + }; 452 + 453 + includeDirs = mkOption { 454 + type = listOf path; 455 + description = '' 456 + Directories to be scanned for further config files to include. 457 + Directories will processed in the order given, 458 + <literal>*.conf</literal> files in the directory will be 459 + read in case-sensistive alphabetical order. 460 + ''; 461 + default = []; 462 + }; 463 + 464 + logDest = mkOption { 465 + type = listOf (either path (enum [ "stdout" "stderr" "syslog" "topic" "dlt" ])); 466 + description = '' 467 + Destinations to send log messages to. 468 + ''; 469 + default = [ "stderr" ]; 470 + }; 471 + 472 + logType = mkOption { 473 + type = listOf (enum [ "debug" "error" "warning" "notice" "information" 474 + "subscribe" "unsubscribe" "websockets" "none" "all" ]); 475 + description = '' 476 + Types of messages to log. 477 + ''; 478 + default = []; 479 + }; 480 + 481 + persistence = mkOption { 482 + type = bool; 483 + description = '' 484 + Enable persistent storage of subscriptions and messages. 485 + ''; 486 + default = true; 487 + }; 194 488 195 - aclExtraConf = mkOption { 196 - default = ""; 197 - type = types.lines; 198 - description = '' 199 - Extra config to prepend to the ACL file. 200 - ''; 201 - }; 489 + dataDir = mkOption { 490 + default = "/var/lib/mosquitto"; 491 + type = types.path; 492 + description = '' 493 + The data directory. 494 + ''; 495 + }; 202 496 497 + settings = mkOption { 498 + type = submodule { 499 + freeformType = attrsOf optionType; 500 + }; 501 + description = '' 502 + Global configuration options for the mosquitto broker. 503 + ''; 504 + default = {}; 203 505 }; 204 506 }; 205 507 508 + globalAsserts = prefix: cfg: 509 + flatten [ 510 + (assertKeysValid prefix freeformGlobalKeys cfg.settings) 511 + (imap0 (n: l: listenerAsserts "${prefix}.listener.${toString n}" l) cfg.listeners) 512 + (mapAttrsToList (n: b: bridgeAsserts "${prefix}.bridge.${n}" b) cfg.bridges) 513 + ]; 514 + 515 + formatGlobal = cfg: 516 + [ 517 + "per_listener_settings true" 518 + "persistence ${optionToString cfg.persistence}" 519 + ] 520 + ++ map 521 + (d: if path.check d then "log_dest file ${d}" else "log_dest ${d}") 522 + cfg.logDest 523 + ++ map (t: "log_type ${t}") cfg.logType 524 + ++ formatFreeform {} cfg.settings 525 + ++ concatLists (imap0 formatListener cfg.listeners) 526 + ++ concatLists (mapAttrsToList formatBridge cfg.bridges) 527 + ++ map (d: "include_dir ${d}") cfg.includeDirs; 528 + 529 + configFile = pkgs.writeText "mosquitto.conf" 530 + (concatStringsSep "\n" (formatGlobal cfg)); 531 + 532 + in 533 + 534 + { 535 + 536 + ###### Interface 537 + 538 + options.services.mosquitto = globalOptions; 206 539 207 540 ###### Implementation 208 541 209 542 config = mkIf cfg.enable { 210 543 211 - assertions = mapAttrsToList (name: cfg: { 212 - assertion = length (filter (s: s != null) (with cfg; [ 213 - password passwordFile hashedPassword hashedPasswordFile 214 - ])) <= 1; 215 - message = "Cannot set more than one password option"; 216 - }) cfg.users; 544 + assertions = globalAsserts "services.mosquitto" cfg; 217 545 218 546 systemd.services.mosquitto = { 219 547 description = "Mosquitto MQTT Broker Daemon"; ··· 227 555 RuntimeDirectory = "mosquitto"; 228 556 WorkingDirectory = cfg.dataDir; 229 557 Restart = "on-failure"; 230 - ExecStart = "${pkgs.mosquitto}/bin/mosquitto -c ${mosquittoConf}"; 558 + ExecStart = "${pkgs.mosquitto}/bin/mosquitto -c ${configFile}"; 231 559 ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; 232 560 233 561 # Hardening ··· 252 580 ReadWritePaths = [ 253 581 cfg.dataDir 254 582 "/tmp" # mosquitto_passwd creates files in /tmp before moving them 255 - ]; 256 - ReadOnlyPaths = with cfg.ssl; lib.optionals (enable) [ 257 - certfile 258 - keyfile 259 - cafile 260 - ]; 583 + ] ++ filter path.check cfg.logDest; 584 + ReadOnlyPaths = 585 + map (p: "${p}") 586 + (cfg.includeDirs 587 + ++ filter 588 + (v: v != null) 589 + (flatten [ 590 + (map 591 + (l: [ 592 + (l.settings.psk_file or null) 593 + (l.settings.http_dir or null) 594 + (l.settings.cafile or null) 595 + (l.settings.capath or null) 596 + (l.settings.certfile or null) 597 + (l.settings.crlfile or null) 598 + (l.settings.dhparamfile or null) 599 + (l.settings.keyfile or null) 600 + ]) 601 + cfg.listeners) 602 + (mapAttrsToList 603 + (_: b: [ 604 + (b.settings.bridge_cafile or null) 605 + (b.settings.bridge_capath or null) 606 + (b.settings.bridge_certfile or null) 607 + (b.settings.bridge_keyfile or null) 608 + ]) 609 + cfg.bridges) 610 + ])); 261 611 RemoveIPC = true; 262 612 RestrictAddressFamilies = [ 263 613 "AF_UNIX" # for sd_notify() call ··· 275 625 ]; 276 626 UMask = "0077"; 277 627 }; 278 - preStart = '' 279 - rm -f ${cfg.dataDir}/passwd 280 - touch ${cfg.dataDir}/passwd 281 - '' + concatStringsSep "\n" ( 282 - mapAttrsToList (n: c: 283 - if c.hashedPasswordFile != null then 284 - "echo '${n}:'$(cat '${c.hashedPasswordFile}') >> ${cfg.dataDir}/passwd" 285 - else if c.passwordFile != null then 286 - "${pkgs.mosquitto}/bin/mosquitto_passwd -b ${cfg.dataDir}/passwd ${n} $(cat '${c.passwordFile}')" 287 - else if c.hashedPassword != null then 288 - "echo '${n}:${c.hashedPassword}' >> ${cfg.dataDir}/passwd" 289 - else optionalString (c.password != null) 290 - "${pkgs.mosquitto}/bin/mosquitto_passwd -b ${cfg.dataDir}/passwd ${n} '${c.password}'" 291 - ) cfg.users); 628 + preStart = 629 + concatStringsSep 630 + "\n" 631 + (imap0 632 + (idx: listener: makePasswordFile listener.users "${cfg.dataDir}/passwd-${toString idx}") 633 + cfg.listeners); 292 634 }; 293 635 294 636 users.users.mosquitto = { ··· 302 644 users.groups.mosquitto.gid = config.ids.gids.mosquitto; 303 645 304 646 }; 647 + 648 + meta.maintainers = with lib.maintainers; [ pennae ]; 305 649 }
+33
nixos/tests/borgbackup.nix
··· 81 81 environment.BORG_RSH = "ssh -oStrictHostKeyChecking=no -i /root/id_ed25519.appendOnly"; 82 82 }; 83 83 84 + commandSuccess = { 85 + dumpCommand = pkgs.writeScript "commandSuccess" '' 86 + echo -n test 87 + ''; 88 + repo = remoteRepo; 89 + encryption.mode = "none"; 90 + startAt = [ ]; 91 + environment.BORG_RSH = "ssh -oStrictHostKeyChecking=no -i /root/id_ed25519"; 92 + }; 93 + 94 + commandFail = { 95 + dumpCommand = "${pkgs.coreutils}/bin/false"; 96 + repo = remoteRepo; 97 + encryption.mode = "none"; 98 + startAt = [ ]; 99 + environment.BORG_RSH = "ssh -oStrictHostKeyChecking=no -i /root/id_ed25519"; 100 + }; 101 + 84 102 }; 85 103 }; 86 104 ··· 171 189 client.fail("{} list borg\@server:wrong".format(borg)) 172 190 173 191 # TODO: Make sure that data is not actually deleted 192 + 193 + with subtest("commandSuccess"): 194 + server.wait_for_unit("sshd.service") 195 + client.wait_for_unit("network.target") 196 + client.systemctl("start --wait borgbackup-job-commandSuccess") 197 + client.fail("systemctl is-failed borgbackup-job-commandSuccess") 198 + id = client.succeed("borg-job-commandSuccess list | tail -n1 | cut -d' ' -f1").strip() 199 + client.succeed(f"borg-job-commandSuccess extract ::{id} stdin") 200 + assert "test" == client.succeed("cat stdin") 201 + 202 + with subtest("commandFail"): 203 + server.wait_for_unit("sshd.service") 204 + client.wait_for_unit("network.target") 205 + client.systemctl("start --wait borgbackup-job-commandFail") 206 + client.succeed("systemctl is-failed borgbackup-job-commandFail") 174 207 ''; 175 208 })
+7 -6
nixos/tests/home-assistant.nix
··· 12 12 environment.systemPackages = with pkgs; [ mosquitto ]; 13 13 services.mosquitto = { 14 14 enable = true; 15 - checkPasswords = true; 16 - users = { 17 - "${mqttUsername}" = { 18 - acl = [ "topic readwrite #" ]; 19 - password = mqttPassword; 15 + listeners = [ { 16 + users = { 17 + "${mqttUsername}" = { 18 + acl = [ "readwrite #" ]; 19 + password = mqttPassword; 20 + }; 20 21 }; 21 - }; 22 + } ]; 22 23 }; 23 24 services.home-assistant = { 24 25 inherit configDir;
+145 -45
nixos/tests/mosquitto.nix
··· 2 2 3 3 let 4 4 port = 1888; 5 - username = "mqtt"; 5 + tlsPort = 1889; 6 6 password = "VERY_secret"; 7 + hashedPassword = "$7$101$/WJc4Mp+I+uYE9sR$o7z9rD1EYXHPwEP5GqQj6A7k4W1yVbePlb8TqNcuOLV9WNCiDgwHOB0JHC1WCtdkssqTBduBNUnUGd6kmZvDSw=="; 7 8 topic = "test/foo"; 9 + 10 + snakeOil = pkgs.runCommand "snakeoil-certs" { 11 + buildInputs = [ pkgs.gnutls.bin ]; 12 + caTemplate = pkgs.writeText "snakeoil-ca.template" '' 13 + cn = server 14 + expiration_days = -1 15 + cert_signing_key 16 + ca 17 + ''; 18 + certTemplate = pkgs.writeText "snakeoil-cert.template" '' 19 + cn = server 20 + expiration_days = -1 21 + tls_www_server 22 + encryption_key 23 + signing_key 24 + ''; 25 + userCertTemplate = pkgs.writeText "snakeoil-user-cert.template" '' 26 + organization = snakeoil 27 + cn = client1 28 + expiration_days = -1 29 + tls_www_client 30 + encryption_key 31 + signing_key 32 + ''; 33 + } '' 34 + mkdir "$out" 35 + 36 + certtool -p --bits 2048 --outfile "$out/ca.key" 37 + certtool -s --template "$caTemplate" --load-privkey "$out/ca.key" \ 38 + --outfile "$out/ca.crt" 39 + certtool -p --bits 2048 --outfile "$out/server.key" 40 + certtool -c --template "$certTemplate" \ 41 + --load-ca-privkey "$out/ca.key" \ 42 + --load-ca-certificate "$out/ca.crt" \ 43 + --load-privkey "$out/server.key" \ 44 + --outfile "$out/server.crt" 45 + 46 + certtool -p --bits 2048 --outfile "$out/client1.key" 47 + certtool -c --template "$userCertTemplate" \ 48 + --load-privkey "$out/client1.key" \ 49 + --load-ca-privkey "$out/ca.key" \ 50 + --load-ca-certificate "$out/ca.crt" \ 51 + --outfile "$out/client1.crt" 52 + ''; 53 + 8 54 in { 9 55 name = "mosquitto"; 10 56 meta = with pkgs.lib; { 11 - maintainers = with maintainers; [ peterhoeg ]; 57 + maintainers = with maintainers; [ pennae peterhoeg ]; 12 58 }; 13 59 14 60 nodes = let ··· 17 63 }; 18 64 in { 19 65 server = { pkgs, ... }: { 20 - networking.firewall.allowedTCPPorts = [ port ]; 66 + networking.firewall.allowedTCPPorts = [ port tlsPort ]; 21 67 services.mosquitto = { 22 - inherit port; 23 68 enable = true; 24 - host = "0.0.0.0"; 25 - checkPasswords = true; 26 - users.${username} = { 27 - inherit password; 28 - acl = [ 29 - "topic readwrite ${topic}" 30 - ]; 69 + settings = { 70 + sys_interval = 1; 31 71 }; 32 - }; 72 + listeners = [ 73 + { 74 + inherit port; 75 + users = { 76 + password_store = { 77 + inherit password; 78 + }; 79 + password_file = { 80 + passwordFile = pkgs.writeText "mqtt-password" password; 81 + }; 82 + hashed_store = { 83 + inherit hashedPassword; 84 + }; 85 + hashed_file = { 86 + hashedPasswordFile = pkgs.writeText "mqtt-hashed-password" hashedPassword; 87 + }; 33 88 34 - # disable private /tmp for this test 35 - systemd.services.mosquitto.serviceConfig.PrivateTmp = lib.mkForce false; 89 + reader = { 90 + inherit password; 91 + acl = [ 92 + "read ${topic}" 93 + "read $SYS/#" # so we always have something to read 94 + ]; 95 + }; 96 + writer = { 97 + inherit password; 98 + acl = [ "write ${topic}" ]; 99 + }; 100 + }; 101 + } 102 + { 103 + port = tlsPort; 104 + users.client1 = { 105 + acl = [ "read $SYS/#" ]; 106 + }; 107 + settings = { 108 + cafile = "${snakeOil}/ca.crt"; 109 + certfile = "${snakeOil}/server.crt"; 110 + keyfile = "${snakeOil}/server.key"; 111 + require_certificate = true; 112 + use_identity_as_username = true; 113 + }; 114 + } 115 + ]; 116 + }; 36 117 }; 37 118 38 119 client1 = client; 39 120 client2 = client; 40 121 }; 41 122 42 - testScript = let 43 - file = "/tmp/msg"; 44 - in '' 45 - def mosquitto_cmd(binary): 123 + testScript = '' 124 + def mosquitto_cmd(binary, user, topic, port): 46 125 return ( 47 - "${pkgs.mosquitto}/bin/mosquitto_{} " 126 + "mosquitto_{} " 48 127 "-V mqttv311 " 49 128 "-h server " 50 - "-p ${toString port} " 51 - "-u ${username} " 129 + "-p {} " 130 + "-u {} " 52 131 "-P '${password}' " 53 - "-t ${topic}" 54 - ).format(binary) 132 + "-t '{}'" 133 + ).format(binary, port, user, topic) 55 134 56 135 57 - def publish(args): 58 - return "{} {}".format(mosquitto_cmd("pub"), args) 136 + def publish(args, user, topic="${topic}", port=${toString port}): 137 + return "{} {}".format(mosquitto_cmd("pub", user, topic, port), args) 59 138 60 139 61 - def subscribe(args): 62 - return "({} -C 1 {} | tee ${file} &)".format(mosquitto_cmd("sub"), args) 140 + def subscribe(args, user, topic="${topic}", port=${toString port}): 141 + return "{} -C 1 {}".format(mosquitto_cmd("sub", user, topic, port), args) 142 + 143 + def parallel(*fns): 144 + from threading import Thread 145 + threads = [ Thread(target=fn) for fn in fns ] 146 + for t in threads: t.start() 147 + for t in threads: t.join() 63 148 64 149 65 150 start_all() 66 151 server.wait_for_unit("mosquitto.service") 67 152 68 - for machine in server, client1, client2: 69 - machine.fail("test -f ${file}") 153 + def check_passwords(): 154 + client1.succeed(publish("-m test", "password_store")) 155 + client1.succeed(publish("-m test", "password_file")) 156 + client1.succeed(publish("-m test", "hashed_store")) 157 + client1.succeed(publish("-m test", "hashed_file")) 70 158 71 - # QoS = 0, so only one subscribers should get it 72 - server.execute(subscribe("-q 0")) 159 + check_passwords() 73 160 74 - # we need to give the subscribers some time to connect 75 - client2.execute("sleep 5") 76 - client2.succeed(publish("-m FOO -q 0")) 161 + def check_acl(): 162 + client1.succeed(subscribe("", "reader", topic="$SYS/#")) 163 + client1.fail(subscribe("-W 5", "writer", topic="$SYS/#")) 77 164 78 - server.wait_until_succeeds("grep -q FOO ${file}") 79 - server.execute("rm ${file}") 165 + parallel( 166 + lambda: client1.succeed(subscribe("-i 3688cdd7-aa07-42a4-be22-cb9352917e40", "reader")), 167 + lambda: [ 168 + server.wait_for_console_text("3688cdd7-aa07-42a4-be22-cb9352917e40"), 169 + client2.succeed(publish("-m test", "writer")) 170 + ]) 171 + 172 + parallel( 173 + lambda: client1.fail(subscribe("-W 5 -i 24ff16a2-ae33-4a51-9098-1b417153c712", "reader")), 174 + lambda: [ 175 + server.wait_for_console_text("24ff16a2-ae33-4a51-9098-1b417153c712"), 176 + client2.succeed(publish("-m test", "reader")) 177 + ]) 80 178 81 - # QoS = 1, so both subscribers should get it 82 - server.execute(subscribe("-q 1")) 83 - client1.execute(subscribe("-q 1")) 179 + check_acl() 84 180 85 - # we need to give the subscribers some time to connect 86 - client2.execute("sleep 5") 87 - client2.succeed(publish("-m BAR -q 1")) 181 + def check_tls(): 182 + client1.succeed( 183 + subscribe( 184 + "--cafile ${snakeOil}/ca.crt " 185 + "--cert ${snakeOil}/client1.crt " 186 + "--key ${snakeOil}/client1.key", 187 + topic="$SYS/#", 188 + port=${toString tlsPort}, 189 + user="no_such_user")) 88 190 89 - for machine in server, client1: 90 - machine.wait_until_succeeds("grep -q BAR ${file}") 91 - machine.execute("rm ${file}") 191 + check_tls() 92 192 ''; 93 193 })
-70
pkgs/applications/networking/browsers/angelfish/default.nix
··· 1 - { lib 2 - , mkDerivation 3 - , fetchurl 4 - , cmake 5 - , corrosion 6 - , extra-cmake-modules 7 - , kconfig 8 - , kcoreaddons 9 - , kdbusaddons 10 - , ki18n 11 - , kirigami2 12 - , knotifications 13 - , kpurpose 14 - , kwindowsystem 15 - , qtfeedback 16 - , qtquickcontrols2 17 - , qtwebengine 18 - , rustPlatform 19 - }: 20 - 21 - mkDerivation rec { 22 - pname = "angelfish"; 23 - version = "21.08"; 24 - 25 - src = fetchurl { 26 - url = "mirror://kde/stable/plasma-mobile/${version}/angelfish-${version}.tar.xz"; 27 - sha256 = "1gzvlha159bw767mj8lisn89592j4j4dazzfws3v4anddjh60xnh"; 28 - }; 29 - 30 - cargoDeps = rustPlatform.fetchCargoTarball { 31 - inherit src; 32 - name = "${pname}-${version}"; 33 - sha256 = "1pbvw9hdzn3i97mahdy9y6jnjsmwmjs3lxfz7q6r9r10i8swbkak"; 34 - }; 35 - 36 - nativeBuildInputs = [ 37 - cmake 38 - corrosion 39 - extra-cmake-modules 40 - ] ++ (with rustPlatform; [ 41 - cargoSetupHook 42 - rust.cargo 43 - rust.rustc 44 - ]); 45 - 46 - cmakeFlags = [ 47 - "-DRust_CARGO=${rustPlatform.rust.cargo}/bin/cargo" 48 - ]; 49 - 50 - buildInputs = [ 51 - kconfig 52 - kcoreaddons 53 - kdbusaddons 54 - ki18n 55 - kirigami2 56 - knotifications 57 - kpurpose 58 - kwindowsystem 59 - qtfeedback 60 - qtquickcontrols2 61 - qtwebengine 62 - ]; 63 - 64 - meta = with lib; { 65 - description = "Web browser for Plasma Mobile"; 66 - homepage = "https://invent.kde.org/plasma-mobile/angelfish"; 67 - license = licenses.gpl3Plus; 68 - maintainers = with maintainers; [ dotlambda ]; 69 - }; 70 - }
+6 -6
pkgs/applications/networking/browsers/chromium/upstream-info.json
··· 31 31 } 32 32 }, 33 33 "dev": { 34 - "version": "96.0.4664.18", 35 - "sha256": "0z7hplfl9mlbn07svcavzcb2gqn1hchwhhlpz0qykf6kd441kxpf", 36 - "sha256bin64": "0y09aginw5qg7apm9wvxny7y8nxhsq7gnxp1jmghfjhv5xq7pdn9", 34 + "version": "97.0.4676.0", 35 + "sha256": "1cf660h7n1d4ds63747zfc4wmwxm348grcv40zg614cpjm4q68b5", 36 + "sha256bin64": "116a4d47s3sx1pq8hhqybdsjxcv8657xaldrlix2z7jh94ip2nwh", 37 37 "deps": { 38 38 "gn": { 39 - "version": "2021-09-24", 39 + "version": "2021-10-08", 40 40 "url": "https://gn.googlesource.com/gn", 41 - "rev": "0153d369bbccc908f4da4993b1ba82728055926a", 42 - "sha256": "0y4414h8jqsbz5af6pn91c0vkfp4s281s85g992xfyl785c5zbsi" 41 + "rev": "693f9fb87e4febdd4299db9f73d8d2c958e63148", 42 + "sha256": "1qfjj2mdpflry4f9fkagvb76zwfibys4nqz9lddy1zh5nnbd9mff" 43 43 } 44 44 } 45 45 },
+2 -2
pkgs/applications/networking/cluster/flink/default.nix
··· 2 2 3 3 stdenv.mkDerivation rec { 4 4 pname = "flink"; 5 - version = "1.13.2"; 5 + version = "1.14.0"; 6 6 7 7 src = fetchurl { 8 8 url = "mirror://apache/flink/${pname}-${version}/${pname}-${version}-bin-scala_2.11.tgz"; 9 - sha256 = "sha256-GPiHV19Z2Htt75hCXK2nCeQMIBQFEEUxXlBembenFL0="; 9 + sha256 = "149b9ae774022acc0109dced893ca2d73430627a612be17ff12de8734464aff8"; 10 10 }; 11 11 12 12 nativeBuildInputs = [ makeWrapper ];
+2 -13
pkgs/applications/networking/sync/unison/default.nix
··· 7 7 , makeWrapper 8 8 , ncurses 9 9 , gnugrep 10 - , fetchpatch 11 10 , copyDesktopItems 12 11 , makeDesktopItem 13 12 , enableX11 ? true ··· 15 14 16 15 stdenv.mkDerivation rec { 17 16 pname = "unison"; 18 - version = "2.51.3"; 17 + version = "2.51.4"; 19 18 20 19 src = fetchFromGitHub { 21 20 owner = "bcpierce00"; 22 21 repo = "unison"; 23 22 rev = "v${version}"; 24 - sha256 = "sha256-42hmdMwOYSWGiDCmhuqtpCWtvtyD2l+kA/bhHD/Qh5Y="; 23 + sha256 = "sha256-jcfq4X+r98bQqbQ3gRqJyryLdt1Y/2CLawqqIiUaQOo="; 25 24 }; 26 25 27 26 nativeBuildInputs = [ makeWrapper ] 28 27 ++ lib.optional enableX11 copyDesktopItems; 29 28 buildInputs = [ ocamlPackages.ocaml ncurses ]; 30 - 31 - patches = [ 32 - # Patch to fix build with ocaml 4.12. Remove in 2.51.4 33 - # https://github.com/bcpierce00/unison/pull/481 34 - (fetchpatch { 35 - name = "fix-compile-with-ocaml-4.12.patch"; 36 - url = "https://github.com/bcpierce00/unison/commit/14b885316e0a4b41cb80fe3daef7950f88be5c8f.patch?full_index=1"; 37 - sha256 = "0j1rma1cwdsfql19zvzhfj2ys5c4lbhjcp6jrnck04xnckxxiy3d"; 38 - }) 39 - ]; 40 29 41 30 preBuild = lib.optionalString enableX11 '' 42 31 sed -i "s|\(OCAMLOPT=.*\)$|\1 -I $(echo "${ocamlPackages.lablgtk}"/lib/ocaml/*/site-lib/lablgtk2)|" src/Makefile.OCaml
+78
pkgs/applications/plasma-mobile/angelfish.nix
··· 1 + { lib 2 + , mkDerivation 3 + , fetchurl 4 + , cmake 5 + , corrosion 6 + , extra-cmake-modules 7 + , kconfig 8 + , kcoreaddons 9 + , kdbusaddons 10 + , ki18n 11 + , kirigami2 12 + , knotifications 13 + , kpurpose 14 + , kwindowsystem 15 + , qtfeedback 16 + , qtquickcontrols2 17 + , qtwebengine 18 + , rustPlatform 19 + , srcs 20 + 21 + # These must be updated in tandem with package updates. 22 + , cargoShaForVersion ? "21.08" 23 + , cargoSha256 ? "1pbvw9hdzn3i97mahdy9y6jnjsmwmjs3lxfz7q6r9r10i8swbkak" 24 + }: 25 + 26 + # Guard against incomplete updates. 27 + # Values are provided as callPackage inputs to enable easier overrides through overlays. 28 + if cargoShaForVersion != srcs.angelfish.version 29 + then builtins.throw '' 30 + angelfish package update is incomplete. 31 + Hash for cargo dependencies is declared for version ${cargoShaForVersion}, but we're building ${srcs.angelfish.version}. 32 + Update the cargoSha256 and cargoShaForVersion for angelfish. 33 + '' else 34 + 35 + mkDerivation rec { 36 + pname = "angelfish"; 37 + 38 + cargoDeps = rustPlatform.fetchCargoTarball { 39 + src = srcs.angelfish.src; 40 + name = "${pname}-${srcs.angelfish.version}"; 41 + sha256 = cargoSha256; 42 + }; 43 + 44 + nativeBuildInputs = [ 45 + cmake 46 + corrosion 47 + extra-cmake-modules 48 + ] ++ (with rustPlatform; [ 49 + cargoSetupHook 50 + rust.cargo 51 + rust.rustc 52 + ]); 53 + 54 + cmakeFlags = [ 55 + "-DRust_CARGO=${rustPlatform.rust.cargo}/bin/cargo" 56 + ]; 57 + 58 + buildInputs = [ 59 + kconfig 60 + kcoreaddons 61 + kdbusaddons 62 + ki18n 63 + kirigami2 64 + knotifications 65 + kpurpose 66 + kwindowsystem 67 + qtfeedback 68 + qtquickcontrols2 69 + qtwebengine 70 + ]; 71 + 72 + meta = with lib; { 73 + description = "Web browser for Plasma Mobile"; 74 + homepage = "https://invent.kde.org/plasma-mobile/angelfish"; 75 + license = licenses.gpl3Plus; 76 + maintainers = with maintainers; [ dotlambda ]; 77 + }; 78 + }
+61
pkgs/applications/plasma-mobile/audiotube.nix
··· 1 + { lib 2 + , mkDerivation 3 + , fetchpatch 4 + 5 + , extra-cmake-modules 6 + 7 + , kcoreaddons 8 + , kcrash 9 + , ki18n 10 + , kirigami2 11 + , qtmultimedia 12 + , qtquickcontrols2 13 + , python3Packages 14 + }: 15 + 16 + mkDerivation rec { 17 + pname = "audiotube"; 18 + 19 + patches = [ 20 + # Fix compatibility with ytmusicapi 0.19.1 21 + (fetchpatch { 22 + url = "https://invent.kde.org/plasma-mobile/audiotube/-/commit/734caa02805988200f923b88d1590b3f7dac8ac2.patch"; 23 + sha256 = "0zq4f0w84dv0630bpvmqkfmhxbvibr2fxhzy6d2mnf098028gzyd"; 24 + }) 25 + ]; 26 + 27 + nativeBuildInputs = [ 28 + extra-cmake-modules 29 + python3Packages.wrapPython 30 + python3Packages.pybind11 31 + ]; 32 + 33 + buildInputs = [ 34 + kcoreaddons 35 + kcrash 36 + ki18n 37 + kirigami2 38 + qtmultimedia 39 + qtquickcontrols2 40 + python3Packages.youtube-dl 41 + python3Packages.ytmusicapi 42 + ]; 43 + 44 + pythonPath = [ 45 + python3Packages.youtube-dl 46 + python3Packages.ytmusicapi 47 + ]; 48 + 49 + preFixup = '' 50 + buildPythonPath "$pythonPath" 51 + qtWrapperArgs+=(--prefix PYTHONPATH : "$program_PYTHONPATH") 52 + ''; 53 + 54 + meta = with lib; { 55 + description = "Client for YouTube Music"; 56 + homepage = "https://invent.kde.org/plasma-mobile/audiotube"; 57 + # https://invent.kde.org/plasma-mobile/audiotube/-/tree/c503d0607a3386112beaa9cf990ab85fe33ef115/LICENSES 58 + license = with licenses; [ bsd2 cc0 gpl2Only gpl3Only ]; 59 + maintainers = with maintainers; [ samueldr ]; 60 + }; 61 + }
+5
pkgs/applications/plasma-mobile/default.nix
··· 62 62 }; 63 63 in { 64 64 alligator = callPackage ./alligator.nix {}; 65 + angelfish = callPackage ./angelfish.nix { inherit srcs; }; 66 + audiotube = callPackage ./audiotube.nix {}; 65 67 calindori = callPackage ./calindori.nix {}; 66 68 kalk = callPackage ./kalk.nix {}; 69 + kasts = callPackage ./kasts.nix {}; 67 70 kclock = callPackage ./kclock.nix {}; 71 + keysmith = callPackage ./keysmith.nix {}; 68 72 koko = callPackage ./koko.nix {}; 69 73 krecorder = callPackage ./krecorder.nix {}; 70 74 ktrip = callPackage ./ktrip.nix {}; 75 + kweather = callPackage ./kweather.nix {}; 71 76 plasma-dialer = callPackage ./plasma-dialer.nix {}; 72 77 plasma-phonebook = callPackage ./plasma-phonebook.nix {}; 73 78 spacebar = callPackage ./spacebar.nix {};
+1 -1
pkgs/applications/plasma-mobile/fetch.sh
··· 1 - WGET_ARGS=( http://download.kde.org/stable/plasma-mobile/21.05 -A '*.tar.xz' ) 1 + WGET_ARGS=( https://download.kde.org/stable/plasma-mobile/21.08/ -A '*.tar.xz' )
+57
pkgs/applications/plasma-mobile/kasts.nix
··· 1 + { lib 2 + , mkDerivation 3 + 4 + , cmake 5 + , extra-cmake-modules 6 + , wrapGAppsHook 7 + 8 + , gst_all_1 9 + , kconfig 10 + , kcoreaddons 11 + , ki18n 12 + , kirigami2 13 + , qtmultimedia 14 + , qtquickcontrols2 15 + , syndication 16 + }: 17 + 18 + let 19 + inherit (gst_all_1) gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad; 20 + in 21 + mkDerivation rec { 22 + pname = "kasts"; 23 + 24 + nativeBuildInputs = [ 25 + cmake 26 + extra-cmake-modules 27 + wrapGAppsHook 28 + ]; 29 + 30 + buildInputs = [ 31 + gst-plugins-bad 32 + gst-plugins-base 33 + gst-plugins-good 34 + gstreamer 35 + 36 + kconfig 37 + kcoreaddons 38 + ki18n 39 + kirigami2 40 + qtquickcontrols2 41 + qtmultimedia 42 + syndication 43 + ]; 44 + 45 + preFixup = '' 46 + qtWrapperArgs+=("''${gappsWrapperArgs[@]}") 47 + ''; 48 + dontWrapGApps = true; 49 + 50 + meta = with lib; { 51 + description = "Mobile podcast application"; 52 + homepage = "https://apps.kde.org/kasts/"; 53 + # https://invent.kde.org/plasma-mobile/kasts/-/tree/master/LICENSES 54 + license = with licenses; [ bsd2 cc-by-sa-40 cc0 gpl2Only gpl2Plus gpl3Only gpl3Plus lgpl3Plus ]; 55 + maintainers = with maintainers; [ samueldr ]; 56 + }; 57 + }
+39
pkgs/applications/plasma-mobile/keysmith.nix
··· 1 + { lib 2 + , mkDerivation 3 + 4 + , cmake 5 + , extra-cmake-modules 6 + 7 + , kdbusaddons 8 + , ki18n 9 + , kirigami2 10 + , kwindowsystem 11 + , libsodium 12 + , qtquickcontrols2 13 + }: 14 + 15 + mkDerivation rec { 16 + pname = "keysmith"; 17 + 18 + nativeBuildInputs = [ 19 + cmake 20 + extra-cmake-modules 21 + ]; 22 + 23 + buildInputs = [ 24 + kdbusaddons 25 + ki18n 26 + kirigami2 27 + kwindowsystem 28 + libsodium 29 + qtquickcontrols2 30 + ]; 31 + 32 + meta = with lib; { 33 + description = "OTP client for Plasma Mobile and Desktop"; 34 + license = licenses.gpl3; 35 + homepage = "https://github.com/KDE/keysmith"; 36 + maintainers = with maintainers; [ samueldr shamilton ]; 37 + platforms = platforms.linux; 38 + }; 39 + }
+2
pkgs/applications/plasma-mobile/ktrip.nix
··· 12 12 , kirigami2 13 13 , kitemmodels 14 14 , kpublictransport 15 + , qqc2-desktop-style 15 16 , qtquickcontrols2 16 17 }: 17 18 ··· 32 33 kirigami2 33 34 kitemmodels 34 35 kpublictransport 36 + qqc2-desktop-style 35 37 qtquickcontrols2 36 38 ]; 37 39
+44
pkgs/applications/plasma-mobile/kweather.nix
··· 1 + { lib 2 + , mkDerivation 3 + 4 + , cmake 5 + , extra-cmake-modules 6 + 7 + , kconfig 8 + , ki18n 9 + , kirigami2 10 + , knotifications 11 + , kquickcharts 12 + , kweathercore 13 + , plasma-framework 14 + , qtcharts 15 + , qtquickcontrols2 16 + }: 17 + 18 + mkDerivation rec { 19 + pname = "kweather"; 20 + 21 + nativeBuildInputs = [ 22 + cmake 23 + extra-cmake-modules 24 + ]; 25 + 26 + buildInputs = [ 27 + kconfig 28 + ki18n 29 + kirigami2 30 + knotifications 31 + kquickcharts 32 + kweathercore 33 + plasma-framework 34 + qtcharts 35 + qtquickcontrols2 36 + ]; 37 + 38 + meta = with lib; { 39 + description = "Weather application for Plasma Mobile"; 40 + homepage = "https://invent.kde.org/plasma-mobile/kweather"; 41 + license = with licenses; [ gpl2Plus cc-by-40 ]; 42 + maintainers = with maintainers; [ samueldr ]; 43 + }; 44 + }
+4
pkgs/applications/plasma-mobile/spacebar.nix
··· 9 9 , kirigami2 10 10 , knotifications 11 11 , kpeople 12 + , libphonenumber 12 13 , libqofono 14 + , protobuf 13 15 , telepathy 14 16 }: 15 17 ··· 27 29 kirigami2 28 30 knotifications 29 31 kpeople 32 + libphonenumber 30 33 libqofono 34 + protobuf # Needed by libphonenumber 31 35 telepathy 32 36 ]; 33 37
+97 -57
pkgs/applications/plasma-mobile/srcs.nix
··· 1 1 # DO NOT EDIT! This file is generated automatically. 2 - # Command: ./maintainers/scripts/fetch-kde-qt.sh pkgs/applications/plasma-mobile/ 2 + # Command: ./maintainers/scripts/fetch-kde-qt.sh pkgs/applications/plasma-mobile 3 3 { fetchurl, mirror }: 4 4 5 5 { 6 6 alligator = { 7 - version = "21.05"; 7 + version = "21.08"; 8 8 src = fetchurl { 9 - url = "${mirror}/stable/plasma-mobile/21.05/alligator-21.05.tar.xz"; 10 - sha256 = "04zgxfx2zmn1p2ap08i5sfsnrly3smip4ylr07ghkhkiyjzbv9w6"; 11 - name = "alligator-21.05.tar.xz"; 9 + url = "${mirror}/stable/plasma-mobile/21.08/alligator-21.08.tar.xz"; 10 + sha256 = "1dhwfwd1v5wmx3sldpygb79kz87j13wd0arhlkm94z1whsixan0q"; 11 + name = "alligator-21.08.tar.xz"; 12 12 }; 13 13 }; 14 14 angelfish = { 15 - version = "21.05"; 15 + version = "21.08"; 16 + src = fetchurl { 17 + url = "${mirror}/stable/plasma-mobile/21.08/angelfish-21.08.tar.xz"; 18 + sha256 = "1gzvlha159bw767mj8lisn89592j4j4dazzfws3v4anddjh60xnh"; 19 + name = "angelfish-21.08.tar.xz"; 20 + }; 21 + }; 22 + audiotube = { 23 + version = "21.08"; 16 24 src = fetchurl { 17 - url = "${mirror}/stable/plasma-mobile/21.05/angelfish-21.05.tar.xz"; 18 - sha256 = "11jd5dwy0xa7kh5z5rc29xy3wfn20hm31908zjax4x83qqjrm075"; 19 - name = "angelfish-21.05.tar.xz"; 25 + url = "${mirror}/stable/plasma-mobile/21.08/audiotube-21.08.tar.xz"; 26 + sha256 = "14h4xna9v70lmp7cfpvdnz0f5a4gwgj0q3byccmawm38xsv15v8c"; 27 + name = "audiotube-21.08.tar.xz"; 20 28 }; 21 29 }; 22 30 calindori = { 23 - version = "21.05"; 31 + version = "21.08"; 24 32 src = fetchurl { 25 - url = "${mirror}/stable/plasma-mobile/21.05/calindori-21.05.tar.xz"; 26 - sha256 = "110f9ri9r1nb6q1ybhkfxljl4q5gqxikh9z0xkzjjbxjjqfscqcj"; 27 - name = "calindori-21.05.tar.xz"; 33 + url = "${mirror}/stable/plasma-mobile/21.08/calindori-21.08.tar.xz"; 34 + sha256 = "08s16a8skh02n8ygqwryxpzczj5aqr5k58aijaz2gzx45m7ym31b"; 35 + name = "calindori-21.08.tar.xz"; 28 36 }; 29 37 }; 30 38 kalk = { 31 - version = "21.05"; 39 + version = "21.08"; 40 + src = fetchurl { 41 + url = "${mirror}/stable/plasma-mobile/21.08/kalk-21.08.tar.xz"; 42 + sha256 = "0xzrahpz47yajalsfmpzmavxjwmr4bgljwyz2dhxdg40ryjxdy23"; 43 + name = "kalk-21.08.tar.xz"; 44 + }; 45 + }; 46 + kasts = { 47 + version = "21.08"; 32 48 src = fetchurl { 33 - url = "${mirror}/stable/plasma-mobile/21.05/kalk-21.05.tar.xz"; 34 - sha256 = "04n65hx0j9rx6b3jq69zgypi8qjd4ig3rfw7d44c3q7dgh4k451l"; 35 - name = "kalk-21.05.tar.xz"; 49 + url = "${mirror}/stable/plasma-mobile/21.08/kasts-21.08.tar.xz"; 50 + sha256 = "10v6icxwv46nihzbdi0n2w71bsg7l166z7jf9rb7vf2mjh1gqavn"; 51 + name = "kasts-21.08.tar.xz"; 36 52 }; 37 53 }; 38 54 kclock = { 39 - version = "21.05"; 55 + version = "21.08"; 40 56 src = fetchurl { 41 - url = "${mirror}/stable/plasma-mobile/21.05/kclock-21.05.tar.xz"; 42 - sha256 = "0pa5hvax0y80l8yrqczh9mcknfm3z0vdq3xc35cxdiz1vc6fwqmd"; 43 - name = "kclock-21.05.tar.xz"; 57 + url = "${mirror}/stable/plasma-mobile/21.08/kclock-21.08.tar.xz"; 58 + sha256 = "1zq0fxlwd7l3b6dgfqsmv1x4wvhmrjz5r0a38hbd7j7pzgyix47d"; 59 + name = "kclock-21.08.tar.xz"; 60 + }; 61 + }; 62 + keysmith = { 63 + version = "21.08"; 64 + src = fetchurl { 65 + url = "${mirror}/stable/plasma-mobile/21.08/keysmith-21.08.tar.xz"; 66 + sha256 = "0fa8inli7cwmb75af0mr2cflng0r6k3pd6ckih6ph7szqbpg2x90"; 67 + name = "keysmith-21.08.tar.xz"; 44 68 }; 45 69 }; 46 70 koko = { 47 - version = "21.05"; 71 + version = "21.08"; 48 72 src = fetchurl { 49 - url = "${mirror}/stable/plasma-mobile/21.05/koko-21.05.tar.xz"; 50 - sha256 = "00hnzkl8dvf15psrcfh96b8wfb3pbggd2f7xnadzcb87sbaml035"; 51 - name = "koko-21.05.tar.xz"; 73 + url = "${mirror}/stable/plasma-mobile/21.08/koko-21.08.tar.xz"; 74 + sha256 = "1sqlcl871m6dlrnkkhqa3xfwix01d74d7jf94r1a3p32hqljv76p"; 75 + name = "koko-21.08.tar.xz"; 52 76 }; 53 77 }; 54 78 kongress = { 55 - version = "21.05"; 79 + version = "21.08"; 56 80 src = fetchurl { 57 - url = "${mirror}/stable/plasma-mobile/21.05/kongress-21.05.tar.xz"; 58 - sha256 = "0qxgpi04ra9crc6drgbdm9arjbvcx52pprjr1dj8acch07f6i2gs"; 59 - name = "kongress-21.05.tar.xz"; 81 + url = "${mirror}/stable/plasma-mobile/21.08/kongress-21.08.tar.xz"; 82 + sha256 = "099ds4bv4ngx21f28hxcvc17wd2nk786kydwf2h5n3mdd2mgz3ka"; 83 + name = "kongress-21.08.tar.xz"; 60 84 }; 61 85 }; 62 86 krecorder = { 63 - version = "21.05"; 87 + version = "21.08"; 64 88 src = fetchurl { 65 - url = "${mirror}/stable/plasma-mobile/21.05/krecorder-21.05.tar.xz"; 66 - sha256 = "0ydaidxx2616bixihyaagvyym1r5s9rjkgg04vq9k4608d4vnn5c"; 67 - name = "krecorder-21.05.tar.xz"; 89 + url = "${mirror}/stable/plasma-mobile/21.08/krecorder-21.08.tar.xz"; 90 + sha256 = "1381x889h37saf6k875iqhwz5vbixrp7650smxp31r56ycrqq26i"; 91 + name = "krecorder-21.08.tar.xz"; 68 92 }; 69 93 }; 70 94 ktrip = { 71 - version = "21.05"; 95 + version = "21.08"; 96 + src = fetchurl { 97 + url = "${mirror}/stable/plasma-mobile/21.08/ktrip-21.08.tar.xz"; 98 + sha256 = "0ipxi3pqd7mznq3qjf9j9w3wyck85lxnr81ay6b3ricfb08ry68x"; 99 + name = "ktrip-21.08.tar.xz"; 100 + }; 101 + }; 102 + kweather = { 103 + version = "21.08"; 72 104 src = fetchurl { 73 - url = "${mirror}/stable/plasma-mobile/21.05/ktrip-21.05.tar.xz"; 74 - sha256 = "0hxgnncyc2ir6i9p6s9fy1r4mhxgm643pxvp8lj3j5y0c5wk2kp9"; 75 - name = "ktrip-21.05.tar.xz"; 105 + url = "${mirror}/stable/plasma-mobile/21.08/kweather-21.08.tar.xz"; 106 + sha256 = "0b1zjwsakwsnh6827zjhypvb04c78gwwygr7k1cy2x3finrp5if5"; 107 + name = "kweather-21.08.tar.xz"; 76 108 }; 77 109 }; 78 110 plasma-dialer = { 79 - version = "21.05"; 111 + version = "21.08"; 80 112 src = fetchurl { 81 - url = "${mirror}/stable/plasma-mobile/21.05/plasma-dialer-21.05.tar.xz"; 82 - sha256 = "0kwkjn7ry6snc86qi1j7kcq5qa6rbyk5i7v6gqf7a7wywkk9n045"; 83 - name = "plasma-dialer-21.05.tar.xz"; 113 + url = "${mirror}/stable/plasma-mobile/21.08/plasma-dialer-21.08.tar.xz"; 114 + sha256 = "14vgjg0nihhm446cfrrld1l43r50dlah5xs2ypdnm68618bdc7p1"; 115 + name = "plasma-dialer-21.08.tar.xz"; 84 116 }; 85 117 }; 86 118 plasma-phonebook = { 87 - version = "21.05"; 119 + version = "21.08"; 88 120 src = fetchurl { 89 - url = "${mirror}/stable/plasma-mobile/21.05/plasma-phonebook-21.05.tar.xz"; 90 - sha256 = "0aqqi3gvcsh4zg41zf8y0c626lwrabjchhr8pxj4n9la7y0wdvca"; 91 - name = "plasma-phonebook-21.05.tar.xz"; 121 + url = "${mirror}/stable/plasma-mobile/21.08/plasma-phonebook-21.08.tar.xz"; 122 + sha256 = "09gr5mkwhayx6k6bhm29bmcvdlqqw8jj7gydh5fz40g9z98c84km"; 123 + name = "plasma-phonebook-21.08.tar.xz"; 92 124 }; 93 125 }; 94 126 plasma-settings = { 95 - version = "21.05"; 127 + version = "21.08"; 96 128 src = fetchurl { 97 - url = "${mirror}/stable/plasma-mobile/21.05/plasma-settings-21.05.tar.xz"; 98 - sha256 = "16bhx0i8gvi9ina4jxzx02xyzypyjic9646lahxvzvzmd9hn9ipi"; 99 - name = "plasma-settings-21.05.tar.xz"; 129 + url = "${mirror}/stable/plasma-mobile/21.08/plasma-settings-21.08.tar.xz"; 130 + sha256 = "005v1gyrzl9b0k875p2wipja3l8l4awp8nl2d1jx7c28lqaspz2j"; 131 + name = "plasma-settings-21.08.tar.xz"; 100 132 }; 101 133 }; 102 134 qmlkonsole = { 103 - version = "21.05"; 135 + version = "21.08"; 104 136 src = fetchurl { 105 - url = "${mirror}/stable/plasma-mobile/21.05/qmlkonsole-21.05.tar.xz"; 106 - sha256 = "1ga48n09zlgvf5vvk2m26ak3ih5gjf361xxnyfprimmd7yj23han"; 107 - name = "qmlkonsole-21.05.tar.xz"; 137 + url = "${mirror}/stable/plasma-mobile/21.08/qmlkonsole-21.08.tar.xz"; 138 + sha256 = "1p3ysf6sgiji86400523hm67rvw3znj3a7k6g6s83dxynxdh2faq"; 139 + name = "qmlkonsole-21.08.tar.xz"; 108 140 }; 109 141 }; 110 142 spacebar = { 111 - version = "21.05"; 143 + version = "21.08"; 144 + src = fetchurl { 145 + url = "${mirror}/stable/plasma-mobile/21.08/spacebar-21.08.tar.xz"; 146 + sha256 = "1cg36iys4x7p97ywilnp2lzz1ry5a1m7jz38yh2yiw6m8wvzfqff"; 147 + name = "spacebar-21.08.tar.xz"; 148 + }; 149 + }; 150 + tokodon = { 151 + version = "21.08"; 112 152 src = fetchurl { 113 - url = "${mirror}/stable/plasma-mobile/21.05/spacebar-21.05.tar.xz"; 114 - sha256 = "16lvi5yzmvk6gb5m7csk44y2jbkk7psn1lkljmj1938p2475b94c"; 115 - name = "spacebar-21.05.tar.xz"; 153 + url = "${mirror}/stable/plasma-mobile/21.08/tokodon-21.08.tar.xz"; 154 + sha256 = "0j9zfcdss1872hv8xxrmy0jjmcz3y5kdz8gdrd6qmig5scrzjvnf"; 155 + name = "tokodon-21.08.tar.xz"; 116 156 }; 117 157 }; 118 158 }
+49
pkgs/applications/radio/freedv/default.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , cmake 5 + , codec2 6 + , libsamplerate 7 + , libsndfile 8 + , lpcnetfreedv 9 + , portaudio 10 + , speexdsp 11 + , hamlib 12 + , wxGTK31-gtk3 13 + }: 14 + 15 + stdenv.mkDerivation rec { 16 + pname = "freedv"; 17 + version = "1.6.1"; 18 + 19 + src = fetchFromGitHub { 20 + owner = "drowe67"; 21 + repo = "freedv-gui"; 22 + rev = "v${version}"; 23 + sha256 = "1dzhf944vgla9a5ilcgwivhzgdbfaknqnwbpb071a0rz8rajnv0q"; 24 + }; 25 + 26 + nativeBuildInputs = [ cmake ]; 27 + buildInputs = [ 28 + codec2 29 + libsamplerate 30 + libsndfile 31 + lpcnetfreedv 32 + portaudio 33 + speexdsp 34 + hamlib 35 + wxGTK31-gtk3 36 + ]; 37 + 38 + cmakeFlags = [ 39 + "-DUSE_INTERNAL_CODEC2:BOOL=FALSE" 40 + "-DUSE_STATIC_DEPS:BOOL=FALSE" 41 + ]; 42 + 43 + meta = with lib; { 44 + homepage = "https://freedv.org/"; 45 + description = "Digital voice for HF radio"; 46 + license = licenses.lgpl21; 47 + maintainers = with maintainers; [ mvs ]; 48 + }; 49 + }
+2 -2
pkgs/applications/radio/sdrangel/default.nix
··· 33 33 34 34 mkDerivation rec { 35 35 pname = "sdrangel"; 36 - version = "6.16.3"; 36 + version = "6.17.1"; 37 37 38 38 src = fetchFromGitHub { 39 39 owner = "f4exb"; 40 40 repo = "sdrangel"; 41 41 rev = "v${version}"; 42 - sha256 = "sha256-qgFnl9IliKRI4TptpXyK9JHzpLEUQ7NZLIfc0AROCvA="; 42 + sha256 = "sha256-VWHFrgJVyI3CtLXUiG3/4/cRTD8jSdunbrro34yLKvs="; 43 43 fetchSubmodules = false; 44 44 }; 45 45
+17 -7
pkgs/applications/version-management/gitoxide/default.nix
··· 1 - { lib, stdenv, rustPlatform, cmake, fetchFromGitHub, pkg-config, openssl 2 - , libiconv, Security, SystemConfiguration }: 1 + { lib 2 + , rustPlatform 3 + , fetchFromGitHub 4 + , cmake 5 + , pkg-config 6 + , stdenv 7 + , libiconv 8 + , Security 9 + , SystemConfiguration 10 + , openssl 11 + }: 3 12 4 13 rustPlatform.buildRustPackage rec { 5 14 pname = "gitoxide"; 6 - version = "0.8.4"; 15 + version = "0.10.0"; 7 16 8 17 src = fetchFromGitHub { 9 18 owner = "Byron"; 10 19 repo = "gitoxide"; 11 20 rev = "v${version}"; 12 - sha256 = "WH8YiW1X7TkURjncm0OefxrZhnhGHaGLwxRNxe17g/0="; 21 + sha256 = "sha256-c29gmmkIOyS+HNq2kv53yq+sdEDmQbSmcvVGcd55/hk="; 13 22 }; 14 23 15 - cargoSha256 = "eTPJMYl9m81o4PJKfpDs61KmehSvKnY+bgybEodOhAM="; 24 + cargoSha256 = "sha256-oc7XpiOZj4bfqdwrEHj/CzNtWzYWFkgMJOySJNgxAGQ="; 16 25 17 26 nativeBuildInputs = [ cmake pkg-config ]; 18 27 buildInputs = if stdenv.isDarwin 19 - then [ libiconv Security SystemConfiguration] 28 + then [ libiconv Security SystemConfiguration ] 20 29 else [ openssl ]; 21 30 22 31 # Needed to get openssl-sys to use pkg-config. ··· 25 34 meta = with lib; { 26 35 description = "A command-line application for interacting with git repositories"; 27 36 homepage = "https://github.com/Byron/gitoxide"; 37 + changelog = "https://github.com/Byron/gitoxide/blob/v${version}/CHANGELOG.md"; 28 38 license = with licenses; [ mit /* or */ asl20 ]; 29 - maintainers = [ maintainers.syberant ]; 39 + maintainers = with maintainers; [ syberant ]; 30 40 }; 31 41 }
+2 -2
pkgs/development/compilers/crystal/default.nix
··· 241 241 }; 242 242 243 243 crystal_1_2 = generic { 244 - version = "1.2.0"; 245 - sha256 = "sha256-38mmsolzmCnv+MFUMc+AEiklDLBHIr/jqXMLzc0nVq4="; 244 + version = "1.2.1"; 245 + sha256 = "sha256-jyNmY3n+u8WoVqHY8B5H9Vr9Ix3RogCtm8irkXZ3aek="; 246 246 binary = crystal_1_1; 247 247 }; 248 248
+35
pkgs/development/libraries/kweathercore/default.nix
··· 1 + { mkDerivation 2 + , lib 3 + , fetchFromGitLab 4 + , extra-cmake-modules 5 + , ki18n 6 + , qtlocation 7 + }: 8 + 9 + mkDerivation rec { 10 + pname = "kweathercore"; 11 + version = "0.5"; 12 + 13 + src = fetchFromGitLab { 14 + domain = "invent.kde.org"; 15 + owner = "libraries"; 16 + repo = pname; 17 + rev = "v${version}"; 18 + sha256 = "08ipabskhsbspkzzdlpwl89r070q8d0vc9500ma6d5i9fnpmkz6d"; 19 + }; 20 + 21 + buildInputs = [ 22 + ki18n 23 + qtlocation 24 + ]; 25 + 26 + nativeBuildInputs = [ extra-cmake-modules ]; 27 + 28 + meta = with lib; { 29 + license = [ licenses.cc0 ]; 30 + maintainers = [ maintainers.samueldr ]; 31 + description = '' 32 + Library to facilitate retrieval of weather information including forecasts and alerts 33 + ''; 34 + }; 35 + }
+34
pkgs/development/libraries/lpcnetfreedv/default.nix
··· 1 + { lib, stdenv, fetchFromGitHub, fetchurl, cmake, codec2 }: 2 + 3 + let 4 + dataVersion = "191005_v1.0"; 5 + data = fetchurl { 6 + url = "http://rowetel.com/downloads/deep/lpcnet_${dataVersion}.tgz"; 7 + sha256 = "1j1695hm2pg6ri611f9kr3spm4yxvpikws55z9zxizai8y94152h"; 8 + }; 9 + in stdenv.mkDerivation rec { 10 + pname = "lpcnetfreedv"; 11 + version = "unstable-2021-06-29"; 12 + 13 + src = fetchFromGitHub { 14 + owner = "drowe67"; 15 + repo = "LPCNet"; 16 + rev = "0dc5935bbf49ff3ba3c9654cc2f802838ebbaead"; 17 + sha256 = "0r6488z40fkar11ync8achpg5l6qz7y7cbh7cs3b3w4fsxn58q9i"; 18 + }; 19 + 20 + nativeBuildInputs = [ cmake ]; 21 + buildInputs = [ codec2 ]; 22 + 23 + postPatch = '' 24 + mkdir build 25 + ln -s ${data} build/lpcnet_${dataVersion}.tgz 26 + ''; 27 + 28 + meta = with lib; { 29 + homepage = "https://freedv.org/"; 30 + description = "Experimental Neural Net speech coding for FreeDV"; 31 + license = licenses.bsd3; 32 + maintainers = with maintainers; [ mvs ]; 33 + }; 34 + }
+2 -2
pkgs/development/libraries/pulseaudio-qt/default.nix
··· 9 9 10 10 mkDerivation rec { 11 11 pname = "pulseaudio-qt"; 12 - version = "1.2.0"; 12 + version = "1.3.0"; 13 13 14 14 src = fetchurl { 15 15 url = "mirror://kde/stable/${pname}/${pname}-${lib.versions.majorMinor version}.tar.xz"; 16 - sha256 = "1i0ql68kxv9jxs24rsd3s7jhjid3f2fq56fj4wbp16zb4wd14099"; 16 + sha256 = "1i4yb0v1mmhih8c2i61hybg6q60qys3pc5wbjb7a0vwl1mihgsxw"; 17 17 }; 18 18 19 19 buildInputs = [
+7 -3
pkgs/development/tools/delve/default.nix
··· 2 2 3 3 buildGoPackage rec { 4 4 pname = "delve"; 5 - version = "1.7.1"; 5 + version = "1.7.2"; 6 6 7 7 goPackagePath = "github.com/go-delve/delve"; 8 8 excludedPackages = "\\(_fixtures\\|scripts\\|service/test\\)"; ··· 11 11 owner = "go-delve"; 12 12 repo = "delve"; 13 13 rev = "v${version}"; 14 - sha256 = "sha256-dnmV7LZjq86AwLWXfWBGm1pmFM0uipv1FwR6EhV8CZQ="; 14 + sha256 = "sha256-Mye8Gh73yQ1fhjVpEOKBQGjdOzgMUqzdNiBjRRTteTg="; 15 15 }; 16 16 17 17 subPackages = [ "cmd/dlv" ]; ··· 22 22 # fortify source breaks build since delve compiles with -O0 23 23 wrapProgram $out/bin/dlv \ 24 24 --prefix disableHardening " " fortify 25 + 26 + # add symlink for vscode golang extension 27 + # https://github.com/golang/vscode-go/blob/master/docs/debugging.md#manually-installing-dlv-dap 28 + ln $out/bin/dlv $out/bin/dlv-dap 25 29 ''; 26 30 27 31 meta = with lib; { 28 32 description = "debugger for the Go programming language"; 29 33 homepage = "https://github.com/derekparker/delve"; 30 - maintainers = with maintainers; [ vdemeester ]; 34 + maintainers = with maintainers; [ SuperSandro2000 vdemeester ]; 31 35 license = licenses.mit; 32 36 platforms = [ "x86_64-linux" ] ++ platforms.darwin; 33 37 };
+4 -2
pkgs/development/tools/qtcreator/default.nix
··· 20 20 21 21 mkDerivation rec { 22 22 pname = "qtcreator"; 23 - version = "4.14.0"; 23 + version = "5.0.2"; 24 24 baseVersion = builtins.concatStringsSep "." (lib.take 2 (builtins.splitVersion version)); 25 25 26 26 src = fetchurl { 27 27 url = "http://download.qt-project.org/official_releases/${pname}/${baseVersion}/${version}/qt-creator-opensource-src-${version}.tar.xz"; 28 - sha256 = "07i045mzwbfhwj2jlijhz9xs6ay03qs5dgcw2kzlcr79a69i0h6j"; 28 + sha256 = "1bf07150226da46237f26f5eaa9f090ce81ed79b9bc75e0dfa6328043e360103"; 29 29 }; 30 30 31 31 buildInputs = [ qtbase qtscript qtquickcontrols qtdeclarative elfutils.dev ] ++ ··· 75 75 ''; 76 76 77 77 postInstall = '' 78 + mkdir -p $out/share/applications 79 + cp share/applications/org.qt-project.qtcreator.desktop $out/share/applications 78 80 substituteInPlace $out/share/applications/org.qt-project.qtcreator.desktop \ 79 81 --replace "Exec=qtcreator" "Exec=$out/bin/qtcreator" 80 82 '';
+3 -1
pkgs/games/factorio/update.py
··· 89 89 for system in SYSTEMS: 90 90 for release_type in RELEASE_TYPES: 91 91 for release_channel in RELEASE_CHANNELS: 92 - version = factorio_versions[release_channel.name][release_type.name] 92 + version = factorio_versions[release_channel.name].get(release_type.name) 93 + if version == None: 94 + continue 93 95 this_release = { 94 96 "name": f"factorio_{release_type.name}_{system.tar_name}-{version}.tar.xz", 95 97 "url": f"https://factorio.com/get-download/{version}/{release_type.name}/{system.url_name}",
+20 -28
pkgs/games/factorio/versions.json
··· 2 2 "x86_64-linux": { 3 3 "alpha": { 4 4 "experimental": { 5 - "name": "factorio_alpha_x64-1.1.39.tar.xz", 5 + "name": "factorio_alpha_x64-1.1.42.tar.xz", 6 6 "needsAuth": true, 7 - "sha256": "1wyvk0niyppg7h9ayfsiy6x309bjwsbgf62nah13aps89jk8n1pc", 7 + "sha256": "08h2pxzsk7sigjqnqm1jxya3i9i5g2mgl378gmbp2jcy2mnn4dvm", 8 8 "tarDirectory": "x64", 9 - "url": "https://factorio.com/get-download/1.1.39/alpha/linux64", 10 - "version": "1.1.39" 9 + "url": "https://factorio.com/get-download/1.1.42/alpha/linux64", 10 + "version": "1.1.42" 11 11 }, 12 12 "stable": { 13 - "name": "factorio_alpha_x64-1.1.38.tar.xz", 13 + "name": "factorio_alpha_x64-1.1.42.tar.xz", 14 14 "needsAuth": true, 15 - "sha256": "0cjhfyz4j06yn08n239ajjjpgykh39hzifhmd0ygr5szw9gdc851", 15 + "sha256": "08h2pxzsk7sigjqnqm1jxya3i9i5g2mgl378gmbp2jcy2mnn4dvm", 16 16 "tarDirectory": "x64", 17 - "url": "https://factorio.com/get-download/1.1.38/alpha/linux64", 18 - "version": "1.1.38" 17 + "url": "https://factorio.com/get-download/1.1.42/alpha/linux64", 18 + "version": "1.1.42" 19 19 } 20 20 }, 21 21 "demo": { 22 - "experimental": { 23 - "name": "factorio_demo_x64-1.1.37.tar.xz", 24 - "needsAuth": false, 25 - "sha256": "06qwx9wd3990d3256y9y5qsxa0936076jgwhinmrlvjp9lxwl4ly", 26 - "tarDirectory": "x64", 27 - "url": "https://factorio.com/get-download/1.1.37/demo/linux64", 28 - "version": "1.1.37" 29 - }, 30 22 "stable": { 31 - "name": "factorio_demo_x64-1.1.38.tar.xz", 23 + "name": "factorio_demo_x64-1.1.42.tar.xz", 32 24 "needsAuth": false, 33 - "sha256": "0y53w01dyfmavw1yxbjqjiirmvw32bnf9bqz0isnd72dvkg0kziv", 25 + "sha256": "155m1ijdbc7szhpdw8f8g82ysd7av9zb6llqq4z96nn834px9m2d", 34 26 "tarDirectory": "x64", 35 - "url": "https://factorio.com/get-download/1.1.38/demo/linux64", 36 - "version": "1.1.38" 27 + "url": "https://factorio.com/get-download/1.1.42/demo/linux64", 28 + "version": "1.1.42" 37 29 } 38 30 }, 39 31 "headless": { 40 32 "experimental": { 41 - "name": "factorio_headless_x64-1.1.39.tar.xz", 33 + "name": "factorio_headless_x64-1.1.42.tar.xz", 42 34 "needsAuth": false, 43 - "sha256": "06figqmyd5bgwhpppziag4hs7x3ixr7wd8186cza3ly57bibha2m", 35 + "sha256": "1l217fcjcwfi0g5dilsi703cl0wyxsqdqn422hwdbp2ql839k422", 44 36 "tarDirectory": "x64", 45 - "url": "https://factorio.com/get-download/1.1.39/headless/linux64", 46 - "version": "1.1.39" 37 + "url": "https://factorio.com/get-download/1.1.42/headless/linux64", 38 + "version": "1.1.42" 47 39 }, 48 40 "stable": { 49 - "name": "factorio_headless_x64-1.1.38.tar.xz", 41 + "name": "factorio_headless_x64-1.1.42.tar.xz", 50 42 "needsAuth": false, 51 - "sha256": "1c929pa9ifz0cvmx9k5yd267hjd5p7fdbln0czl3dq1vlskk1w71", 43 + "sha256": "1l217fcjcwfi0g5dilsi703cl0wyxsqdqn422hwdbp2ql839k422", 52 44 "tarDirectory": "x64", 53 - "url": "https://factorio.com/get-download/1.1.38/headless/linux64", 54 - "version": "1.1.38" 45 + "url": "https://factorio.com/get-download/1.1.42/headless/linux64", 46 + "version": "1.1.42" 55 47 } 56 48 } 57 49 }
+8 -3
pkgs/servers/hqplayerd/default.nix
··· 1 1 { stdenv 2 2 , alsa-lib 3 + , addOpenGLRunpath 3 4 , autoPatchelfHook 4 5 , cairo 5 6 , fetchurl ··· 28 29 ${rpmextract}/bin/rpmextract $src 29 30 ''; 30 31 31 - nativeBuildInputs = [ autoPatchelfHook rpmextract ]; 32 + nativeBuildInputs = [ addOpenGLRunpath autoPatchelfHook rpmextract ]; 32 33 33 34 buildInputs = [ 34 35 alsa-lib ··· 86 87 --replace "NetworkManager-wait-online.service" "" 87 88 ''; 88 89 89 - postFixup = '' 90 - patchelf --replace-needed libomp.so.5 libomp.so $out/bin/hqplayerd 90 + # NB: addOpenGLRunpath needs to run _after_ autoPatchelfHook, which runs in 91 + # postFixup, so we tack it on here. 92 + doInstallCheck = true; 93 + installCheckPhase = '' 94 + addOpenGLRunpath $out/bin/hqplayerd 95 + $out/bin/hqplayerd --version 91 96 ''; 92 97 93 98 meta = with lib; {
+1 -3
pkgs/servers/sql/postgresql/packages.nix
··· 1 1 self: super: { 2 2 3 - age = super.callPackage ./ext/age.nix { 4 - bison = self.bison_3_5; 5 - }; 3 + age = super.callPackage ./ext/age.nix { }; 6 4 7 5 periods = super.callPackage ./ext/periods.nix { }; 8 6
+5
pkgs/servers/web-apps/discourse/default.nix
··· 266 266 267 267 # Make sure the notification email setting applies 268 268 ./notification_email.patch 269 + 270 + # Change the path to the public directory reported by Discourse 271 + # to its real path instead of the symlink in the store, since 272 + # the store path won't be matched by any nginx rules 273 + ./public_dir_path.patch 269 274 ]; 270 275 271 276 postPatch = ''
+13
pkgs/servers/web-apps/discourse/public_dir_path.patch
··· 1 + diff --git a/lib/file_store/local_store.rb b/lib/file_store/local_store.rb 2 + index 25649532c0..614e062dc1 100644 3 + --- a/lib/file_store/local_store.rb 4 + +++ b/lib/file_store/local_store.rb 5 + @@ -88,7 +88,7 @@ module FileStore 6 + end 7 + 8 + def public_dir 9 + - File.join(Rails.root, "public") 10 + + "/run/discourse/public" 11 + end 12 + 13 + def tombstone_dir
+17 -7
pkgs/tools/misc/ethtool/default.nix
··· 1 - { lib, stdenv, fetchurl, pkg-config, libmnl }: 1 + { lib 2 + , stdenv 3 + , fetchurl 4 + , libmnl 5 + , pkg-config 6 + }: 2 7 3 8 stdenv.mkDerivation rec { 4 9 pname = "ethtool"; 5 - version = "5.13"; 10 + version = "5.14"; 6 11 7 12 src = fetchurl { 8 13 url = "mirror://kernel/software/network/${pname}/${pname}-${version}.tar.xz"; 9 - sha256 = "1wwcwiav0fbl75axmx8wms4xfdp1ji5c7j49k4yl8bngqra74fp6"; 14 + sha256 = "sha256-uxPbkZFcrNekkrZbZd8Hpn5Ll03b6vdiBbGUWiPSdoY="; 10 15 }; 11 16 12 - nativeBuildInputs = [ pkg-config ]; 13 - buildInputs = [ libmnl ]; 17 + nativeBuildInputs = [ 18 + pkg-config 19 + ]; 20 + 21 + buildInputs = [ 22 + libmnl 23 + ]; 14 24 15 25 meta = with lib; { 16 26 description = "Utility for controlling network drivers and hardware"; 17 27 homepage = "https://www.kernel.org/pub/software/network/ethtool/"; 18 - license = licenses.gpl2; 28 + license = licenses.gpl2Plus; 19 29 platforms = platforms.linux; 20 - maintainers = [ maintainers.bjornfor ]; 30 + maintainers = with maintainers; [ bjornfor ]; 21 31 }; 22 32 }
-40
pkgs/tools/security/keysmith/default.nix
··· 1 - { lib 2 - , mkDerivation 3 - , makeWrapper 4 - , fetchFromGitHub 5 - , cmake 6 - , extra-cmake-modules 7 - , qtbase 8 - , qtquickcontrols2 9 - , qtdeclarative 10 - , qtgraphicaleffects 11 - , kirigami2 12 - , oathToolkit 13 - , ki18n 14 - , libsodium 15 - }: 16 - mkDerivation rec { 17 - 18 - pname = "keysmith"; 19 - version = "0.2"; 20 - 21 - src = fetchFromGitHub { 22 - owner = "KDE"; 23 - repo = "keysmith"; 24 - rev = "v${version}"; 25 - sha256 = "1gvzw23mly8cp7ag3xpbngpid9gqrfj8cyv9dar6i9j660bh03km"; 26 - }; 27 - 28 - nativeBuildInputs = [ cmake extra-cmake-modules makeWrapper ]; 29 - 30 - buildInputs = [ libsodium ki18n oathToolkit kirigami2 qtquickcontrols2 qtbase ]; 31 - propagatedBuildInput = [ oathToolkit ]; 32 - 33 - meta = with lib; { 34 - description = "OTP client for Plasma Mobile and Desktop"; 35 - license = licenses.gpl3; 36 - homepage = "https://github.com/KDE/keysmith"; 37 - maintainers = with maintainers; [ shamilton ]; 38 - platforms = platforms.linux; 39 - }; 40 - }
+22
pkgs/tools/text/anewer/default.nix
··· 1 + { lib, rustPlatform, fetchFromGitHub }: 2 + 3 + rustPlatform.buildRustPackage rec { 4 + pname = "anewer"; 5 + version = "0.1.6"; 6 + 7 + src = fetchFromGitHub { 8 + owner = "ysf"; 9 + repo = pname; 10 + rev = version; 11 + sha256 = "181mi674354bddnq894yyq587w7skjh35vn61i41vfi6lqz5dy3d"; 12 + }; 13 + 14 + cargoSha256 = "sha256-LJ0l5CZM5NqdbCZe4ELkYf9EkKyBxL/LrNmFy+JS6gM="; 15 + 16 + meta = with lib; { 17 + description = "Append lines from stdin to a file if they don't already exist in the file"; 18 + homepage = "https://github.com/ysf/anewer"; 19 + license = licenses.gpl3Plus; 20 + maintainers = with maintainers; [ figsoda ]; 21 + }; 22 + }
+2
pkgs/top-level/aliases.nix
··· 53 53 aminal = throw "aminal was renamed to darktile."; # added 2021-09-28 54 54 ammonite-repl = ammonite; # added 2017-05-02 55 55 amsn = throw "amsn has been removed due to being unmaintained."; # added 2020-12-09 56 + angelfish = libsForQt5.plasmaMobileGear.angelfish; # added 2021-10-06 56 57 antimicro = throw "antimicro has been removed as it was broken, see antimicroX instead."; # added 2020-08-06 57 58 arduino_core = arduino-core; # added 2015-02-04 58 59 ardour_5 = throw "ardour_5 has been removed. see https://github.com/NixOS/nixpkgs/issues/139549"; # added 2021-09-28 ··· 390 391 keepassx2-http = keepassx-reboot; # added 2016-10-17 391 392 kexectools = kexec-tools; # added 2021-09-03 392 393 keybase-go = keybase; # added 2016-08-24 394 + keysmith = libsForQt5.plasmaMobileGear.keysmith; # added 2021-07-14 393 395 kinetic-cpp-client = throw "kinetic-cpp-client has been removed from nixpkgs, as it's abandoned."; # 2020-04-28 394 396 kicad-with-packages3d = kicad; # added 2019-11-25 395 397 kindlegen = throw "kindlegen has been removed from nixpkgs, as it's abandoned and no longer available for download."; # 2021-03-09
+6 -4
pkgs/top-level/all-packages.nix
··· 1178 1178 stdenv = if stdenv.targetPlatform.isAarch64 then gcc10Stdenv else stdenv; 1179 1179 }); 1180 1180 1181 + anewer = callPackage ../tools/text/anewer { }; 1182 + 1181 1183 angle-grinder = callPackage ../tools/text/angle-grinder {}; 1182 1184 1183 1185 ansifilter = callPackage ../tools/text/ansifilter {}; ··· 6800 6802 6801 6803 lottieconverter = callPackage ../tools/misc/lottieconverter { }; 6802 6804 6805 + lpcnetfreedv = callPackage ../development/libraries/lpcnetfreedv { }; 6806 + 6803 6807 lsd = callPackage ../tools/misc/lsd { }; 6804 6808 6805 6809 lsdvd = callPackage ../tools/cd-dvd/lsdvd {}; ··· 7035 7039 kcollectd = libsForQt5.callPackage ../tools/misc/kcollectd {}; 7036 7040 7037 7041 kea = callPackage ../tools/networking/kea { }; 7038 - 7039 - keysmith = libsForQt5.callPackage ../tools/security/keysmith { }; 7040 7042 7041 7043 ispell = callPackage ../tools/text/ispell {}; 7042 7044 ··· 23652 23654 }); 23653 23655 android-studio = androidStudioPackages.stable; 23654 23656 23655 - angelfish = libsForQt5.callPackage ../applications/networking/browsers/angelfish { }; 23656 - 23657 23657 animbar = callPackage ../applications/graphics/animbar { }; 23658 23658 23659 23659 antfs-cli = callPackage ../applications/misc/antfs-cli {}; ··· 24988 24988 scipy 24989 24989 shiboken2; 24990 24990 }; 24991 + 24992 + freedv = callPackage ../applications/radio/freedv { }; 24991 24993 24992 24994 freemind = callPackage ../applications/misc/freemind { 24993 24995 jdk = jdk8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
+2
pkgs/top-level/qt5-packages.nix
··· 108 108 109 109 kquickimageedit = callPackage ../development/libraries/kquickimageedit { }; 110 110 111 + kweathercore = libsForQt5.callPackage ../development/libraries/kweathercore { }; 112 + 111 113 ldutils = callPackage ../development/libraries/ldutils { }; 112 114 113 115 libcommuni = callPackage ../development/libraries/libcommuni { };