diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 842797d24302..2500fe2a71f5 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -787,6 +787,7 @@ ./services/networking/chisel-server.nix ./services/networking/cjdns.nix ./services/networking/cloudflare-dyndns.nix + ./services/networking/cloudflared.nix ./services/networking/cntlm.nix ./services/networking/connman.nix ./services/networking/consul.nix diff --git a/nixos/modules/services/audio/botamusique.nix b/nixos/modules/services/audio/botamusique.nix index 4cd900f945c8..5d3f7db12bc9 100644 --- a/nixos/modules/services/audio/botamusique.nix +++ b/nixos/modules/services/audio/botamusique.nix @@ -103,9 +103,8 @@ in StateDirectory = "botamusique"; SystemCallArchitectures = "native"; SystemCallFilter = [ - "@system-service" + "@system-service @resources" "~@privileged" - "~@resources" ]; UMask = "0077"; WorkingDirectory = "/var/lib/botamusique"; diff --git a/nixos/modules/services/networking/cloudflared.nix b/nixos/modules/services/networking/cloudflared.nix new file mode 100644 index 000000000000..67aa74f892dd --- /dev/null +++ b/nixos/modules/services/networking/cloudflared.nix @@ -0,0 +1,332 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.services.cloudflared; + + originRequest = { + connectTimeout = mkOption { + type = with types; nullOr str; + default = null; + example = "30s"; + description = lib.mdDoc '' + Timeout for establishing a new TCP connection to your origin server. This excludes the time taken to establish TLS, which is controlled by [https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/configuration/local-management/ingress/#tlstimeout](tlsTimeout). + ''; + }; + + tlsTimeout = mkOption { + type = with types; nullOr str; + default = null; + example = "10s"; + description = lib.mdDoc '' + Timeout for completing a TLS handshake to your origin server, if you have chosen to connect Tunnel to an HTTPS server. + ''; + }; + + tcpKeepAlive = mkOption { + type = with types; nullOr str; + default = null; + example = "30s"; + description = lib.mdDoc '' + The timeout after which a TCP keepalive packet is sent on a connection between Tunnel and the origin server. + ''; + }; + + noHappyEyeballs = mkOption { + type = with types; nullOr bool; + default = null; + example = false; + description = lib.mdDoc '' + Disable the “happy eyeballs” algorithm for IPv4/IPv6 fallback if your local network has misconfigured one of the protocols. + ''; + }; + + keepAliveConnections = mkOption { + type = with types; nullOr int; + default = null; + example = 100; + description = lib.mdDoc '' + Maximum number of idle keepalive connections between Tunnel and your origin. This does not restrict the total number of concurrent connections. + ''; + }; + + keepAliveTimeout = mkOption { + type = with types; nullOr str; + default = null; + example = "1m30s"; + description = lib.mdDoc '' + Timeout after which an idle keepalive connection can be discarded. + ''; + }; + + httpHostHeader = mkOption { + type = with types; nullOr str; + default = null; + example = ""; + description = lib.mdDoc '' + Sets the HTTP `Host` header on requests sent to the local service. + ''; + }; + + originServerName = mkOption { + type = with types; nullOr str; + default = null; + example = ""; + description = lib.mdDoc '' + Hostname that `cloudflared` should expect from your origin server certificate. + ''; + }; + + caPool = mkOption { + type = with types; nullOr (either str path); + default = null; + example = ""; + description = lib.mdDoc '' + Path to the certificate authority (CA) for the certificate of your origin. This option should be used only if your certificate is not signed by Cloudflare. + ''; + }; + + noTLSVerify = mkOption { + type = with types; nullOr bool; + default = null; + example = false; + description = lib.mdDoc '' + Disables TLS verification of the certificate presented by your origin. Will allow any certificate from the origin to be accepted. + ''; + }; + + disableChunkedEncoding = mkOption { + type = with types; nullOr bool; + default = null; + example = false; + description = lib.mdDoc '' + Disables chunked transfer encoding. Useful if you are running a WSGI server. + ''; + }; + + proxyAddress = mkOption { + type = with types; nullOr str; + default = null; + example = "127.0.0.1"; + description = lib.mdDoc '' + `cloudflared` starts a proxy server to translate HTTP traffic into TCP when proxying, for example, SSH or RDP. This configures the listen address for that proxy. + ''; + }; + + proxyPort = mkOption { + type = with types; nullOr int; + default = null; + example = 0; + description = lib.mdDoc '' + `cloudflared` starts a proxy server to translate HTTP traffic into TCP when proxying, for example, SSH or RDP. This configures the listen port for that proxy. If set to zero, an unused port will randomly be chosen. + ''; + }; + + proxyType = mkOption { + type = with types; nullOr (enum [ "" "socks" ]); + default = null; + example = ""; + description = lib.mdDoc '' + `cloudflared` starts a proxy server to translate HTTP traffic into TCP when proxying, for example, SSH or RDP. This configures what type of proxy will be started. Valid options are: + + - `""` for the regular proxy + - `"socks"` for a SOCKS5 proxy. Refer to the [https://developers.cloudflare.com/cloudflare-one/tutorials/kubectl/](tutorial on connecting through Cloudflare Access using kubectl) for more information. + ''; + }; + }; +in +{ + options.services.cloudflared = { + enable = mkEnableOption (lib.mdDoc "Cloudflare Tunnel client daemon (formerly Argo Tunnel)"); + + user = mkOption { + type = types.str; + default = "cloudflared"; + description = lib.mdDoc "User account under which Cloudflared runs."; + }; + + group = mkOption { + type = types.str; + default = "cloudflared"; + description = lib.mdDoc "Group under which cloudflared runs."; + }; + + package = mkOption { + type = types.package; + default = pkgs.cloudflared; + defaultText = "pkgs.cloudflared"; + description = lib.mdDoc "The package to use for Cloudflared."; + }; + + tunnels = mkOption { + description = lib.mdDoc '' + Cloudflare tunnels. + ''; + type = types.attrsOf (types.submodule ({ name, ... }: { + options = { + inherit originRequest; + + credentialsFile = mkOption { + type = with types; nullOr str; + default = null; + description = lib.mdDoc '' + Credential file. + + See [https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-useful-terms/#credentials-file](Credentials file). + ''; + }; + + warp-routing = { + enabled = mkOption { + type = with types; nullOr bool; + default = null; + description = lib.mdDoc '' + Enable warp routing. + + See [https://developers.cloudflare.com/cloudflare-one/tutorials/warp-to-tunnel/](Connect from WARP to a private network on Cloudflare using Cloudflare Tunnel). + ''; + }; + }; + + default = mkOption { + type = with types; nullOr str; + default = null; + description = lib.mdDoc '' + Catch-all service if no ingress matches. + + See `service`. + ''; + example = "http_status:404"; + }; + + ingress = mkOption { + type = with types; attrsOf (either str (submodule ({ hostname, ... }: { + options = { + inherit originRequest; + + service = mkOption { + type = with types; nullOr str; + default = null; + description = lib.mdDoc '' + Service to pass the traffic. + + See [https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/configuration/local-management/ingress/#supported-protocols](Supported protocols). + ''; + example = "http://localhost:80, tcp://localhost:8000, unix:/home/production/echo.sock, hello_world or http_status:404"; + }; + + path = mkOption { + type = with types; nullOr str; + default = null; + description = lib.mdDoc '' + Path filter. + + If not specified, all paths will be matched. + ''; + example = "/*.(jpg|png|css|js)"; + }; + + }; + }))); + default = { }; + description = lib.mdDoc '' + Ingress rules. + + See [https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/configuration/local-management/ingress/](Ingress rules). + ''; + example = { + "*.domain.com" = "http://localhost:80"; + "*.anotherone.com" = "http://localhost:80"; + }; + }; + }; + })); + + default = { }; + example = { + "00000000-0000-0000-0000-000000000000" = { + credentialsFile = "/tmp/test"; + ingress = { + "*.domain1.com" = { + service = "http://localhost:80"; + }; + }; + default = "http_status:404"; + }; + }; + }; + }; + + config = { + systemd.targets = + mapAttrs' + (name: tunnel: + nameValuePair "cloudflared-tunnel-${name}" ({ + description = lib.mdDoc "Cloudflare tunnel '${name}' target"; + requires = [ "cloudflared-tunnel-${name}.service" ]; + after = [ "cloudflared-tunnel-${name}.service" ]; + unitConfig.StopWhenUnneeded = true; + }) + ) + config.services.cloudflared.tunnels; + + systemd.services = + mapAttrs' + (name: tunnel: + let + filterConfig = lib.attrsets.filterAttrsRecursive (_: v: ! builtins.elem v [ null [ ] { } ]); + + filterIngressSet = filterAttrs (_: v: builtins.typeOf v == "set"); + filterIngressStr = filterAttrs (_: v: builtins.typeOf v == "string"); + + ingressesSet = filterIngressSet tunnel.ingress; + ingressesStr = filterIngressStr tunnel.ingress; + + fullConfig = { + tunnel = name; + "credentials-file" = tunnel.credentialsFile; + ingress = + (map + (key: { + hostname = key; + } // getAttr key (filterConfig (filterConfig ingressesSet))) + (attrNames ingressesSet)) + ++ + (map + (key: { + hostname = key; + service = getAttr key ingressesStr; + }) + (attrNames ingressesStr)) + ++ [{ service = tunnel.default; }]; + }; + mkConfigFile = pkgs.writeText "cloudflared.yml" (builtins.toJSON fullConfig); + in + nameValuePair "cloudflared-tunnel-${name}" ({ + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + User = cfg.user; + Group = cfg.group; + ExecStart = "${cfg.package}/bin/cloudflared tunnel --config=${mkConfigFile} --no-autoupdate run"; + Restart = "always"; + }; + }) + ) + config.services.cloudflared.tunnels; + + users.users = mkIf (cfg.user == "cloudflared") { + cloudflared = { + group = cfg.group; + isSystemUser = true; + }; + }; + + users.groups = mkIf (cfg.group == "cloudflared") { + cloudflared = { }; + }; + }; + + meta.maintainers = with maintainers; [ bbigras ]; +} diff --git a/pkgs/applications/audio/amberol/default.nix b/pkgs/applications/audio/amberol/default.nix index 5c905f97c4a8..3051dc7ceb82 100644 --- a/pkgs/applications/audio/amberol/default.nix +++ b/pkgs/applications/audio/amberol/default.nix @@ -19,20 +19,20 @@ stdenv.mkDerivation rec { pname = "amberol"; - version = "0.9.1"; + version = "0.9.2"; src = fetchFromGitLab { domain = "gitlab.gnome.org"; owner = "World"; repo = pname; rev = version; - hash = "sha256-UZFOQw9eXSyCey4YQ4pWV91BIo+5tFw1N8es5H03+fc="; + hash = "sha256-L8yHKwtCAZC1myIouL0Oq3lj0QPWn5dVe0g3nkyAKI8="; }; cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; - hash = "sha256-ebo718+HAZFd7Pjy06jAzmaLdjR3o4Hn0xEeO7yiIC0="; + hash = "sha256-0XuWBUG37GNHRXgjz0/Vv6VSqaPG36xTj7oN0ukFIJY="; }; postPatch = '' diff --git a/pkgs/applications/blockchains/bitcoin/default.nix b/pkgs/applications/blockchains/bitcoin/default.nix index 4f0e8215f5e6..1c698927303c 100644 --- a/pkgs/applications/blockchains/bitcoin/default.nix +++ b/pkgs/applications/blockchains/bitcoin/default.nix @@ -33,13 +33,14 @@ let in stdenv.mkDerivation rec { pname = if withGui then "bitcoin" else "bitcoind"; - version = "24.0"; + version = "24.0.1"; src = fetchurl { urls = [ "https://bitcoincore.org/bin/bitcoin-core-${version}/bitcoin-${version}.tar.gz" ]; - sha256 = "9cfa4a9f4acb5093e85b8b528392f0f05067f3f8fafacd4dcfe8a396158fd9f4"; + # hash retrieved from signed SHA256SUMS + sha256 = "12d4ad6dfab4767d460d73307e56d13c72997e114fad4f274650f95560f5f2ff"; }; nativeBuildInputs = diff --git a/pkgs/applications/blockchains/clightning/default.nix b/pkgs/applications/blockchains/clightning/default.nix index 2384c3f093f8..45854ddcd631 100644 --- a/pkgs/applications/blockchains/clightning/default.nix +++ b/pkgs/applications/blockchains/clightning/default.nix @@ -22,11 +22,11 @@ let in stdenv.mkDerivation rec { pname = "clightning"; - version = "22.11"; + version = "22.11.1"; src = fetchurl { url = "https://github.com/ElementsProject/lightning/releases/download/v${version}/clightning-v${version}.zip"; - sha256 = "sha256-3GE7njzuYxYXotkRWlRjwygTwF7cVzKS44IQsg9YG0Q="; + sha256 = "sha256-F48jmG9voNp6+IMRVkJi6O0DXVQxKyYkOA0UBCKktIw="; }; # when building on darwin we need dawin.cctools to provide the correct libtool diff --git a/pkgs/applications/blockchains/groestlcoin/default.nix b/pkgs/applications/blockchains/groestlcoin/default.nix index 6d5bf0de2e72..36001a8d6dfb 100644 --- a/pkgs/applications/blockchains/groestlcoin/default.nix +++ b/pkgs/applications/blockchains/groestlcoin/default.nix @@ -24,21 +24,21 @@ }: let - version = "23.0"; desktop = fetchurl { - url = "https://raw.githubusercontent.com/Groestlcoin/packaging/${version}/debian/groestlcoin-qt.desktop"; + # de45048 is the last commit when the debian/groestlcoin-qt.desktop file was changed + url = "https://raw.githubusercontent.com/Groestlcoin/packaging/de4504844e47cf2c7604789650a5db4f3f7a48aa/debian/groestlcoin-qt.desktop"; sha256 = "0mxwq4jvcip44a796iwz7n1ljkhl3a4p47z7qlsxcfxw3zmm0k0k"; }; in stdenv.mkDerivation rec { pname = if withGui then "groestlcoin" else "groestlcoind"; - inherit version; + version = "24.0.1"; src = fetchFromGitHub { owner = "Groestlcoin"; repo = "groestlcoin"; rev = "v${version}"; - sha256 = "1ag7wpaw4zssx1g482kziqr95yl2vk9r332689s3093xv9i9pz4s"; + sha256 = "0k14y3iv5l26r820wzkwqxi67kwh26i0yq20ffd72shicjs1d3qc"; }; nativeBuildInputs = [ autoreconfHook pkg-config ] diff --git a/pkgs/applications/display-managers/emptty/default.nix b/pkgs/applications/display-managers/emptty/default.nix new file mode 100644 index 000000000000..d4224893ba48 --- /dev/null +++ b/pkgs/applications/display-managers/emptty/default.nix @@ -0,0 +1,32 @@ +{ buildGoModule +, fetchFromGitHub +, lib +, libX11 +, pam +, stdenv +}: + +buildGoModule rec { + pname = "emptty"; + version = "0.9.0"; + + src = fetchFromGitHub { + owner = "tvrzna"; + repo = pname; + rev = "v${version}"; + hash = "sha256-iT7wdxHC+/3fvBbSrHHuqNYWiqwL48NYzFmtmgVaFik="; + }; + + buildInputs = [ pam libX11 ]; + + vendorHash = "sha256-tviPb05puHvBdDkSsRrBExUVxQy+DzmkjB+W9W2CG4M="; + + meta = with lib; { + description = "Dead simple CLI Display Manager on TTY"; + homepage = "https://github.com/tvrzna/emptty"; + license = licenses.mit; + maintainers = with maintainers; [ urandom ]; + # many undefined functions + broken = stdenv.isDarwin; + }; +} diff --git a/pkgs/applications/networking/instant-messengers/discord/openasar.nix b/pkgs/applications/networking/instant-messengers/discord/openasar.nix index 6ec3f86b7b55..50ca9a3a0fb6 100644 --- a/pkgs/applications/networking/instant-messengers/discord/openasar.nix +++ b/pkgs/applications/networking/instant-messengers/discord/openasar.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "openasar"; - version = "unstable-2022-12-01"; + version = "unstable-2022-12-11"; src = fetchFromGitHub { owner = "GooseMod"; repo = "OpenAsar"; - rev = "f2da613f2b803ad97b43be5a7803f510619e578e"; - hash = "sha256-WQIqbyD7QXa5mfX7X3BQ0Hx2+Ye4k8csx9fhvowvYKw="; + rev = "0b1d4685cb2c94f42441fc616eb24e69eda04647"; + hash = "sha256-cRYXgVgA5B9MaDGJIACJYjFNDAMajReKud0akiGBR4Q="; }; postPatch = '' diff --git a/pkgs/applications/networking/instant-messengers/rambox/default.nix b/pkgs/applications/networking/instant-messengers/rambox/default.nix index 1d7888f78c81..e97b6c5b3ffb 100644 --- a/pkgs/applications/networking/instant-messengers/rambox/default.nix +++ b/pkgs/applications/networking/instant-messengers/rambox/default.nix @@ -1,29 +1,41 @@ -{ stdenv, callPackage, fetchurl, lib }: +{ appimageTools, lib, fetchurl, makeDesktopItem }: let - mkRambox = opts: callPackage (import ./rambox.nix opts) {}; -in -mkRambox rec { pname = "rambox"; - version = "0.7.9"; + version = "2.0.9"; - src = { - x86_64-linux = fetchurl { - url = "https://github.com/ramboxapp/community-edition/releases/download/${version}/Rambox-${version}-linux-x86_64.AppImage"; - sha256 = "19y4cmrfp79dr4hgl698imp4f3l1nhgvhh76j5laxg46ld71knil"; - }; - i686-linux = fetchurl { - url = "https://github.com/ramboxapp/community-edition/releases/download/${version}/Rambox-${version}-linux-i386.AppImage"; - sha256 = "13wiciyshyrabq2mvnssl2d6svia1kdvwx3dl26249iyif96xxvq"; - }; - }.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}"); + src = fetchurl { + url = "https://github.com/ramboxapp/download/releases/download/v${version}/Rambox-${version}-linux-x64.AppImage"; + sha256 = "sha256-o2ydZodmMAYeU0IiczKNlzY2hgTJbzyJWO/cZSTfAuM="; + }; + + desktopItem = (makeDesktopItem { + desktopName = "Rambox"; + name = pname; + exec = "rambox"; + icon = pname; + categories = [ "Network" ]; + }); + + appimageContents = appimageTools.extractType2 { + inherit pname version src; + }; +in +appimageTools.wrapType2 { + inherit pname version src; + + extraInstallCommands = '' + mkdir -p $out/share/applications $out/share/icons/hicolor/256x256/apps + ln -sf rambox-${version} $out/bin/${pname} + install -Dm644 ${appimageContents}/usr/share/icons/hicolor/256x256/apps/rambox*.png $out/share/icons/hicolor/256x256/apps/${pname}.png + install -Dm644 ${desktopItem}/share/applications/* $out/share/applications + ''; meta = with lib; { - description = "Free and Open Source messaging and emailing app that combines common web applications into one"; - homepage = "https://rambox.pro"; - license = licenses.mit; - maintainers = with maintainers; []; - platforms = [ "i686-linux" "x86_64-linux" ]; - hydraPlatforms = []; + description = "Workspace Simplifier - a cross-platform application organizing web services into Workspaces similar to browser profiles"; + homepage = "https://rambox.app"; + license = licenses.unfree; + maintainers = with maintainers; [ nazarewk ]; + platforms = [ "x86_64-linux" ]; }; } diff --git a/pkgs/applications/networking/instant-messengers/rambox/pro.nix b/pkgs/applications/networking/instant-messengers/rambox/pro.nix deleted file mode 100644 index e8b48232ee33..000000000000 --- a/pkgs/applications/networking/instant-messengers/rambox/pro.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ stdenv, callPackage, fetchurl, lib }: - -let - mkRambox = opts: callPackage (import ./rambox.nix opts) { }; -in mkRambox rec { - pname = "rambox-pro"; - version = "1.5.0"; - - desktopName = "Rambox Pro"; - - src = { - x86_64-linux = fetchurl { - url = "https://github.com/ramboxapp/download/releases/download/v${version}/RamboxPro-${version}-linux-x64.AppImage"; - sha256 = "1g7lrjm8yxklqpc2mp8gy0g61wfilr15dl80r3sh6pa5b4k5spir"; - }; - }.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}"); - - meta = with lib; { - description = "Messaging and emailing app that combines common web applications into one"; - homepage = "https://rambox.pro"; - license = licenses.unfree; - maintainers = with maintainers; [ cawilliamson ]; - platforms = [ "x86_64-linux" ]; - }; -} diff --git a/pkgs/applications/networking/instant-messengers/rambox/rambox.nix b/pkgs/applications/networking/instant-messengers/rambox/rambox.nix deleted file mode 100644 index b9b5175d3b87..000000000000 --- a/pkgs/applications/networking/instant-messengers/rambox/rambox.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ pname, version, src, meta, desktopName ? "Rambox" }: - -{ appimageTools, lib, fetchurl, makeDesktopItem }: - -let - name = "${pname}-${version}"; - - desktopItem = (makeDesktopItem { - inherit desktopName; - name = pname; - exec = pname; - icon = pname; - categories = [ "Network" ]; - }); - - appimageContents = appimageTools.extractType2 { - inherit name src; - }; -in appimageTools.wrapType2 rec { - inherit name src meta; - - extraInstallCommands = '' - mkdir -p $out/share/applications $out/share/icons/hicolor/256x256/apps - # CE uses rambox-, Pro uses rambox - mv $out/bin/rambox* $out/bin/${pname} - install -Dm644 ${appimageContents}/usr/share/icons/hicolor/256x256/apps/rambox*.png $out/share/icons/hicolor/256x256/apps/${pname}.png - install -Dm644 ${desktopItem}/share/applications/* $out/share/applications - ''; -} diff --git a/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix b/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix index cb7801d3896b..024052820205 100644 --- a/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix @@ -1,139 +1,12 @@ -{ stdenv, lib, fetchurl, autoPatchelfHook, dpkg, wrapGAppsHook, makeWrapper, nixosTests -, gtk3, atk, at-spi2-atk, cairo, pango, gdk-pixbuf, glib, freetype, fontconfig -, dbus, libX11, xorg, libXi, libXcursor, libXdamage, libXrandr, libXcomposite -, libXext, libXfixes, libXrender, libXtst, libXScrnSaver, nss, nspr, alsa-lib -, cups, expat, libuuid, at-spi2-core, libappindicator-gtk3, mesa -# Runtime dependencies: -, systemd, libnotify, libdbusmenu, libpulseaudio, xdg-utils -}: - -stdenv.mkDerivation rec { - pname = "signal-desktop"; - version = "6.0.1"; # Please backport all updates to the stable channel. - # All releases have a limited lifetime and "expire" 90 days after the release. - # When releases "expire" the application becomes unusable until an update is - # applied. The expiration date for the current release can be extracted with: - # $ grep -a "^{\"buildExpiration" "${signal-desktop}/lib/Signal/resources/app.asar" - # (Alternatively we could try to patch the asar archive, but that requires a - # few additional steps and might not be the best idea.) - - src = fetchurl { - url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb"; - sha256 = "sha256-7Cojhz3wBPd/13uVg2MgJXvR9QMPZcwBibk/sCrRMAE="; +{ callPackage }: builtins.mapAttrs (pname: attrs: callPackage ./generic.nix (attrs // { inherit pname; })) { + signal-desktop = { + dir = "Signal"; + version = "6.0.1"; + hash = "sha256-7Cojhz3wBPd/13uVg2MgJXvR9QMPZcwBibk/sCrRMAE="; }; - - nativeBuildInputs = [ - autoPatchelfHook - dpkg - (wrapGAppsHook.override { inherit makeWrapper; }) - ]; - - buildInputs = [ - alsa-lib - at-spi2-atk - at-spi2-core - atk - cairo - cups - dbus - expat - fontconfig - freetype - gdk-pixbuf - glib - gtk3 - libX11 - libXScrnSaver - libXcomposite - libXcursor - libXdamage - libXext - libXfixes - libXi - libXrandr - libXrender - libXtst - libappindicator-gtk3 - libnotify - libuuid - mesa # for libgbm - nspr - nss - pango - systemd - xorg.libxcb - xorg.libxshmfence - ]; - - runtimeDependencies = [ - (lib.getLib systemd) - libappindicator-gtk3 - libnotify - libdbusmenu - xdg-utils - ]; - - unpackPhase = "dpkg-deb -x $src ."; - - dontBuild = true; - dontConfigure = true; - dontPatchELF = true; - # We need to run autoPatchelf manually with the "no-recurse" option, see - # https://github.com/NixOS/nixpkgs/pull/78413 for the reasons. - dontAutoPatchelf = true; - - installPhase = '' - runHook preInstall - - mkdir -p $out/lib - - mv usr/share $out/share - mv opt/Signal $out/lib/Signal - - # Note: The following path contains bundled libraries: - # $out/lib/Signal/resources/app.asar.unpacked/node_modules/sharp/vendor/lib/ - # We run autoPatchelf with the "no-recurse" option to avoid picking those - # up, but resources/app.asar still requires them. - - # Symlink to bin - mkdir -p $out/bin - ln -s $out/lib/Signal/signal-desktop $out/bin/signal-desktop - - # Create required symlinks: - ln -s libGLESv2.so $out/lib/Signal/libGLESv2.so.2 - - runHook postInstall - ''; - - preFixup = '' - gappsWrapperArgs+=( - --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc ] }" - --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" - --suffix PATH : ${lib.makeBinPath [ xdg-utils ]} - ) - - # Fix the desktop link - substituteInPlace $out/share/applications/signal-desktop.desktop \ - --replace /opt/Signal/signal-desktop $out/bin/signal-desktop - - autoPatchelf --no-recurse -- $out/lib/Signal/ - patchelf --add-needed ${libpulseaudio}/lib/libpulse.so $out/lib/Signal/resources/app.asar.unpacked/node_modules/ringrtc/build/linux/libringrtc-x64.node - ''; - - # Tests if the application launches and waits for "Link your phone to Signal Desktop": - passthru.tests.application-launch = nixosTests.signal-desktop; - - meta = { - description = "Private, simple, and secure messenger"; - longDescription = '' - Signal Desktop is an Electron application that links with your - "Signal Android" or "Signal iOS" app. - ''; - homepage = "https://signal.org/"; - changelog = "https://github.com/signalapp/Signal-Desktop/releases/tag/v${version}"; - license = lib.licenses.agpl3Only; - maintainers = with lib.maintainers; [ mic92 equirosa ]; - platforms = [ "x86_64-linux" ]; - sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + signal-desktop-beta = { + dir = "Signal Beta"; + version = "6.1.0-beta.1"; + hash = "sha256-zfXHSAYJH9/y0IaB6dTb1T85hZzDXyNX6sCpaHnL32k="; }; } diff --git a/pkgs/applications/networking/instant-messengers/signal-desktop/generic.nix b/pkgs/applications/networking/instant-messengers/signal-desktop/generic.nix new file mode 100644 index 000000000000..a0384895d507 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/signal-desktop/generic.nix @@ -0,0 +1,180 @@ +{ pname +, dir +, version +, hash +, stdenv +, lib +, fetchurl +, autoPatchelfHook +, dpkg +, wrapGAppsHook +, makeWrapper +, nixosTests +, gtk3 +, atk +, at-spi2-atk +, cairo +, pango +, gdk-pixbuf +, glib +, freetype +, fontconfig +, dbus +, libX11 +, xorg +, libXi +, libXcursor +, libXdamage +, libXrandr +, libXcomposite +, libXext +, libXfixes +, libXrender +, libXtst +, libXScrnSaver +, nss +, nspr +, alsa-lib +, cups +, expat +, libuuid +, at-spi2-core +, libappindicator-gtk3 +, mesa + # Runtime dependencies: +, systemd +, libnotify +, libdbusmenu +, libpulseaudio +, xdg-utils +}: + +stdenv.mkDerivation rec { + inherit pname version; # Please backport all updates to the stable channel. + # All releases have a limited lifetime and "expire" 90 days after the release. + # When releases "expire" the application becomes unusable until an update is + # applied. The expiration date for the current release can be extracted with: + # $ grep -a "^{\"buildExpiration" "${signal-desktop}/lib/${dir}/resources/app.asar" + # (Alternatively we could try to patch the asar archive, but that requires a + # few additional steps and might not be the best idea.) + + src = fetchurl { + url = "https://updates.signal.org/desktop/apt/pool/main/s/${pname}/${pname}_${version}_amd64.deb"; + inherit hash; + }; + + nativeBuildInputs = [ + autoPatchelfHook + dpkg + (wrapGAppsHook.override { inherit makeWrapper; }) + ]; + + buildInputs = [ + alsa-lib + at-spi2-atk + at-spi2-core + atk + cairo + cups + dbus + expat + fontconfig + freetype + gdk-pixbuf + glib + gtk3 + libX11 + libXScrnSaver + libXcomposite + libXcursor + libXdamage + libXext + libXfixes + libXi + libXrandr + libXrender + libXtst + libappindicator-gtk3 + libnotify + libuuid + mesa # for libgbm + nspr + nss + pango + systemd + xorg.libxcb + xorg.libxshmfence + ]; + + runtimeDependencies = [ + (lib.getLib systemd) + libappindicator-gtk3 + libnotify + libdbusmenu + xdg-utils + ]; + + unpackPhase = "dpkg-deb -x $src ."; + + dontBuild = true; + dontConfigure = true; + dontPatchELF = true; + # We need to run autoPatchelf manually with the "no-recurse" option, see + # https://github.com/NixOS/nixpkgs/pull/78413 for the reasons. + dontAutoPatchelf = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/lib + + mv usr/share $out/share + mv "opt/${dir}" "$out/lib/${dir}" + + # Note: The following path contains bundled libraries: + # $out/lib/${dir}/resources/app.asar.unpacked/node_modules/sharp/vendor/lib/ + # We run autoPatchelf with the "no-recurse" option to avoid picking those + # up, but resources/app.asar still requires them. + + # Symlink to bin + mkdir -p $out/bin + ln -s "$out/lib/${dir}/${pname}" $out/bin/${pname} + + # Create required symlinks: + ln -s libGLESv2.so "$out/lib/${dir}/libGLESv2.so.2" + + runHook postInstall + ''; + + preFixup = '' + gappsWrapperArgs+=( + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc ] }" + --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" + --suffix PATH : ${lib.makeBinPath [ xdg-utils ]} + ) + + # Fix the desktop link + substituteInPlace $out/share/applications/${pname}.desktop \ + --replace "/opt/${dir}/${pname}" $out/bin/${pname} + + autoPatchelf --no-recurse -- "$out/lib/${dir}/" + patchelf --add-needed ${libpulseaudio}/lib/libpulse.so "$out/lib/${dir}/resources/app.asar.unpacked/node_modules/ringrtc/build/linux/libringrtc-x64.node" + ''; + + # Tests if the application launches and waits for "Link your phone to Signal Desktop": + passthru.tests.application-launch = nixosTests.signal-desktop; + + meta = { + description = "Private, simple, and secure messenger"; + longDescription = '' + Signal Desktop is an Electron application that links with your + "Signal Android" or "Signal iOS" app. + ''; + homepage = "https://signal.org/"; + changelog = "https://github.com/signalapp/Signal-Desktop/releases/tag/v${version}"; + license = lib.licenses.agpl3Only; + maintainers = with lib.maintainers; [ mic92 equirosa urandom ]; + platforms = [ "x86_64-linux" ]; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + }; +} diff --git a/pkgs/applications/networking/sieve-connect/default.nix b/pkgs/applications/networking/sieve-connect/default.nix index d752dab1567e..46fc2a7ae170 100644 --- a/pkgs/applications/networking/sieve-connect/default.nix +++ b/pkgs/applications/networking/sieve-connect/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { wrapProgram $out/bin/sieve-connect \ --prefix PERL5LIB : "${with perlPackages; makePerlPath [ - AuthenSASL Socket6 IOSocketInet6 IOSocketSSL NetSSLeay NetDNS + AuthenSASL Socket6 IOSocketINET6 IOSocketSSL NetSSLeay NetDNS TermReadKey TermReadLineGnu ]}" ''; diff --git a/pkgs/development/interpreters/python/cpython/3.10/asyncio-deprecation.patch b/pkgs/development/interpreters/python/cpython/3.10/asyncio-deprecation.patch new file mode 100644 index 000000000000..656e4eb6a4cb --- /dev/null +++ b/pkgs/development/interpreters/python/cpython/3.10/asyncio-deprecation.patch @@ -0,0 +1,598 @@ +REVERT https://github.com/python/cpython/commit/300d812fd1c4d9244e71de0d228cc72439d312a7 +--- b/Doc/library/asyncio-eventloop.rst ++++ a/Doc/library/asyncio-eventloop.rst +@@ -43,12 +43,10 @@ + + Get the current event loop. + ++ If there is no current event loop set in the current OS thread, ++ the OS thread is main, and :func:`set_event_loop` has not yet ++ been called, asyncio will create a new event loop and set it as the ++ current one. +- When called from a coroutine or a callback (e.g. scheduled with +- call_soon or similar API), this function will always return the +- running event loop. +- +- If there is no running event loop set, the function will return +- the result of ``get_event_loop_policy().get_event_loop()`` call. + + Because this function has rather complex behavior (especially + when custom event loop policies are in use), using the +@@ -60,14 +58,10 @@ + event loop. + + .. deprecated:: 3.10 ++ Emits a deprecation warning if there is no running event loop. ++ In future Python releases, this function may become an alias of ++ :func:`get_running_loop` and will accordingly raise a ++ :exc:`RuntimeError` if there is no running event loop. +- Deprecation warning is emitted if there is no current event loop. +- In Python 3.12 it will be an error. +- +- .. note:: +- In Python versions 3.10.0--3.10.8 this function +- (and other functions which used it implicitly) emitted a +- :exc:`DeprecationWarning` if there was no running event loop, even if +- the current loop was set. + + .. function:: set_event_loop(loop) + +reverted: +--- b/Doc/library/asyncio-llapi-index.rst ++++ a/Doc/library/asyncio-llapi-index.rst +@@ -19,7 +19,7 @@ + - The **preferred** function to get the running event loop. + + * - :func:`asyncio.get_event_loop` ++ - Get an event loop instance (current or via the policy). +- - Get an event loop instance (running or current via the current policy). + + * - :func:`asyncio.set_event_loop` + - Set the event loop as current via the current policy. +reverted: +--- b/Doc/library/asyncio-policy.rst ++++ a/Doc/library/asyncio-policy.rst +@@ -112,11 +112,6 @@ + + On Windows, :class:`ProactorEventLoop` is now used by default. + +- .. deprecated:: 3.10.9 +- :meth:`get_event_loop` now emits a :exc:`DeprecationWarning` if there +- is no current event loop set and a new event loop has been implicitly +- created. In Python 3.12 it will be an error. +- + + .. class:: WindowsSelectorEventLoopPolicy + +reverted: +--- b/Lib/asyncio/events.py ++++ a/Lib/asyncio/events.py +@@ -650,21 +650,6 @@ + if (self._local._loop is None and + not self._local._set_called and + threading.current_thread() is threading.main_thread()): +- stacklevel = 2 +- try: +- f = sys._getframe(1) +- except AttributeError: +- pass +- else: +- while f: +- module = f.f_globals.get('__name__') +- if not (module == 'asyncio' or module.startswith('asyncio.')): +- break +- f = f.f_back +- stacklevel += 1 +- import warnings +- warnings.warn('There is no current event loop', +- DeprecationWarning, stacklevel=stacklevel) + self.set_event_loop(self.new_event_loop()) + + if self._local._loop is None: +@@ -778,13 +763,12 @@ + + + def _get_event_loop(stacklevel=3): +- # This internal method is going away in Python 3.12, left here only for +- # backwards compatibility with 3.10.0 - 3.10.8 and 3.11.0. +- # Similarly, this method's C equivalent in _asyncio is going away as well. +- # See GH-99949 for more details. + current_loop = _get_running_loop() + if current_loop is not None: + return current_loop ++ import warnings ++ warnings.warn('There is no current event loop', ++ DeprecationWarning, stacklevel=stacklevel) + return get_event_loop_policy().get_event_loop() + + +reverted: +--- b/Lib/test/test_asyncio/test_base_events.py ++++ a/Lib/test/test_asyncio/test_base_events.py +@@ -752,7 +752,7 @@ + def test_env_var_debug(self): + code = '\n'.join(( + 'import asyncio', ++ 'loop = asyncio.get_event_loop()', +- 'loop = asyncio.new_event_loop()', + 'print(loop.get_debug())')) + + # Test with -E to not fail if the unit test was run with +reverted: +--- b/Lib/test/test_asyncio/test_events.py ++++ a/Lib/test/test_asyncio/test_events.py +@@ -2561,9 +2561,8 @@ + def test_get_event_loop(self): + policy = asyncio.DefaultEventLoopPolicy() + self.assertIsNone(policy._local._loop) ++ ++ loop = policy.get_event_loop() +- with self.assertWarns(DeprecationWarning) as cm: +- loop = policy.get_event_loop() +- self.assertEqual(cm.filename, __file__) + self.assertIsInstance(loop, asyncio.AbstractEventLoop) + + self.assertIs(policy._local._loop, loop) +@@ -2577,10 +2576,7 @@ + policy, "set_event_loop", + wraps=policy.set_event_loop) as m_set_event_loop: + ++ loop = policy.get_event_loop() +- with self.assertWarns(DeprecationWarning) as cm: +- loop = policy.get_event_loop() +- self.addCleanup(loop.close) +- self.assertEqual(cm.filename, __file__) + + # policy._local._loop must be set through .set_event_loop() + # (the unix DefaultEventLoopPolicy needs this call to attach +@@ -2614,8 +2610,7 @@ + + def test_set_event_loop(self): + policy = asyncio.DefaultEventLoopPolicy() ++ old_loop = policy.get_event_loop() +- old_loop = policy.new_event_loop() +- policy.set_event_loop(old_loop) + + self.assertRaises(AssertionError, policy.set_event_loop, object()) + +@@ -2728,11 +2723,15 @@ + asyncio.set_event_loop_policy(Policy()) + loop = asyncio.new_event_loop() + ++ with self.assertWarns(DeprecationWarning) as cm: ++ with self.assertRaises(TestError): ++ asyncio.get_event_loop() ++ self.assertEqual(cm.warnings[0].filename, __file__) +- with self.assertRaises(TestError): +- asyncio.get_event_loop() + asyncio.set_event_loop(None) ++ with self.assertWarns(DeprecationWarning) as cm: ++ with self.assertRaises(TestError): ++ asyncio.get_event_loop() ++ self.assertEqual(cm.warnings[0].filename, __file__) +- with self.assertRaises(TestError): +- asyncio.get_event_loop() + + with self.assertRaisesRegex(RuntimeError, 'no running'): + asyncio.get_running_loop() +@@ -2746,11 +2745,16 @@ + loop.run_until_complete(func()) + + asyncio.set_event_loop(loop) ++ with self.assertWarns(DeprecationWarning) as cm: ++ with self.assertRaises(TestError): ++ asyncio.get_event_loop() ++ self.assertEqual(cm.warnings[0].filename, __file__) ++ +- with self.assertRaises(TestError): +- asyncio.get_event_loop() + asyncio.set_event_loop(None) ++ with self.assertWarns(DeprecationWarning) as cm: ++ with self.assertRaises(TestError): ++ asyncio.get_event_loop() ++ self.assertEqual(cm.warnings[0].filename, __file__) +- with self.assertRaises(TestError): +- asyncio.get_event_loop() + + finally: + asyncio.set_event_loop_policy(old_policy) +@@ -2774,8 +2778,10 @@ + self.addCleanup(loop2.close) + self.assertEqual(cm.warnings[0].filename, __file__) + asyncio.set_event_loop(None) ++ with self.assertWarns(DeprecationWarning) as cm: ++ with self.assertRaisesRegex(RuntimeError, 'no current'): ++ asyncio.get_event_loop() ++ self.assertEqual(cm.warnings[0].filename, __file__) +- with self.assertRaisesRegex(RuntimeError, 'no current'): +- asyncio.get_event_loop() + + with self.assertRaisesRegex(RuntimeError, 'no running'): + asyncio.get_running_loop() +@@ -2789,11 +2795,15 @@ + loop.run_until_complete(func()) + + asyncio.set_event_loop(loop) ++ with self.assertWarns(DeprecationWarning) as cm: ++ self.assertIs(asyncio.get_event_loop(), loop) ++ self.assertEqual(cm.warnings[0].filename, __file__) +- self.assertIs(asyncio.get_event_loop(), loop) + + asyncio.set_event_loop(None) ++ with self.assertWarns(DeprecationWarning) as cm: ++ with self.assertRaisesRegex(RuntimeError, 'no current'): ++ asyncio.get_event_loop() ++ self.assertEqual(cm.warnings[0].filename, __file__) +- with self.assertRaisesRegex(RuntimeError, 'no current'): +- asyncio.get_event_loop() + + finally: + asyncio.set_event_loop_policy(old_policy) +reverted: +--- b/Lib/test/test_asyncio/test_futures.py ++++ a/Lib/test/test_asyncio/test_futures.py +@@ -145,8 +145,10 @@ + self.assertTrue(f.cancelled()) + + def test_constructor_without_loop(self): ++ with self.assertWarns(DeprecationWarning) as cm: ++ with self.assertRaisesRegex(RuntimeError, 'There is no current event loop'): ++ self._new_future() ++ self.assertEqual(cm.warnings[0].filename, __file__) +- with self.assertRaisesRegex(RuntimeError, 'no current event loop'): +- self._new_future() + + def test_constructor_use_running_loop(self): + async def test(): +@@ -156,10 +158,12 @@ + self.assertIs(f.get_loop(), self.loop) + + def test_constructor_use_global_loop(self): ++ # Deprecated in 3.10 +- # Deprecated in 3.10, undeprecated in 3.11.1 + asyncio.set_event_loop(self.loop) + self.addCleanup(asyncio.set_event_loop, None) ++ with self.assertWarns(DeprecationWarning) as cm: ++ f = self._new_future() ++ self.assertEqual(cm.warnings[0].filename, __file__) +- f = self._new_future() + self.assertIs(f._loop, self.loop) + self.assertIs(f.get_loop(), self.loop) + +@@ -495,8 +499,10 @@ + return (arg, threading.get_ident()) + ex = concurrent.futures.ThreadPoolExecutor(1) + f1 = ex.submit(run, 'oi') ++ with self.assertWarns(DeprecationWarning) as cm: ++ with self.assertRaises(RuntimeError): ++ asyncio.wrap_future(f1) ++ self.assertEqual(cm.warnings[0].filename, __file__) +- with self.assertRaisesRegex(RuntimeError, 'no current event loop'): +- asyncio.wrap_future(f1) + ex.shutdown(wait=True) + + def test_wrap_future_use_running_loop(self): +@@ -511,14 +517,16 @@ + ex.shutdown(wait=True) + + def test_wrap_future_use_global_loop(self): ++ # Deprecated in 3.10 +- # Deprecated in 3.10, undeprecated in 3.11.1 + asyncio.set_event_loop(self.loop) + self.addCleanup(asyncio.set_event_loop, None) + def run(arg): + return (arg, threading.get_ident()) + ex = concurrent.futures.ThreadPoolExecutor(1) + f1 = ex.submit(run, 'oi') ++ with self.assertWarns(DeprecationWarning) as cm: ++ f2 = asyncio.wrap_future(f1) ++ self.assertEqual(cm.warnings[0].filename, __file__) +- f2 = asyncio.wrap_future(f1) + self.assertIs(self.loop, f2._loop) + ex.shutdown(wait=True) + +reverted: +--- b/Lib/test/test_asyncio/test_streams.py ++++ a/Lib/test/test_asyncio/test_streams.py +@@ -747,8 +747,10 @@ + self.assertEqual(data, b'data') + + def test_streamreader_constructor_without_loop(self): ++ with self.assertWarns(DeprecationWarning) as cm: ++ with self.assertRaisesRegex(RuntimeError, 'There is no current event loop'): ++ asyncio.StreamReader() ++ self.assertEqual(cm.warnings[0].filename, __file__) +- with self.assertRaisesRegex(RuntimeError, 'no current event loop'): +- asyncio.StreamReader() + + def test_streamreader_constructor_use_running_loop(self): + # asyncio issue #184: Ensure that StreamReaderProtocol constructor +@@ -762,17 +764,21 @@ + def test_streamreader_constructor_use_global_loop(self): + # asyncio issue #184: Ensure that StreamReaderProtocol constructor + # retrieves the current loop if the loop parameter is not set ++ # Deprecated in 3.10 +- # Deprecated in 3.10, undeprecated in 3.11.1 + self.addCleanup(asyncio.set_event_loop, None) + asyncio.set_event_loop(self.loop) ++ with self.assertWarns(DeprecationWarning) as cm: ++ reader = asyncio.StreamReader() ++ self.assertEqual(cm.warnings[0].filename, __file__) +- reader = asyncio.StreamReader() + self.assertIs(reader._loop, self.loop) + + + def test_streamreaderprotocol_constructor_without_loop(self): + reader = mock.Mock() ++ with self.assertWarns(DeprecationWarning) as cm: ++ with self.assertRaisesRegex(RuntimeError, 'There is no current event loop'): ++ asyncio.StreamReaderProtocol(reader) ++ self.assertEqual(cm.warnings[0].filename, __file__) +- with self.assertRaisesRegex(RuntimeError, 'no current event loop'): +- asyncio.StreamReaderProtocol(reader) + + def test_streamreaderprotocol_constructor_use_running_loop(self): + # asyncio issue #184: Ensure that StreamReaderProtocol constructor +@@ -786,11 +792,13 @@ + def test_streamreaderprotocol_constructor_use_global_loop(self): + # asyncio issue #184: Ensure that StreamReaderProtocol constructor + # retrieves the current loop if the loop parameter is not set ++ # Deprecated in 3.10 +- # Deprecated in 3.10, undeprecated in 3.11.1 + self.addCleanup(asyncio.set_event_loop, None) + asyncio.set_event_loop(self.loop) + reader = mock.Mock() ++ with self.assertWarns(DeprecationWarning) as cm: ++ protocol = asyncio.StreamReaderProtocol(reader) ++ self.assertEqual(cm.warnings[0].filename, __file__) +- protocol = asyncio.StreamReaderProtocol(reader) + self.assertIs(protocol._loop, self.loop) + + def test_multiple_drain(self): +reverted: +--- b/Lib/test/test_asyncio/test_tasks.py ++++ a/Lib/test/test_asyncio/test_tasks.py +@@ -210,8 +210,10 @@ + + a = notmuch() + self.addCleanup(a.close) ++ with self.assertWarns(DeprecationWarning) as cm: ++ with self.assertRaisesRegex(RuntimeError, 'There is no current event loop'): ++ asyncio.ensure_future(a) ++ self.assertEqual(cm.warnings[0].filename, __file__) +- with self.assertRaisesRegex(RuntimeError, 'no current event loop'): +- asyncio.ensure_future(a) + + async def test(): + return asyncio.ensure_future(notmuch()) +@@ -221,10 +223,12 @@ + self.assertTrue(t.done()) + self.assertEqual(t.result(), 'ok') + ++ # Deprecated in 3.10 +- # Deprecated in 3.10.0, undeprecated in 3.10.9 + asyncio.set_event_loop(self.loop) + self.addCleanup(asyncio.set_event_loop, None) ++ with self.assertWarns(DeprecationWarning) as cm: ++ t = asyncio.ensure_future(notmuch()) ++ self.assertEqual(cm.warnings[0].filename, __file__) +- t = asyncio.ensure_future(notmuch()) + self.assertIs(t._loop, self.loop) + self.loop.run_until_complete(t) + self.assertTrue(t.done()) +@@ -243,8 +247,10 @@ + + a = notmuch() + self.addCleanup(a.close) ++ with self.assertWarns(DeprecationWarning) as cm: ++ with self.assertRaisesRegex(RuntimeError, 'There is no current event loop'): ++ asyncio.ensure_future(a) ++ self.assertEqual(cm.warnings[0].filename, __file__) +- with self.assertRaisesRegex(RuntimeError, 'There is no current event loop'): +- asyncio.ensure_future(a) + + async def test(): + return asyncio.ensure_future(notmuch()) +@@ -254,10 +260,12 @@ + self.assertTrue(t.done()) + self.assertEqual(t.result(), 'ok') + ++ # Deprecated in 3.10 +- # Deprecated in 3.10.0, undeprecated in 3.10.9 + asyncio.set_event_loop(self.loop) + self.addCleanup(asyncio.set_event_loop, None) ++ with self.assertWarns(DeprecationWarning) as cm: ++ t = asyncio.ensure_future(notmuch()) ++ self.assertEqual(cm.warnings[0].filename, __file__) +- t = asyncio.ensure_future(notmuch()) + self.assertIs(t._loop, self.loop) + self.loop.run_until_complete(t) + self.assertTrue(t.done()) +@@ -1480,8 +1488,10 @@ + self.addCleanup(a.close) + + futs = asyncio.as_completed([a]) ++ with self.assertWarns(DeprecationWarning) as cm: ++ with self.assertRaisesRegex(RuntimeError, 'There is no current event loop'): ++ list(futs) ++ self.assertEqual(cm.warnings[0].filename, __file__) +- with self.assertRaisesRegex(RuntimeError, 'no current event loop'): +- list(futs) + + def test_as_completed_coroutine_use_running_loop(self): + loop = self.new_test_loop() +@@ -1497,14 +1507,17 @@ + loop.run_until_complete(test()) + + def test_as_completed_coroutine_use_global_loop(self): ++ # Deprecated in 3.10 +- # Deprecated in 3.10.0, undeprecated in 3.10.9 + async def coro(): + return 42 + + loop = self.new_test_loop() + asyncio.set_event_loop(loop) + self.addCleanup(asyncio.set_event_loop, None) ++ futs = asyncio.as_completed([coro()]) ++ with self.assertWarns(DeprecationWarning) as cm: ++ futs = list(futs) ++ self.assertEqual(cm.warnings[0].filename, __file__) +- futs = list(asyncio.as_completed([coro()])) + self.assertEqual(len(futs), 1) + self.assertEqual(loop.run_until_complete(futs[0]), 42) + +@@ -1974,8 +1987,10 @@ + + inner = coro() + self.addCleanup(inner.close) ++ with self.assertWarns(DeprecationWarning) as cm: ++ with self.assertRaisesRegex(RuntimeError, 'There is no current event loop'): ++ asyncio.shield(inner) ++ self.assertEqual(cm.warnings[0].filename, __file__) +- with self.assertRaisesRegex(RuntimeError, 'no current event loop'): +- asyncio.shield(inner) + + def test_shield_coroutine_use_running_loop(self): + async def coro(): +@@ -1989,13 +2004,15 @@ + self.assertEqual(res, 42) + + def test_shield_coroutine_use_global_loop(self): ++ # Deprecated in 3.10 +- # Deprecated in 3.10.0, undeprecated in 3.10.9 + async def coro(): + return 42 + + asyncio.set_event_loop(self.loop) + self.addCleanup(asyncio.set_event_loop, None) ++ with self.assertWarns(DeprecationWarning) as cm: ++ outer = asyncio.shield(coro()) ++ self.assertEqual(cm.warnings[0].filename, __file__) +- outer = asyncio.shield(coro()) + self.assertEqual(outer._loop, self.loop) + res = self.loop.run_until_complete(outer) + self.assertEqual(res, 42) +@@ -2933,7 +2950,7 @@ + self.assertIsNone(asyncio.current_task(loop=self.loop)) + + def test_current_task_no_running_loop_implicit(self): ++ with self.assertRaises(RuntimeError): +- with self.assertRaisesRegex(RuntimeError, 'no running event loop'): + asyncio.current_task() + + def test_current_task_with_implicit_loop(self): +@@ -3097,8 +3114,10 @@ + return asyncio.gather(*args, **kwargs) + + def test_constructor_empty_sequence_without_loop(self): ++ with self.assertWarns(DeprecationWarning) as cm: ++ with self.assertRaises(RuntimeError): ++ asyncio.gather() ++ self.assertEqual(cm.warnings[0].filename, __file__) +- with self.assertRaisesRegex(RuntimeError, 'no current event loop'): +- asyncio.gather() + + def test_constructor_empty_sequence_use_running_loop(self): + async def gather(): +@@ -3111,10 +3130,12 @@ + self.assertEqual(fut.result(), []) + + def test_constructor_empty_sequence_use_global_loop(self): ++ # Deprecated in 3.10 +- # Deprecated in 3.10.0, undeprecated in 3.10.9 + asyncio.set_event_loop(self.one_loop) + self.addCleanup(asyncio.set_event_loop, None) ++ with self.assertWarns(DeprecationWarning) as cm: ++ fut = asyncio.gather() ++ self.assertEqual(cm.warnings[0].filename, __file__) +- fut = asyncio.gather() + self.assertIsInstance(fut, asyncio.Future) + self.assertIs(fut._loop, self.one_loop) + self._run_loop(self.one_loop) +@@ -3202,8 +3223,10 @@ + self.addCleanup(gen1.close) + gen2 = coro() + self.addCleanup(gen2.close) ++ with self.assertWarns(DeprecationWarning) as cm: ++ with self.assertRaises(RuntimeError): ++ asyncio.gather(gen1, gen2) ++ self.assertEqual(cm.warnings[0].filename, __file__) +- with self.assertRaisesRegex(RuntimeError, 'no current event loop'): +- asyncio.gather(gen1, gen2) + + def test_constructor_use_running_loop(self): + async def coro(): +@@ -3217,14 +3240,16 @@ + self.one_loop.run_until_complete(fut) + + def test_constructor_use_global_loop(self): ++ # Deprecated in 3.10 +- # Deprecated in 3.10.0, undeprecated in 3.10.9 + async def coro(): + return 'abc' + asyncio.set_event_loop(self.other_loop) + self.addCleanup(asyncio.set_event_loop, None) + gen1 = coro() + gen2 = coro() ++ with self.assertWarns(DeprecationWarning) as cm: ++ fut = asyncio.gather(gen1, gen2) ++ self.assertEqual(cm.warnings[0].filename, __file__) +- fut = asyncio.gather(gen1, gen2) + self.assertIs(fut._loop, self.other_loop) + self.other_loop.run_until_complete(fut) + +reverted: +--- b/Lib/test/test_asyncio/test_unix_events.py ++++ a/Lib/test/test_asyncio/test_unix_events.py +@@ -1740,8 +1740,7 @@ + + def test_child_watcher_replace_mainloop_existing(self): + policy = self.create_policy() ++ loop = policy.get_event_loop() +- loop = policy.new_event_loop() +- policy.set_event_loop(loop) + + # Explicitly setup SafeChildWatcher, + # default ThreadedChildWatcher has no _loop property +reverted: +--- b/Lib/test/test_coroutines.py ++++ a/Lib/test/test_coroutines.py +@@ -2319,8 +2319,7 @@ + def test_unawaited_warning_during_shutdown(self): + code = ("import asyncio\n" + "async def f(): pass\n" ++ "asyncio.gather(f())\n") +- "async def t(): asyncio.gather(f())\n" +- "asyncio.run(t())\n") + assert_python_ok("-c", code) + + code = ("import sys\n" +reverted: +--- b/Modules/_asynciomodule.c ++++ a/Modules/_asynciomodule.c +@@ -332,6 +332,13 @@ + return loop; + } + ++ if (PyErr_WarnEx(PyExc_DeprecationWarning, ++ "There is no current event loop", ++ stacklevel)) ++ { ++ return NULL; ++ } ++ + policy = PyObject_CallNoArgs(asyncio_get_event_loop_policy); + if (policy == NULL) { + return NULL; +@@ -3085,11 +3092,6 @@ + return get_event_loop(1); + } + +-// This internal method is going away in Python 3.12, left here only for +-// backwards compatibility with 3.10.0 - 3.10.8 and 3.11.0. +-// Similarly, this method's Python equivalent in asyncio.events is going +-// away as well. +-// See GH-99949 for more details. + /*[clinic input] + _asyncio._get_event_loop + stacklevel: int = 3 diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 067c030975e0..388802fca8c6 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -214,7 +214,19 @@ in with passthru; stdenv.mkDerivation { substituteInPlace setup.py --replace /Library/Frameworks /no-such-path ''; - patches = [ + patches = optionals (version == "3.10.9") [ + # https://github.com/python/cpython/issues/100160 + ./3.10/asyncio-deprecation.patch + ] ++ optionals (version == "3.11.1") [ + # https://github.com/python/cpython/issues/100160 + (fetchpatch { + name = "asyncio-deprecation-3.11.patch"; + url = "https://github.com/python/cpython/commit/3fae04b10e2655a20a3aadb5e0d63e87206d0c67.diff"; + revert = true; + excludes = [ "Misc/NEWS.d/*" ]; + sha256 = "sha256-PmkXf2D9trtW1gXZilRIWgdg2Y47JfELq1z4DuG3wJY="; + }) + ] ++ [ # Disable the use of ldconfig in ctypes.util.find_library (since # ldconfig doesn't work on NixOS), and don't use # ctypes.util.find_library during the loading of the uuid module diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 113f3be326a3..78230898d7fc 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -37,7 +37,7 @@ with lib; let # Release calendar: https://www.mesa3d.org/release-calendar.html # Release frequency: https://www.mesa3d.org/releasing.html#schedule - version = "22.2.4"; + version = "22.2.5"; branch = versions.major version; self = stdenv.mkDerivation { @@ -52,7 +52,7 @@ self = stdenv.mkDerivation { "ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz" "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz" ]; - sha256 = "sha256-ZddrU8pce0YBng6OW0FN5F0v7NP81xcH9sO8dpHJ96s="; + sha256 = "sha256-hQ8GMUb467JirsBPZmwsHlYj8qGYfdok5DYbF7kSxzs="; }; # TODO: diff --git a/pkgs/development/python-modules/aioqsw/default.nix b/pkgs/development/python-modules/aioqsw/default.nix index c2c4b23d951a..e0a2b51a75d9 100644 --- a/pkgs/development/python-modules/aioqsw/default.nix +++ b/pkgs/development/python-modules/aioqsw/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "aioqsw"; - version = "0.2.2"; + version = "0.3.1"; format = "setuptools"; disabled = pythonOlder "3.8"; @@ -17,7 +17,7 @@ buildPythonPackage rec { owner = "Noltari"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-icrgLPn2Nr5rKJ2YzLLL8rhHoTK+ecNyhGd3glOc7tM="; + hash = "sha256-8WfQTaa9BiMHDLxCZNqcFmi0ifEC2xgyN2cDBBtBDdI="; }; propagatedBuildInputs = [ @@ -34,6 +34,7 @@ buildPythonPackage rec { meta = with lib; { description = "Library to fetch data from QNAP QSW switches"; homepage = "https://github.com/Noltari/aioqsw"; + changelog = "https://github.com/Noltari/aioqsw/releases/tag/${version}"; license = with licenses; [ asl20 ]; maintainers = with maintainers; [ fab ]; }; diff --git a/pkgs/development/python-modules/appthreat-vulnerability-db/default.nix b/pkgs/development/python-modules/appthreat-vulnerability-db/default.nix index 55a0f68807f8..f4c7ba91befe 100644 --- a/pkgs/development/python-modules/appthreat-vulnerability-db/default.nix +++ b/pkgs/development/python-modules/appthreat-vulnerability-db/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "appthreat-vulnerability-db"; - version = "4.1.8"; + version = "4.1.11"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -24,7 +24,7 @@ buildPythonPackage rec { owner = "AppThreat"; repo = "vulnerability-db"; rev = "refs/tags/v${version}"; - hash = "sha256-whTRmVLwJdQDxJEg50xSbzIm6KygPJE4qhQ1BT883T4="; + hash = "sha256-JaHIq1tUMxEaxigT1Z3EpJK4P2Yapki0A53WNrHo4tQ="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pysqlcipher3/default.nix b/pkgs/development/python-modules/pysqlcipher3/default.nix index acb71deab0b1..cc8a53e8fcea 100644 --- a/pkgs/development/python-modules/pysqlcipher3/default.nix +++ b/pkgs/development/python-modules/pysqlcipher3/default.nix @@ -1,10 +1,10 @@ -{ lib, buildPythonPackage, fetchPypi, pythonAtLeast, sqlcipher }: +{ lib, buildPythonPackage, fetchPypi, pythonOlder, sqlcipher }: buildPythonPackage rec { pname = "pysqlcipher3"; version = "1.1.0"; - disabled = pythonAtLeast "3.9"; + disabled = pythonOlder "3.3"; src = fetchPypi { inherit pname version; diff --git a/pkgs/development/python-modules/yalexs-ble/default.nix b/pkgs/development/python-modules/yalexs-ble/default.nix index c082c2880756..8fd6aaed63a3 100644 --- a/pkgs/development/python-modules/yalexs-ble/default.nix +++ b/pkgs/development/python-modules/yalexs-ble/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { pname = "yalexs-ble"; - version = "1.10.3"; + version = "1.11.4"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -22,7 +22,7 @@ buildPythonPackage rec { owner = "bdraco"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-ybsMrqm1ikHcc2hddHPWJyVnjowiaW3we93uO9BWylQ="; + hash = "sha256-EiT1Bnez1en8NTcNrGn9GmD//VcaBMfk4iwXaYTm8cU="; }; nativeBuildInputs = [ diff --git a/pkgs/development/tools/appthreat-depscan/default.nix b/pkgs/development/tools/appthreat-depscan/default.nix index 9d77e21c5883..b2ae6cc69f97 100644 --- a/pkgs/development/tools/appthreat-depscan/default.nix +++ b/pkgs/development/tools/appthreat-depscan/default.nix @@ -5,13 +5,13 @@ python3.pkgs.buildPythonApplication rec { pname = "appthreat-depscan"; - version = "3.2.7"; + version = "3.3.0"; src = fetchFromGitHub { owner = "AppThreat"; repo = "dep-scan"; rev = "refs/tags/v${version}"; - hash = "sha256-nHKEELQzcMKvxAC+u4lPBglsMwyzRpiQF3O+felHTbk="; + hash = "sha256-PHyg52I8I9TeSoWKLx2aqMF7Csym4Hnq83fO3hcVEOc="; }; propagatedBuildInputs = with python3.pkgs; [ diff --git a/pkgs/development/tools/changie/default.nix b/pkgs/development/tools/changie/default.nix index 0f5fccd797a8..b1ebe71d1117 100644 --- a/pkgs/development/tools/changie/default.nix +++ b/pkgs/development/tools/changie/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "changie"; - version = "1.10.0"; + version = "1.10.1"; src = fetchFromGitHub { rev = "v${version}"; owner = "miniscruff"; repo = pname; - sha256 = "sha256-8wcnbmS3T/rPKEN3zpo9ysaEIjgbPN50Jp9URpkRaUI="; + sha256 = "sha256-c7QEDyxk3Y/niQtVNQiS4OS/nHkldtjEcaXXR7rx/QI="; }; - vendorSha256 = "sha256-Ddw4YnOFURZxwqRBX9e1YGMO9E3hUNAoLTVcSJuaCU0="; + vendorSha256 = "sha256-AoQdOw5Yw54mGmwfozkxtfo3ZhWGUbBoHc3Iqy80x38="; patches = [ ./skip-flaky-test.patch ]; diff --git a/pkgs/development/tools/ruff/default.nix b/pkgs/development/tools/ruff/default.nix index cbf9d70298cb..79deea9fd249 100644 --- a/pkgs/development/tools/ruff/default.nix +++ b/pkgs/development/tools/ruff/default.nix @@ -8,16 +8,16 @@ rustPlatform.buildRustPackage rec { pname = "ruff"; - version = "0.0.176"; + version = "0.0.177"; src = fetchFromGitHub { owner = "charliermarsh"; repo = pname; rev = "v${version}"; - sha256 = "sha256-klkOaHX5BUuxDnY61TXk1Z8yFkYaIGnHyT0wiBsAqfs="; + sha256 = "sha256-4X4dEVcKjcgww0JnqXkuSbK+VEF4C4/0QLfFrfAoRJ8="; }; - cargoSha256 = "sha256-vwAI8kO285aS01KWSyb8kfX7TdLei0j4KfK9ftfbH+4="; + cargoSha256 = "sha256-JnIvSIiJC3eR7vDrkIfElxM79dZAHrdcvtNw26zKoqw="; buildInputs = lib.optionals stdenv.isDarwin [ CoreServices diff --git a/pkgs/os-specific/linux/autosuspend/default.nix b/pkgs/os-specific/linux/autosuspend/default.nix index ba3460938920..22d8e81f591e 100644 --- a/pkgs/os-specific/linux/autosuspend/default.nix +++ b/pkgs/os-specific/linux/autosuspend/default.nix @@ -5,13 +5,13 @@ python3.pkgs.buildPythonApplication rec { pname = "autosuspend"; - version = "4.2.0"; + version = "4.3.0"; src = fetchFromGitHub { owner = "languitar"; repo = pname; rev = "refs/tags/v${version}"; - sha256 = "sha256-aIWqE422xfAzAyF+4hARYOcomZHraTrtxtw2YfAxJ1M="; + sha256 = "sha256-gS8NNks4GaIGl7cEqWSP53I4/tIV4LypkmZ5vNOjspY="; }; postPatch = '' diff --git a/pkgs/os-specific/linux/kernel/linux-6.1.nix b/pkgs/os-specific/linux/kernel/linux-6.1.nix new file mode 100644 index 000000000000..64ed1a717caf --- /dev/null +++ b/pkgs/os-specific/linux/kernel/linux-6.1.nix @@ -0,0 +1,18 @@ +{ lib, buildPackages, fetchurl, perl, buildLinux, nixosTests, modDirVersionArg ? null, ... } @ args: + +with lib; + +buildLinux (args // rec { + version = "6.1"; + + # modDirVersion needs to be x.y.z, will automatically add .0 if needed + modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; + + # branchVersion needs to be x.y + extraMeta.branch = versions.majorMinor version; + + src = fetchurl { + url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; + sha256 = "sha256-LKHxcFGkMPb+0RluSVJxdQcXGs/ZfZZXchJQJwOyXes="; + }; +} // (args.argsOverride or { })) diff --git a/pkgs/servers/monitoring/longview/default.nix b/pkgs/servers/monitoring/longview/default.nix index 5d05dfd1ebb6..d2cc7c040e5d 100644 --- a/pkgs/servers/monitoring/longview/default.nix +++ b/pkgs/servers/monitoring/longview/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { LWPProtocolHttps MozillaCA CryptSSLeay - IOSocketInet6 + IOSocketINET6 LinuxDistribution JSONPP JSON diff --git a/pkgs/servers/monitoring/munin/default.nix b/pkgs/servers/monitoring/munin/default.nix index 2016bbe9ed3b..ad2eb3691314 100644 --- a/pkgs/servers/monitoring/munin/default.nix +++ b/pkgs/servers/monitoring/munin/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { perlPackages.NetSSLeay perlPackages.NetServer perlPackages.LogLog4perl - perlPackages.IOSocketInet6 + perlPackages.IOSocketINET6 perlPackages.Socket6 perlPackages.URI perlPackages.DBFile @@ -126,7 +126,7 @@ stdenv.mkDerivation rec { esac wrapProgram "$file" \ --set PERL5LIB "$out/${perlPackages.perl.libPrefix}:${with perlPackages; makePerlPath [ - LogLog4perl IOSocketInet6 Socket6 URI DBFile DateManip + LogLog4perl IOSocketINET6 Socket6 URI DBFile DateManip HTMLTemplate FileCopyRecursive FCGI NetCIDR NetSNMP NetServer ListMoreUtils DBDPg LWP rrdtool ]}" diff --git a/pkgs/servers/olaris/default.nix b/pkgs/servers/olaris/default.nix new file mode 100644 index 000000000000..2561fed1dc60 --- /dev/null +++ b/pkgs/servers/olaris/default.nix @@ -0,0 +1,53 @@ +{ buildGoModule, fetchFromGitLab, fetchzip, installShellFiles, lib }: + +buildGoModule rec { + pname = "olaris-server"; + version = "0.4.0"; + + src = fetchFromGitLab { + owner = "olaris"; + repo = pname; + rev = "v${version}"; + hash = "sha256-iworyQqyTabTI0NpZHTdUBGZSCaiC5Dhr69mRtsHLOs="; + }; + + preBuild = let + olaris-react = fetchzip { + url = "https://gitlab.com/api/v4/projects/olaris%2Folaris-react/jobs/artifacts/v${version}/download?job=build"; + extension = "zip"; + hash = "sha256-MkxBf/mGvtiOu0e79bMpd9Z/D0eOxhzPE+bKic//viM="; + }; + in '' + # cannot build olaris-react https://github.com/NixOS/nixpkgs/issues/203708 + cp -r ${olaris-react} react/build + make generate + ''; + + ldflags = [ + "-s" + "-w" + "-X gitlab.com/olaris/olaris-server/helpers.Version=${version}" + ]; + + vendorHash = "sha256-xWywDgw0LzJhPtVK0aGgT0TTanejJ39ZmGc50A3d68U="; + + nativeBuildInputs = [ installShellFiles ]; + + # integration tests require network access + doCheck = false; + + postInstall = '' + installShellCompletion --cmd olaris-server \ + --bash <($out/bin/olaris-server completion bash) \ + --fish <($out/bin/olaris-server completion fish) \ + --zsh <($out/bin/olaris-server completion zsh) + ''; + + meta = with lib; { + description = "A media manager and transcoding server."; + homepage = "https://gitlab.com/olaris/olaris-server"; + changelog = "https://gitlab.com/olaris/olaris-server/-/releases/v${version}"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ urandom ]; + }; +} diff --git a/pkgs/servers/web-apps/wiki-js/default.nix b/pkgs/servers/web-apps/wiki-js/default.nix index fd6ccfc8bdf3..2194883bba29 100644 --- a/pkgs/servers/web-apps/wiki-js/default.nix +++ b/pkgs/servers/web-apps/wiki-js/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "wiki-js"; - version = "2.5.292"; + version = "2.5.294"; src = fetchurl { url = "https://github.com/Requarks/wiki/releases/download/v${version}/${pname}.tar.gz"; - sha256 = "sha256-45s/XvZx6WvxsxazwLpYjg6vlC07mBBxv6xNThpPFFA="; + sha256 = "sha256-HHqXDmmTcWYRXF0GQf9QKEagYxyc1uvB7MPgLR3zALk="; }; sourceRoot = "."; diff --git a/pkgs/shells/xonsh/default.nix b/pkgs/shells/xonsh/default.nix index db9469cb7fd0..c8ab4bba9854 100644 --- a/pkgs/shells/xonsh/default.nix +++ b/pkgs/shells/xonsh/default.nix @@ -8,14 +8,14 @@ python3Packages.buildPythonApplication rec { pname = "xonsh"; - version = "0.13.3"; + version = "0.13.4"; # fetch from github because the pypi package ships incomplete tests src = fetchFromGitHub { owner = "xonsh"; repo = "xonsh"; rev = "refs/tags/${version}"; - sha256 = "sha256-COm+MZUbiFTB5EaOB+1+lIef1IfhQ95Ya1MmnJXGu6A="; + sha256 = "sha256-/u8jA7sLy3N8483uIzqBeSxEAGhX7+XS4D14n+15JHU="; }; LC_ALL = "en_US.UTF-8"; diff --git a/pkgs/tools/inputmethods/fcitx5/with-addons.nix b/pkgs/tools/inputmethods/fcitx5/with-addons.nix index 68d2f0612ca1..d2d1e2f992ae 100644 --- a/pkgs/tools/inputmethods/fcitx5/with-addons.nix +++ b/pkgs/tools/inputmethods/fcitx5/with-addons.nix @@ -1,7 +1,5 @@ { lib, symlinkJoin, makeWrapper, fcitx5, fcitx5-configtool, fcitx5-qt, fcitx5-gtk, addons ? [ ] }: -with lib; - symlinkJoin { name = "fcitx5-with-addons-${fcitx5.version}"; @@ -14,7 +12,7 @@ symlinkJoin { --prefix FCITX_ADDON_DIRS : "$out/lib/fcitx5" \ --suffix XDG_DATA_DIRS : "$out/share" \ --suffix PATH : "$out/bin" \ - --suffix LD_LIBRARY_PATH : ${makeLibraryPath (flatten (map (x: x.extraLdLibraries or []) addons))} + --suffix LD_LIBRARY_PATH : ${lib.makeLibraryPath (lib.flatten (map (x: x.extraLdLibraries or []) addons))} desktop=share/applications/org.fcitx.Fcitx5.desktop autostart=etc/xdg/autostart/org.fcitx.Fcitx5.desktop @@ -25,5 +23,5 @@ symlinkJoin { ln -s $out/$desktop $out/$autostart ''; - meta = fcitx5.meta; + inherit (fcitx5) meta; } diff --git a/pkgs/tools/misc/diffoscope/default.nix b/pkgs/tools/misc/diffoscope/default.nix index 2045f3ededc4..2fbdb14e7016 100644 --- a/pkgs/tools/misc/diffoscope/default.nix +++ b/pkgs/tools/misc/diffoscope/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchurl, python3Packages, docutils, help2man, installShellFiles -, abootimg, acl, apksigner, apktool, binutils-unwrapped-all-targets, bzip2, cbfstool, cdrkit, colord, colordiff, coreutils, cpio, db, diffutils, dtc +, abootimg, acl, apksigcopier, apksigner, apktool, binutils-unwrapped-all-targets, bzip2, cbfstool, cdrkit, colord, colordiff, coreutils, cpio, db, diffutils, dtc , e2fsprogs, enjarify, file, findutils, fontforge-fonttools, ffmpeg, fpc, gettext, ghc, ghostscriptX, giflib, gnumeric, gnupg, gnutar -, gzip, hdf5, imagemagick, jdk, libarchive, libcaca, llvm, lz4, mono, ocaml, oggvideotools, openssh, openssl, pdftk, pgpdump, poppler_utils, procyon, qemu, R +, gzip, html2text, hdf5, imagemagick, jdk, libarchive, libcaca, llvm, lz4, mono, ocaml, oggvideotools, openssh, openssl, pdftk, pgpdump, poppler_utils, procyon, qemu, R , radare2, sng, sqlite, squashfsTools, tcpdump, ubootTools, odt2txt, unzip, wabt, xmlbeans, xxd, xz, zip, zstd , enableBloat ? false # updater only @@ -11,11 +11,11 @@ # Note: when upgrading this package, please run the list-missing-tools.sh script as described below! python3Packages.buildPythonApplication rec { pname = "diffoscope"; - version = "225"; + version = "228"; src = fetchurl { url = "https://diffoscope.org/archive/diffoscope-${version}.tar.bz2"; - sha256 = "sha256-nuQmvYpCSzw2kUj/UdcBpn6jabaVMYT47MDblzpb/o0="; + sha256 = "sha256-fzIjuQEYOQPscQeVCV5gj6PmaVZcrjiOai/UA4279p4="; }; outputs = [ "out" "man" ]; @@ -41,7 +41,7 @@ python3Packages.buildPythonApplication rec { pythonPath = [ binutils-unwrapped-all-targets bzip2 colordiff coreutils cpio db diffutils e2fsprogs file findutils fontforge-fonttools gettext gnutar gzip - libarchive lz4 openssl pgpdump sng sqlite squashfsTools unzip xxd + html2text libarchive lz4 openssl pgpdump sng sqlite squashfsTools unzip xxd xz zip zstd ] ++ (with python3Packages; [ @@ -50,7 +50,7 @@ python3Packages.buildPythonApplication rec { ]) ++ lib.optionals stdenv.isLinux [ python3Packages.pyxattr python3Packages.rpm acl cdrkit dtc ] ++ lib.optionals enableBloat ([ - abootimg apksigner apktool cbfstool colord enjarify ffmpeg fpc ghc ghostscriptX giflib gnupg gnumeric + abootimg apksigcopier apksigner apktool cbfstool colord enjarify ffmpeg fpc ghc ghostscriptX giflib gnupg gnumeric hdf5 imagemagick libcaca llvm jdk mono ocaml odt2txt oggvideotools openssh pdftk poppler_utils procyon qemu R tcpdump ubootTools wabt radare2 xmlbeans ] ++ (with python3Packages; [ androguard binwalk guestfs h5py pdfminer-six ])); diff --git a/pkgs/tools/misc/linux-logo/default.nix b/pkgs/tools/misc/linux-logo/default.nix index a37f25c17d0a..ad7dd7227a90 100644 --- a/pkgs/tools/misc/linux-logo/default.nix +++ b/pkgs/tools/misc/linux-logo/default.nix @@ -3,30 +3,25 @@ , fetchFromGitHub , gettext , which -, nix-update-script }: stdenv.mkDerivation rec { pname = "linux_logo"; - version = "6.0"; + version = "6.01"; src = fetchFromGitHub { owner = "deater"; repo = pname; - rev = version; - sha256 = "sha256-q8QznEgnALJS//l7XXHZlq07pI2jCCm2USEU96rO8N0="; + rev = "v${version}"; + hash = "sha256-yBAxPwgKyFFIX0wuG7oG+FbEDpA5cPwyyJgWrFErJ7I="; }; nativeBuildInputs = [ gettext which ]; - passthru.updateScript = nix-update-script { - attrPath = pname; - }; - meta = with lib; { description = "Prints an ASCII logo and some system info"; homepage = "http://www.deater.net/weave/vmwprod/linux_logo"; - changelog = "https://github.com/deater/linux_logo/blob/${version}/CHANGES_IN_${version}"; + changelog = "https://github.com/deater/linux_logo/blob/${src.rev}/CHANGES"; license = licenses.gpl2Plus; maintainers = with maintainers; [ azahi ]; platforms = platforms.linux; diff --git a/pkgs/tools/misc/plantuml-server/default.nix b/pkgs/tools/misc/plantuml-server/default.nix index 3a3fb85c688e..67ef1498f8f3 100644 --- a/pkgs/tools/misc/plantuml-server/default.nix +++ b/pkgs/tools/misc/plantuml-server/default.nix @@ -1,14 +1,14 @@ { lib, stdenv, fetchurl }: let - version = "1.2022.13"; + version = "1.2022.14"; in stdenv.mkDerivation rec { pname = "plantuml-server"; inherit version; src = fetchurl { url = "https://github.com/plantuml/plantuml-server/releases/download/v${version}/plantuml-v${version}.war"; - sha256 = "sha256-XQXG4/wrpFZ3Z7b7K5hWuZQXcvaYvV3igjtNPtOQ7FE="; + sha256 = "sha256-Gy7KIdsL38USYqpPJ1Rjg0RyEdgsnD9lk/m7hSCBYLo="; }; dontUnpack = true; diff --git a/pkgs/tools/networking/amass/default.nix b/pkgs/tools/networking/amass/default.nix index 6c2e6acafe33..6106ae16c4a8 100644 --- a/pkgs/tools/networking/amass/default.nix +++ b/pkgs/tools/networking/amass/default.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "amass"; - version = "3.21.1"; + version = "3.21.2"; src = fetchFromGitHub { owner = "OWASP"; repo = "Amass"; rev = "v${version}"; - hash = "sha256-QHFMHAKAwPdVhCTLUFtRcX252kyHfLQNPOTJ1WwSLgU="; + hash = "sha256-s5+l5LBDUPhKkP1+m0R2UXywBX0y+4FWtyYP5F7ccaQ="; }; - vendorHash = "sha256-ytTHJoWjCiIoUJtUYUguphWVXr6gp43pY/L2ik2Bb+A="; + vendorHash = "sha256-Syi+znSXxjxfD9gqAyqhksWmxuNkwialWaem1NE5MKQ="; outputs = [ "out" diff --git a/pkgs/tools/networking/ddclient/default.nix b/pkgs/tools/networking/ddclient/default.nix index e4bb685b518e..b39af1930100 100644 --- a/pkgs/tools/networking/ddclient/default.nix +++ b/pkgs/tools/networking/ddclient/default.nix @@ -1,48 +1,44 @@ -{ lib, fetchFromGitHub, perlPackages, iproute2, perl }: +{ lib, fetchFromGitHub, perlPackages, autoreconfHook, iproute2, perl }: perlPackages.buildPerlPackage rec { pname = "ddclient"; - version = "3.9.1"; + version = "3.10.0"; + + outputs = [ "out" ]; src = fetchFromGitHub { owner = "ddclient"; repo = "ddclient"; rev = "v${version}"; - sha256 = "0hf377g4j9r9sac75xp17nk2h58mazswz4vkg4g2gl2yyhvzq91w"; + sha256 = "sha256-wWUkjXwVNZRJR1rXPn3IkDRi9is9vsRuNC/zq8RpB1E="; }; - # perl packages by default get devdoc which isn't present - outputs = [ "out" ]; - - buildInputs = with perlPackages; [ IOSocketSSL DigestSHA1 DataValidateIP JSONPP IOSocketInet6 ]; - - # Use iproute2 instead of ifconfig - preConfigure = '' + postPatch = '' touch Makefile.PL - substituteInPlace ddclient \ - --replace 'in the output of ifconfig' 'in the output of ip addr show' \ - --replace 'ifconfig -a' '${iproute2}/sbin/ip addr show' \ - --replace 'ifconfig $arg' '${iproute2}/sbin/ip addr show $arg' \ - --replace '/usr/bin/perl' '${perl}/bin/perl' # Until we get the patchShebangs fixed (issue #55786) we need to patch this manually ''; + nativeBuildInputs = [ autoreconfHook ]; + + buildInputs = with perlPackages; [ IOSocketINET6 IOSocketSSL JSONPP ]; + installPhase = '' runHook preInstall + # patch sheebang ddclient script which only exists after buildPhase + preConfigure install -Dm755 ddclient $out/bin/ddclient - install -Dm644 -t $out/share/doc/ddclient COP* ChangeLog README.* RELEASENOTE + install -Dm644 -t $out/share/doc/ddclient COP* README.* ChangeLog.md runHook postInstall ''; - # there are no tests distributed with ddclient + # TODO: run upstream tests doCheck = false; meta = with lib; { description = "Client for updating dynamic DNS service entries"; homepage = "https://ddclient.net/"; license = licenses.gpl2Plus; - # Mostly since `iproute` is Linux only. platforms = platforms.linux; maintainers = with maintainers; [ SuperSandro2000 ]; }; diff --git a/pkgs/tools/networking/imapsync/default.nix b/pkgs/tools/networking/imapsync/default.nix index 5dd9ef122200..5604145a182e 100644 --- a/pkgs/tools/networking/imapsync/default.nix +++ b/pkgs/tools/networking/imapsync/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { EncodeIMAPUTF7 FileCopyRecursive FileTail - IOSocketInet6 + IOSocketINET6 IOTee JSONWebToken LWP diff --git a/pkgs/tools/networking/miniupnpc/default.nix b/pkgs/tools/networking/miniupnpc/default.nix index 74406f2947da..6f22d6fb6339 100644 --- a/pkgs/tools/networking/miniupnpc/default.nix +++ b/pkgs/tools/networking/miniupnpc/default.nix @@ -19,10 +19,18 @@ stdenv.mkDerivation rec { doCheck = !stdenv.isFreeBSD; - makeFlags = [ "PREFIX=$(out)" "INSTALLPREFIX=$(out)" ]; + makeFlags = [ "PREFIX=$(out)" ]; postInstall = '' - chmod +x "$out"/lib/libminiupnpc${stdenv.hostPlatform.extensions.sharedLibrary} + chmod +x $out/lib/libminiupnpc${stdenv.hostPlatform.extensions.sharedLibrary} + + # for some reason cmake does not install binaries and manpages + # https://github.com/miniupnp/miniupnp/issues/637 + mkdir -p $out/bin + cp -a upnpc-static $out/bin/upnpc + cp -a ../external-ip.sh $out/bin/external-ip + mkdir -p $out/share/man + cp -a ../man3 $out/share/man ''; meta = with lib; { diff --git a/pkgs/tools/networking/swaks/default.nix b/pkgs/tools/networking/swaks/default.nix index 49ef0afc0603..da53407e3cc7 100644 --- a/pkgs/tools/networking/swaks/default.nix +++ b/pkgs/tools/networking/swaks/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { wrapProgram $out/bin/swaks --set PERL5LIB \ "${with perlPackages; makePerlPath [ - NetSSLeay AuthenSASL NetDNS IOSocketInet6 + NetSSLeay AuthenSASL NetDNS IOSocketINET6 ]}" ''; diff --git a/pkgs/tools/system/jobber/default.nix b/pkgs/tools/system/jobber/default.nix new file mode 100644 index 000000000000..d226d82d8cd8 --- /dev/null +++ b/pkgs/tools/system/jobber/default.nix @@ -0,0 +1,40 @@ +{ lib, buildGoModule, fetchFromGitHub, gotools }: + +buildGoModule rec { + pname = "jobber"; + version = "1.4.4"; + + src = fetchFromGitHub { + owner = "dshearer"; + repo = pname; + rev = "v${version}"; + hash = "sha256-mLYyrscvT/VK9ehwkPUq4RbwHb+6Wjvt7ZXk/fI0HT4="; + }; + + vendorHash = null; + + nativeBuildInputs = [ gotools ]; + + postConfigure = "go generate ./..."; + + ldflags = [ + "-s" + "-w" + "-X github.com/dshearer/jobber/common.jobberVersion=${version}" + "-X github.com/dshearer/jobber/common.etcDirPath=${placeholder "out"}/etc" + ]; + + postInstall = '' + mkdir -p $out/etc $out/libexec + $out/bin/jobbermaster defprefs --libexec $out/libexec > $out/etc/jobber.conf + mv $out/bin/jobber{master,runner} $out/libexec/ + ''; + + meta = with lib; { + homepage = "https://dshearer.github.io/jobber"; + changelog = "https://github.com/dshearer/jobber/releases/tag/v${version}"; + description = "An alternative to cron, with sophisticated status-reporting and error-handling"; + license = licenses.mit; + maintainers = with maintainers; [ urandom ]; + }; +} diff --git a/pkgs/tools/text/shfmt/default.nix b/pkgs/tools/text/shfmt/default.nix index 054e345be8db..a4cdcaa6121b 100644 --- a/pkgs/tools/text/shfmt/default.nix +++ b/pkgs/tools/text/shfmt/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "shfmt"; - version = "3.5.1"; + version = "3.6.0"; src = fetchFromGitHub { owner = "mvdan"; repo = "sh"; rev = "v${version}"; - sha256 = "sha256-/fNKgUh0AnyW1MOuTwk/deT5MnQMy8zMUA1KEdaM8SY="; + sha256 = "sha256-hu08TouICK9tg8+QrAUWpzEAkJ1hHJEIz/UXL+jexrQ="; }; - vendorSha256 = "sha256-3eao9bORPTsyCFpafp89mcL2Y7HNBlDfUsTull7qnYs="; + vendorSha256 = "sha256-De/8PLio63xn2byfVzGVCdzRwFxzFMy0ftjB+VEBLrQ="; subPackages = [ "cmd/shfmt" ]; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 1607f189d871..a8b4e63485f6 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -836,6 +836,7 @@ mapAliases ({ linuxPackages_5_19 = linuxKernel.packages.linux_5_19; linuxPackages_5_4 = linuxKernel.packages.linux_5_4; linuxPackages_6_0 = linuxKernel.packages.linux_6_0; + linuxPackages_6_1 = linuxKernel.packages.linux_6_1; linuxPackages_hardkernel_4_14 = linuxKernel.packages.hardkernel_4_14; linuxPackages_rpi0 = linuxKernel.packages.linux_rpi1; linuxPackages_rpi02w = linuxKernel.packages.linux_rpi3; @@ -855,6 +856,7 @@ mapAliases ({ linux_5_19 = linuxKernel.kernels.linux_5_19; linux_5_4 = linuxKernel.kernels.linux_5_4; linux_6_0 = linuxKernel.kernels.linux_6_0; + linux_6_1 = linuxKernel.kernels.linux_6_1; linuxPackages_mptcp = throw "'linuxPackages_mptcp' has been moved to https://github.com/teto/mptcp-flake"; # Converted to throw 2022-10-04 linux_mptcp = throw "'linux_mptcp' has been moved to https://github.com/teto/mptcp-flake"; # Converted to throw 2022-10-04 linux_mptcp_95 = throw "'linux_mptcp_95' has been moved to https://github.com/teto/mptcp-flake"; # Converted to throw 2022-10-04 @@ -1293,6 +1295,7 @@ mapAliases ({ radare2-cutter = cutter; # Added 2021-03-30 railcar = throw "'railcar' has been removed, as the upstream project has been abandoned"; # Added 2022-06-27 + rambox-pro = rambox; # Added 2022-12-12 raspberrypi-tools = throw "raspberrypi-tools has been removed in favor of identical 'libraspberrypi'"; # Added 2020-12-24 rawdog = throw "rawdog has been removed from nixpkgs as it still requires python2"; # Added 2022-01-01 rdiff_backup = throw "'rdiff_backup' has been renamed to/replaced by 'rdiff-backup'"; # Converted to throw 2022-02-22 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4c1cb5a14d77..b7e60652967c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1395,6 +1395,8 @@ with pkgs; httm = callPackage ../tools/filesystems/httm { }; + jobber = callPackage ../tools/system/jobber {}; + kanata = callPackage ../tools/system/kanata { }; kanata-with-cmd = kanata.override { withCmd = true; }; @@ -11056,8 +11058,6 @@ with pkgs; rambox = callPackage ../applications/networking/instant-messengers/rambox { }; - rambox-pro = callPackage ../applications/networking/instant-messengers/rambox/pro.nix { }; - rar = callPackage ../tools/archivers/rar { }; rarcrack = callPackage ../tools/security/rarcrack { }; @@ -11587,7 +11587,7 @@ with pkgs; signal-cli = callPackage ../applications/networking/instant-messengers/signal-cli { }; - signal-desktop = callPackage ../applications/networking/instant-messengers/signal-desktop { }; + inherit (callPackage ../applications/networking/instant-messengers/signal-desktop {}) signal-desktop signal-desktop-beta; slither-analyzer = with python3Packages; toPythonApplication slither-analyzer; @@ -24153,6 +24153,8 @@ with pkgs; oauth2-proxy = callPackage ../servers/oauth2-proxy { }; + olaris-server = callPackage ../servers/olaris {}; + onlyoffice-documentserver = callPackage ../servers/onlyoffice-documentserver { }; outline = callPackage ../servers/web-apps/outline (lib.fix (super: { @@ -28378,6 +28380,8 @@ with pkgs; inherit (gnome) empathy; + emptty = callPackage ../applications/display-managers/emptty {}; + endeavour = callPackage ../applications/office/endeavour { }; enhanced-ctorrent = callPackage ../applications/networking/p2p/enhanced-ctorrent { }; diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index 166f09f6e49a..ac0511a649bf 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -164,6 +164,13 @@ in { ]; }; + linux_6_1 = callPackage ../os-specific/linux/kernel/linux-6.1.nix { + kernelPatches = [ + kernelPatches.bridge_stp_helper + kernelPatches.request_key_helper + ]; + }; + linux_testing = let testing = callPackage ../os-specific/linux/kernel/linux-testing.nix { kernelPatches = [ @@ -520,6 +527,7 @@ in { linux_5_18 = throw "linux 5.18 was removed because it reached its end of life upstream"; # Added 2022-09-17 linux_5_19 = throw "linux 5.19 was removed because it reached its end of life upstream"; # Added 2022-11-01 linux_6_0 = recurseIntoAttrs (packagesFor kernels.linux_6_0); + linux_6_1 = recurseIntoAttrs (packagesFor kernels.linux_6_1); }; rtPackages = { @@ -578,7 +586,7 @@ in { packageAliases = { linux_default = packages.linux_5_15; # Update this when adding the newest kernel major version! - linux_latest = packages.linux_6_0; + linux_latest = packages.linux_6_1; linux_mptcp = packages.linux_mptcp_95; linux_rt_default = packages.linux_rt_5_4; linux_rt_latest = packages.linux_rt_5_10; diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 128564edea55..0c912b9ba403 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -12242,7 +12242,7 @@ let }; }; - IOSocketInet6 = buildPerlModule { + IOSocketINET6 = buildPerlModule { pname = "IO-Socket-INET6"; version = "2.72"; src = fetchurl { @@ -27816,7 +27816,7 @@ let hash = "sha256-RdIExtrXzZAXYIS/JCe6qM5QNoSlaZ6+sjbk0zvAuoY="; }; buildInputs = [ PodCoverage TestDifferences TestException TestFatal TestNoWarnings TestPod ]; - propagatedBuildInputs = [ ClassAccessor Clone EmailValid FileShareDir FileSlurp IOSocketInet6 ListMoreUtils ModuleFind Moose MooseXSingleton NetIP Readonly TextCSV ZonemasterLDNS libintl-perl ]; + propagatedBuildInputs = [ ClassAccessor Clone EmailValid FileShareDir FileSlurp IOSocketINET6 ListMoreUtils ModuleFind Moose MooseXSingleton NetIP Readonly TextCSV ZonemasterLDNS libintl-perl ]; preCheck = '' # disable dnssec test as it fails @@ -27927,6 +27927,7 @@ let DistZillaPluginNoTabsTests = self.DistZillaPluginTestNoTabs; EmailMIMEModifier = self.EmailMIME; ExtUtilsCommand = self.ExtUtilsMakeMaker; + IOSocketInet6 = self.IOSocketINET6; IOstringy = self.IOStringy; libintl_perl = self.libintl-perl; libintlperl = self.libintl-perl;