From cccab73e1ba3632861b9a61eba98fedffcbfe086 Mon Sep 17 00:00:00 2001 From: ash Date: Sat, 29 Jun 2024 01:24:16 +0100 Subject: [PATCH 01/29] xivlauncher: 1.0.9 -> 1.1.0 (cherry picked from commit 6acd31ddaff676c571d58636985a4802f7743809) --- pkgs/by-name/xi/xivlauncher/deps.nix | 5 ----- pkgs/by-name/xi/xivlauncher/package.nix | 8 ++++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/xi/xivlauncher/deps.nix b/pkgs/by-name/xi/xivlauncher/deps.nix index fa156e58d6e8..fa65ff3a7d1f 100644 --- a/pkgs/by-name/xi/xivlauncher/deps.nix +++ b/pkgs/by-name/xi/xivlauncher/deps.nix @@ -10,8 +10,6 @@ (fetchNuGet { pname = "goaaats.Steamworks"; version = "2.3.4"; sha256 = "1khxkkjvh6af60rxc13bacxn85amdfzr8z0b9a6gfg6m1fnmlkss"; }) (fetchNuGet { pname = "ImGui.NET"; version = "1.87.2"; sha256 = "0rv0n18fvz1gbh45crhzn1f8xw8zkc8qyiyj91vajjcry8mq1x7q"; }) (fetchNuGet { pname = "KeySharp"; version = "1.0.5"; sha256 = "1ic10v0a174fw6w89iyg4yzji36bsj15573y676cj5n09n6s75d4"; }) - (fetchNuGet { pname = "Microsoft.AspNetCore.App.Ref"; version = "6.0.30"; sha256 = "17k3l8xd5bsyk69bm5q4nxbpb4i0izw1kzmzi7j3p8pmm9prgrpy"; }) - (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "6.0.30"; sha256 = "18v0l07q74m5xxaf6y6dkmr6and8ivya0nslffnr4djrxcbiygdr"; }) (fetchNuGet { pname = "Microsoft.Bcl.AsyncInterfaces"; version = "6.0.0"; sha256 = "15gqy2m14fdlvy1g59207h5kisznm355kbw010gy19vh47z8gpz3"; }) (fetchNuGet { pname = "Microsoft.CodeAnalysis.Analyzers"; version = "3.3.3"; sha256 = "09m4cpry8ivm9ga1abrxmvw16sslxhy2k5sl14zckhqb1j164im6"; }) (fetchNuGet { pname = "Microsoft.CodeAnalysis.BannedApiAnalyzers"; version = "3.3.3"; sha256 = "1z6x0d8lpcfjr3sxy25493i17vvcg5bsay6c03qan6mnj5aqzw2k"; }) @@ -22,9 +20,6 @@ (fetchNuGet { pname = "Microsoft.CSharp"; version = "4.0.1"; sha256 = "0zxc0apx1gcx361jlq8smc9pfdgmyjh6hpka8dypc9w23nlsh6yj"; }) (fetchNuGet { pname = "Microsoft.DotNet.PlatformAbstractions"; version = "2.0.3"; sha256 = "020214swxm0hip1d9gjskrzmqzjnji7c6l5b3xcch8vp166066m9"; }) (fetchNuGet { pname = "Microsoft.Extensions.DependencyModel"; version = "2.0.3"; sha256 = "0dpyjp0hy9kkvk2dd4dclfmb10yq5avsw2a6v8nra9g6ii2p1nla"; }) - (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-x64"; version = "6.0.30"; sha256 = "0ss3108c2h7afypvliyqixv4dll60sq9iwqy90k1p132znpszrmb"; }) - (fetchNuGet { pname = "Microsoft.NETCore.App.Ref"; version = "6.0.30"; sha256 = "1wqqjhhlqz4dmijcx3kg3hnwq0s0jzqsddaksskzhq8avr4ziy18"; }) - (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "6.0.30"; sha256 = "1s81sj8lnb8szqawxh3vc8wi815ln12cyhrl3f7hwcpay57xgswx"; }) (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.0.1"; sha256 = "01al6cfxp68dscl15z7rxfw9zvhm64dncsw09a1vmdkacsa2v6lr"; }) (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.1.0"; sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm"; }) (fetchNuGet { pname = "Microsoft.NETCore.Targets"; version = "1.0.1"; sha256 = "0ppdkwy6s9p7x9jix3v4402wb171cdiibq7js7i13nxpdky7074p"; }) diff --git a/pkgs/by-name/xi/xivlauncher/package.nix b/pkgs/by-name/xi/xivlauncher/package.nix index 064bce81d8d9..86fb36532711 100644 --- a/pkgs/by-name/xi/xivlauncher/package.nix +++ b/pkgs/by-name/xi/xivlauncher/package.nix @@ -3,7 +3,7 @@ , useSteamRun ? true }: let - rev = "1.0.9"; + rev = "1.1.0"; in buildDotnetModule rec { pname = "XIVLauncher"; @@ -13,7 +13,7 @@ in owner = "goatcorp"; repo = "XIVLauncher.Core"; inherit rev; - hash = "sha256-UOKJMQPule0swwm5p6OPcOt1SYHji2J4MWvN6nGkj/M="; + hash = "sha256-vf9cGY+JvMBpQliS1LDmbWjtAbXByrIeXThKtJGQrO8="; fetchSubmodules = true; }; @@ -26,7 +26,7 @@ in # please do not unpin these even if they match the defaults, xivlauncher is sensitive to .NET versions dotnet-sdk = dotnetCorePackages.sdk_8_0; - dotnet-runtime = dotnetCorePackages.runtime_6_0; + dotnet-runtime = dotnetCorePackages.runtime_8_0; dotnetFlags = [ "-p:BuildHash=${rev}" @@ -52,7 +52,7 @@ in }).run; in '' substituteInPlace $out/bin/XIVLauncher.Core \ - --replace 'exec' 'exec ${steam-run}/bin/steam-run' + --replace-fail 'exec' 'exec ${steam-run}/bin/steam-run' '') + '' wrapProgram $out/bin/XIVLauncher.Core --prefix GST_PLUGIN_SYSTEM_PATH_1_0 ":" "$GST_PLUGIN_SYSTEM_PATH_1_0" # the reference to aria2 gets mangled as UTF-16LE and isn't detectable by nix: https://github.com/NixOS/nixpkgs/issues/220065 From 15a1a81cf7f6295d9def67b6a8d1b492f28ad0e7 Mon Sep 17 00:00:00 2001 From: seth Date: Sat, 22 Jun 2024 18:26:55 -0400 Subject: [PATCH 02/29] prismlauncher: migrate to by-name (cherry picked from commit dce34fd38b6cd06d2938807c74e731b81f677da6) --- .../pr/prismlauncher-unwrapped/package.nix} | 15 +++++++-------- .../pr/prismlauncher/package.nix} | 13 +++++-------- pkgs/top-level/all-packages.nix | 6 ------ 3 files changed, 12 insertions(+), 22 deletions(-) rename pkgs/{games/prismlauncher/default.nix => by-name/pr/prismlauncher-unwrapped/package.nix} (87%) rename pkgs/{games/prismlauncher/wrapper.nix => by-name/pr/prismlauncher/package.nix} (93%) diff --git a/pkgs/games/prismlauncher/default.nix b/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix similarity index 87% rename from pkgs/games/prismlauncher/default.nix rename to pkgs/by-name/pr/prismlauncher-unwrapped/package.nix index a2aabb72f0d7..adab3d4f7e52 100644 --- a/pkgs/games/prismlauncher/default.nix +++ b/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix @@ -4,12 +4,11 @@ , stripJavaArchivesHook , cmake , cmark -, Cocoa +, darwin , ninja , jdk17 , zlib -, qtbase -, quazip +, kdePackages , extra-cmake-modules , tomlplusplus , ghc_filesystem @@ -43,15 +42,15 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ extra-cmake-modules cmake jdk17 ninja stripJavaArchivesHook ]; buildInputs = [ - qtbase + kdePackages.qtbase zlib - quazip + kdePackages.quazip ghc_filesystem tomlplusplus cmark ] ++ lib.optional gamemodeSupport gamemode - ++ lib.optionals stdenv.isDarwin [ Cocoa ]; + ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]; hardeningEnable = lib.optionals stdenv.isLinux [ "pie" ]; @@ -59,7 +58,7 @@ stdenv.mkDerivation (finalAttrs: { # downstream branding "-DLauncher_BUILD_PLATFORM=nixpkgs" ] ++ lib.optionals (msaClientID != null) [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ] - ++ lib.optionals (lib.versionOlder qtbase.version "6") [ "-DLauncher_QT_VERSION_MAJOR=5" ] + ++ lib.optionals (lib.versionOlder kdePackages.qtbase.version "6") [ "-DLauncher_QT_VERSION_MAJOR=5" ] ++ lib.optionals stdenv.isDarwin [ "-DINSTALL_BUNDLE=nodeps" "-DMACOSX_SPARKLE_UPDATE_FEED_URL=''" @@ -82,7 +81,7 @@ stdenv.mkDerivation (finalAttrs: { their own mods, texture packs, saves, etc) and helps you manage them and their associated options with a simple interface. ''; - platforms = with lib.platforms; linux ++ darwin; + platforms = lib.platforms.linux ++ lib.platforms.darwin; changelog = "https://github.com/PrismLauncher/PrismLauncher/releases/tag/${finalAttrs.version}"; license = lib.licenses.gpl3Only; maintainers = with lib.maintainers; [ minion3665 Scrumplex getchoo ]; diff --git a/pkgs/games/prismlauncher/wrapper.nix b/pkgs/by-name/pr/prismlauncher/package.nix similarity index 93% rename from pkgs/games/prismlauncher/wrapper.nix rename to pkgs/by-name/pr/prismlauncher/package.nix index f5b21d70844f..ecd1f67c7ee8 100644 --- a/pkgs/games/prismlauncher/wrapper.nix +++ b/pkgs/by-name/pr/prismlauncher/package.nix @@ -2,14 +2,11 @@ , stdenv , symlinkJoin , makeWrapper -, wrapQtAppsHook , addOpenGLRunpath , prismlauncher-unwrapped -, qtbase # needed for wrapQtAppsHook -, qtsvg -, qtwayland +, kdePackages , xorg , libpulseaudio , libGL @@ -60,17 +57,17 @@ symlinkJoin { paths = [ prismlauncher' ]; nativeBuildInputs = [ - wrapQtAppsHook + kdePackages.wrapQtAppsHook ] # purposefully using a shell wrapper here for variable expansion # see https://github.com/NixOS/nixpkgs/issues/172583 ++ lib.optional withWaylandGLFW makeWrapper; buildInputs = [ - qtbase - qtsvg + kdePackages.qtbase + kdePackages.qtsvg ] - ++ lib.optional (lib.versionAtLeast qtbase.version "6" && stdenv.isLinux) qtwayland; + ++ lib.optional (lib.versionAtLeast kdePackages.qtbase.version "6" && stdenv.isLinux) kdePackages.qtwayland; waylandPreExec = lib.optionalString withWaylandGLFW '' if [ -n "$WAYLAND_DISPLAY" ]; then diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6c96eef29fd9..60898ddc325a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -37119,12 +37119,6 @@ with pkgs; principia = callPackage ../games/principia { }; - prismlauncher-unwrapped = kdePackages.callPackage ../games/prismlauncher { - inherit (darwin.apple_sdk.frameworks) Cocoa; - }; - - prismlauncher = kdePackages.callPackage ../games/prismlauncher/wrapper.nix { }; - pong3d = callPackage ../games/pong3d { }; pokerth = libsForQt5.callPackage ../games/pokerth { From b52304d09d8cf31154a5c7838e88541b310d6e33 Mon Sep 17 00:00:00 2001 From: seth Date: Sat, 22 Jun 2024 18:27:20 -0400 Subject: [PATCH 03/29] prismlauncher: format with nixfmt (cherry picked from commit b40318aaf71299220228c71a3b14fd1d2880eb37) --- .../pr/prismlauncher-unwrapped/package.nix | 78 ++++++---- pkgs/by-name/pr/prismlauncher/package.nix | 143 +++++++++--------- 2 files changed, 122 insertions(+), 99 deletions(-) diff --git a/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix b/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix index adab3d4f7e52..444f2f6c0fca 100644 --- a/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix +++ b/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix @@ -1,21 +1,21 @@ -{ lib -, stdenv -, fetchFromGitHub -, stripJavaArchivesHook -, cmake -, cmark -, darwin -, ninja -, jdk17 -, zlib -, kdePackages -, extra-cmake-modules -, tomlplusplus -, ghc_filesystem -, gamemode -, msaClientID ? null -, gamemodeSupport ? stdenv.isLinux -, +{ + lib, + stdenv, + fetchFromGitHub, + stripJavaArchivesHook, + cmake, + cmark, + darwin, + kdePackages, + ninja, + jdk17, + zlib, + extra-cmake-modules, + tomlplusplus, + ghc_filesystem, + gamemode, + msaClientID ? null, + gamemodeSupport ? stdenv.isLinux, }: let libnbtplusplus = fetchFromGitHub { @@ -26,7 +26,9 @@ let }; in -assert lib.assertMsg (stdenv.isLinux || !gamemodeSupport) "gamemodeSupport is only available on Linux"; +assert lib.assertMsg ( + stdenv.isLinux || !gamemodeSupport +) "gamemodeSupport is only available on Linux"; stdenv.mkDerivation (finalAttrs: { pname = "prismlauncher-unwrapped"; @@ -39,7 +41,13 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-1YGzCgNdzscnOVeNlHMFJa0RbMo6C2qQjtBOeDxHakI="; }; - nativeBuildInputs = [ extra-cmake-modules cmake jdk17 ninja stripJavaArchivesHook ]; + nativeBuildInputs = [ + extra-cmake-modules + cmake + jdk17 + ninja + stripJavaArchivesHook + ]; buildInputs = [ kdePackages.qtbase @@ -54,16 +62,20 @@ stdenv.mkDerivation (finalAttrs: { hardeningEnable = lib.optionals stdenv.isLinux [ "pie" ]; - cmakeFlags = [ - # downstream branding - "-DLauncher_BUILD_PLATFORM=nixpkgs" - ] ++ lib.optionals (msaClientID != null) [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ] - ++ lib.optionals (lib.versionOlder kdePackages.qtbase.version "6") [ "-DLauncher_QT_VERSION_MAJOR=5" ] - ++ lib.optionals stdenv.isDarwin [ - "-DINSTALL_BUNDLE=nodeps" - "-DMACOSX_SPARKLE_UPDATE_FEED_URL=''" - "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}/Applications/" - ]; + cmakeFlags = + [ + # downstream branding + "-DLauncher_BUILD_PLATFORM=nixpkgs" + ] + ++ lib.optionals (msaClientID != null) [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ] + ++ lib.optionals (lib.versionOlder kdePackages.qtbase.version "6") [ + "-DLauncher_QT_VERSION_MAJOR=5" + ] + ++ lib.optionals stdenv.isDarwin [ + "-DINSTALL_BUNDLE=nodeps" + "-DMACOSX_SPARKLE_UPDATE_FEED_URL=''" + "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}/Applications/" + ]; postUnpack = '' rm -rf source/libraries/libnbtplusplus @@ -84,6 +96,10 @@ stdenv.mkDerivation (finalAttrs: { platforms = lib.platforms.linux ++ lib.platforms.darwin; changelog = "https://github.com/PrismLauncher/PrismLauncher/releases/tag/${finalAttrs.version}"; license = lib.licenses.gpl3Only; - maintainers = with lib.maintainers; [ minion3665 Scrumplex getchoo ]; + maintainers = with lib.maintainers; [ + minion3665 + Scrumplex + getchoo + ]; }; }) diff --git a/pkgs/by-name/pr/prismlauncher/package.nix b/pkgs/by-name/pr/prismlauncher/package.nix index ecd1f67c7ee8..f102c40b3c4f 100644 --- a/pkgs/by-name/pr/prismlauncher/package.nix +++ b/pkgs/by-name/pr/prismlauncher/package.nix @@ -1,33 +1,34 @@ -{ lib -, stdenv -, symlinkJoin -, makeWrapper -, addOpenGLRunpath +{ + lib, + stdenv, + symlinkJoin, + makeWrapper, + addOpenGLRunpath, -, prismlauncher-unwrapped + prismlauncher-unwrapped, -, kdePackages -, xorg -, libpulseaudio -, libGL -, glfw -, glfw-wayland-minecraft -, openal -, jdk8 -, jdk17 -, jdk21 -, gamemode -, flite -, glxinfo -, pciutils -, udev -, vulkan-loader -, libusb1 + kdePackages, + xorg, + libpulseaudio, + libGL, + glfw, + glfw-wayland-minecraft, + openal, + jdk8, + jdk17, + jdk21, + gamemode, + flite, + glxinfo, + pciutils, + udev, + vulkan-loader, + libusb1, -, msaClientID ? null -, gamemodeSupport ? stdenv.isLinux -, textToSpeechSupport ? stdenv.isLinux -, controllerSupport ? stdenv.isLinux + msaClientID ? null, + gamemodeSupport ? stdenv.isLinux, + textToSpeechSupport ? stdenv.isLinux, + controllerSupport ? stdenv.isLinux, # Adds `glfw-wayland-minecraft` to `LD_LIBRARY_PATH` # when launched on wayland, allowing for the game to be run natively. @@ -36,19 +37,23 @@ # # Warning: This build of glfw may be unstable, and the launcher # itself can take slightly longer to start -, withWaylandGLFW ? false + withWaylandGLFW ? false, -, jdks ? [ jdk21 jdk17 jdk8 ] -, additionalLibs ? [ ] -, additionalPrograms ? [ ] + jdks ? [ + jdk21 + jdk17 + jdk8 + ], + additionalLibs ? [ ], + additionalPrograms ? [ ], }: -assert lib.assertMsg (withWaylandGLFW -> stdenv.isLinux) "withWaylandGLFW is only available on Linux"; +assert lib.assertMsg ( + withWaylandGLFW -> stdenv.isLinux +) "withWaylandGLFW is only available on Linux"; let - prismlauncher' = prismlauncher-unwrapped.override { - inherit msaClientID gamemodeSupport; - }; + prismlauncher' = prismlauncher-unwrapped.override { inherit msaClientID gamemodeSupport; }; in symlinkJoin { @@ -56,18 +61,20 @@ symlinkJoin { paths = [ prismlauncher' ]; - nativeBuildInputs = [ - kdePackages.wrapQtAppsHook - ] - # purposefully using a shell wrapper here for variable expansion - # see https://github.com/NixOS/nixpkgs/issues/172583 - ++ lib.optional withWaylandGLFW makeWrapper; + nativeBuildInputs = + [ kdePackages.wrapQtAppsHook ] + # purposefully using a shell wrapper here for variable expansion + # see https://github.com/NixOS/nixpkgs/issues/172583 + ++ lib.optional withWaylandGLFW makeWrapper; - buildInputs = [ - kdePackages.qtbase - kdePackages.qtsvg - ] - ++ lib.optional (lib.versionAtLeast kdePackages.qtbase.version "6" && stdenv.isLinux) kdePackages.qtwayland; + buildInputs = + [ + kdePackages.qtbase + kdePackages.qtsvg + ] + ++ lib.optional ( + lib.versionAtLeast kdePackages.qtbase.version "6" && stdenv.isLinux + ) kdePackages.qtwayland; waylandPreExec = lib.optionalString withWaylandGLFW '' if [ -n "$WAYLAND_DISPLAY" ]; then @@ -85,35 +92,35 @@ symlinkJoin { qtWrapperArgs = let - runtimeLibs = [ - xorg.libX11 - xorg.libXext - xorg.libXcursor - xorg.libXrandr - xorg.libXxf86vm + runtimeLibs = + [ + xorg.libX11 + xorg.libXext + xorg.libXcursor + xorg.libXrandr + xorg.libXxf86vm - # lwjgl - libpulseaudio - libGL - glfw - openal - stdenv.cc.cc.lib - vulkan-loader # VulkanMod's lwjgl + # lwjgl + libpulseaudio + libGL + glfw + openal + stdenv.cc.cc.lib + vulkan-loader # VulkanMod's lwjgl - # oshi - udev - ] - ++ lib.optional gamemodeSupport gamemode.lib - ++ lib.optional textToSpeechSupport flite - ++ lib.optional controllerSupport libusb1 - ++ additionalLibs; + # oshi + udev + ] + ++ lib.optional gamemodeSupport gamemode.lib + ++ lib.optional textToSpeechSupport flite + ++ lib.optional controllerSupport libusb1 + ++ additionalLibs; runtimePrograms = [ xorg.xrandr glxinfo pciutils # need lspci - ] - ++ additionalPrograms; + ] ++ additionalPrograms; in [ "--prefix PRISMLAUNCHER_JAVA_PATHS : ${lib.makeSearchPath "bin/java" jdks}" ] From fc3e31dabe8a8882741e4135f700fa800366bedc Mon Sep 17 00:00:00 2001 From: seth Date: Sat, 22 Jun 2024 18:28:11 -0400 Subject: [PATCH 04/29] prismlauncher: 8.3 -> 8.4 Diff: https://github.com/PrismLauncher/PrismLauncher/compare/8.3...8.4 Changelog: https://github.com/PrismLauncher/PrismLauncher/releases/tag/8.4 (cherry picked from commit 88039bb875585904972c9598a681e63ed2a18263) --- pkgs/by-name/pr/prismlauncher-unwrapped/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix b/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix index 444f2f6c0fca..3ff4b33e7efb 100644 --- a/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix +++ b/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix @@ -32,13 +32,13 @@ assert lib.assertMsg ( stdenv.mkDerivation (finalAttrs: { pname = "prismlauncher-unwrapped"; - version = "8.3"; + version = "8.4"; src = fetchFromGitHub { owner = "PrismLauncher"; repo = "PrismLauncher"; rev = finalAttrs.version; - hash = "sha256-1YGzCgNdzscnOVeNlHMFJa0RbMo6C2qQjtBOeDxHakI="; + hash = "sha256-460hB91M2hZm+uU1tywJEj20oRd5cz/NDvya8/vJdSA="; }; nativeBuildInputs = [ From 4ac007ece3835c174e63f2d19328848a696fc0e3 Mon Sep 17 00:00:00 2001 From: seth Date: Sat, 22 Jun 2024 18:45:41 -0400 Subject: [PATCH 05/29] prismlauncher: refactor this primarily reorders arguments and items in lists, fixes the meta-attributes of the wrapped version of the package, tidies up some comments, and adds new ones to better explain why we do certain things (cherry picked from commit 40581e9eed5ec929a67e0c4109a8e83dbeb12f63) --- .../pr/prismlauncher-unwrapped/package.nix | 59 +++++----- pkgs/by-name/pr/prismlauncher/package.nix | 111 ++++++++++-------- 2 files changed, 92 insertions(+), 78 deletions(-) diff --git a/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix b/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix index 3ff4b33e7efb..bc8b9b236d3c 100644 --- a/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix +++ b/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix @@ -2,21 +2,23 @@ lib, stdenv, fetchFromGitHub, - stripJavaArchivesHook, cmake, cmark, darwin, + extra-cmake-modules, + gamemode, + ghc_filesystem, + jdk17, kdePackages, ninja, - jdk17, - zlib, - extra-cmake-modules, + stripJavaArchivesHook, tomlplusplus, - ghc_filesystem, - gamemode, + zlib, + msaClientID ? null, gamemodeSupport ? stdenv.isLinux, }: + let libnbtplusplus = fetchFromGitHub { owner = "PrismLauncher"; @@ -27,8 +29,8 @@ let in assert lib.assertMsg ( - stdenv.isLinux || !gamemodeSupport -) "gamemodeSupport is only available on Linux"; + gamemodeSupport -> stdenv.isLinux +) "gamemodeSupport is only available on Linux!"; stdenv.mkDerivation (finalAttrs: { pname = "prismlauncher-unwrapped"; @@ -41,24 +43,30 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-460hB91M2hZm+uU1tywJEj20oRd5cz/NDvya8/vJdSA="; }; + postUnpack = '' + rm -rf source/libraries/libnbtplusplus + ln -s ${libnbtplusplus} source/libraries/libnbtplusplus + ''; + nativeBuildInputs = [ - extra-cmake-modules cmake - jdk17 ninja + extra-cmake-modules + jdk17 stripJavaArchivesHook ]; + buildInputs = [ - kdePackages.qtbase - zlib - kdePackages.quazip - ghc_filesystem - tomlplusplus cmark + ghc_filesystem + kdePackages.qtbase + kdePackages.quazip + tomlplusplus + zlib ] - ++ lib.optional gamemodeSupport gamemode - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]; + ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ] + ++ lib.optional gamemodeSupport gamemode; hardeningEnable = lib.optionals stdenv.isLinux [ "pie" ]; @@ -72,34 +80,31 @@ stdenv.mkDerivation (finalAttrs: { "-DLauncher_QT_VERSION_MAJOR=5" ] ++ lib.optionals stdenv.isDarwin [ + # we wrap our binary manually "-DINSTALL_BUNDLE=nodeps" + # disable built-in updater "-DMACOSX_SPARKLE_UPDATE_FEED_URL=''" "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}/Applications/" ]; - postUnpack = '' - rm -rf source/libraries/libnbtplusplus - ln -s ${libnbtplusplus} source/libraries/libnbtplusplus - ''; - dontWrapQtApps = true; meta = { - mainProgram = "prismlauncher"; - homepage = "https://prismlauncher.org/"; - description = "A free, open source launcher for Minecraft"; + description = "Free, open source launcher for Minecraft"; longDescription = '' Allows you to have multiple, separate instances of Minecraft (each with their own mods, texture packs, saves, etc) and helps you manage them and their associated options with a simple interface. ''; - platforms = lib.platforms.linux ++ lib.platforms.darwin; - changelog = "https://github.com/PrismLauncher/PrismLauncher/releases/tag/${finalAttrs.version}"; + homepage = "https://prismlauncher.org/"; + changelog = "https://github.com/PrismLauncher/PrismLauncher/releases/tag/${finalAttrs.src.rev}"; license = lib.licenses.gpl3Only; maintainers = with lib.maintainers; [ minion3665 Scrumplex getchoo ]; + mainProgram = "prismlauncher"; + platforms = lib.platforms.linux ++ lib.platforms.darwin; }; }) diff --git a/pkgs/by-name/pr/prismlauncher/package.nix b/pkgs/by-name/pr/prismlauncher/package.nix index f102c40b3c4f..c7e299b2a8e1 100644 --- a/pkgs/by-name/pr/prismlauncher/package.nix +++ b/pkgs/by-name/pr/prismlauncher/package.nix @@ -2,33 +2,38 @@ lib, stdenv, symlinkJoin, - makeWrapper, - addOpenGLRunpath, - prismlauncher-unwrapped, - - kdePackages, - xorg, - libpulseaudio, - libGL, + addOpenGLRunpath, + flite, + gamemode, glfw, glfw-wayland-minecraft, - openal, + glxinfo, jdk8, jdk17, jdk21, - gamemode, - flite, - glxinfo, + kdePackages, + libGL, + libpulseaudio, + libusb1, + makeWrapper, + openal, pciutils, udev, vulkan-loader, - libusb1, + xorg, - msaClientID ? null, - gamemodeSupport ? stdenv.isLinux, - textToSpeechSupport ? stdenv.isLinux, + additionalLibs ? [ ], + additionalPrograms ? [ ], controllerSupport ? stdenv.isLinux, + gamemodeSupport ? stdenv.isLinux, + jdks ? [ + jdk21 + jdk17 + jdk8 + ], + msaClientID ? null, + textToSpeechSupport ? stdenv.isLinux, # Adds `glfw-wayland-minecraft` to `LD_LIBRARY_PATH` # when launched on wayland, allowing for the game to be run natively. @@ -38,19 +43,11 @@ # Warning: This build of glfw may be unstable, and the launcher # itself can take slightly longer to start withWaylandGLFW ? false, - - jdks ? [ - jdk21 - jdk17 - jdk8 - ], - additionalLibs ? [ ], - additionalPrograms ? [ ], }: assert lib.assertMsg ( withWaylandGLFW -> stdenv.isLinux -) "withWaylandGLFW is only available on Linux"; +) "withWaylandGLFW is only available on Linux!"; let prismlauncher' = prismlauncher-unwrapped.override { inherit msaClientID gamemodeSupport; }; @@ -76,59 +73,71 @@ symlinkJoin { lib.versionAtLeast kdePackages.qtbase.version "6" && stdenv.isLinux ) kdePackages.qtwayland; - waylandPreExec = lib.optionalString withWaylandGLFW '' - if [ -n "$WAYLAND_DISPLAY" ]; then - export LD_LIBRARY_PATH=${lib.getLib glfw-wayland-minecraft}/lib:"$LD_LIBRARY_PATH" - fi - ''; + env = { + waylandPreExec = lib.optionalString withWaylandGLFW '' + if [ -n "$WAYLAND_DISPLAY" ]; then + export LD_LIBRARY_PATH=${lib.getLib glfw-wayland-minecraft}/lib:"$LD_LIBRARY_PATH" + fi + ''; + }; - postBuild = '' - ${lib.optionalString withWaylandGLFW '' + postBuild = + lib.optionalString withWaylandGLFW '' qtWrapperArgs+=(--run "$waylandPreExec") - ''} - - wrapQtAppsHook - ''; + '' + + '' + wrapQtAppsHook + ''; qtWrapperArgs = let runtimeLibs = [ + # lwjgl + glfw + libpulseaudio + libGL + openal + stdenv.cc.cc.lib + + vulkan-loader # VulkanMod's lwjgl + + udev # oshi + xorg.libX11 xorg.libXext xorg.libXcursor xorg.libXrandr xorg.libXxf86vm - - # lwjgl - libpulseaudio - libGL - glfw - openal - stdenv.cc.cc.lib - vulkan-loader # VulkanMod's lwjgl - - # oshi - udev ] - ++ lib.optional gamemodeSupport gamemode.lib ++ lib.optional textToSpeechSupport flite + ++ lib.optional gamemodeSupport gamemode.lib ++ lib.optional controllerSupport libusb1 ++ additionalLibs; runtimePrograms = [ - xorg.xrandr glxinfo pciutils # need lspci + xorg.xrandr # needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128 ] ++ additionalPrograms; in [ "--prefix PRISMLAUNCHER_JAVA_PATHS : ${lib.makeSearchPath "bin/java" jdks}" ] ++ lib.optionals stdenv.isLinux [ "--set LD_LIBRARY_PATH ${addOpenGLRunpath.driverLink}/lib:${lib.makeLibraryPath runtimeLibs}" - # xorg.xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128 "--prefix PATH : ${lib.makeBinPath runtimePrograms}" ]; - inherit (prismlauncher') meta; + meta = { + inherit (prismlauncher'.meta) + description + longDescription + homepage + changelog + license + maintainers + mainProgram + platforms + ; + }; } From 65085985c7a07721fe5fda0c52f71bc9b1526037 Mon Sep 17 00:00:00 2001 From: seth Date: Sat, 22 Jun 2024 18:47:48 -0400 Subject: [PATCH 06/29] prismlauncher: add updateScript (cherry picked from commit ea1cf5da523b1febfa5078a2c5db09fd056ffe92) --- pkgs/by-name/pr/prismlauncher-unwrapped/package.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix b/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix index bc8b9b236d3c..c51d285068bf 100644 --- a/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix +++ b/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix @@ -11,6 +11,7 @@ jdk17, kdePackages, ninja, + nix-update-script, stripJavaArchivesHook, tomlplusplus, zlib, @@ -89,6 +90,10 @@ stdenv.mkDerivation (finalAttrs: { dontWrapQtApps = true; + passthru = { + updateScript = nix-update-script { }; + }; + meta = { description = "Free, open source launcher for Minecraft"; longDescription = '' From 237728141d6db064c6afe25e58de676e15b98c2c Mon Sep 17 00:00:00 2001 From: seth Date: Sat, 22 Jun 2024 18:51:20 -0400 Subject: [PATCH 07/29] prismlauncher: improve assertions controllerSupport and textToSpeechSupport have no effect outside of linux and have no reason to be set; both of these work out of the box on darwin without any intervention from us (cherry picked from commit 3b2969b1a569e1f95ad0e51b8fdb05f76efdf1cc) --- pkgs/by-name/pr/prismlauncher-unwrapped/package.nix | 2 +- pkgs/by-name/pr/prismlauncher/package.nix | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix b/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix index c51d285068bf..2e8b7efef878 100644 --- a/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix +++ b/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix @@ -31,7 +31,7 @@ in assert lib.assertMsg ( gamemodeSupport -> stdenv.isLinux -) "gamemodeSupport is only available on Linux!"; +) "gamemodeSupport is only available on Linux."; stdenv.mkDerivation (finalAttrs: { pname = "prismlauncher-unwrapped"; diff --git a/pkgs/by-name/pr/prismlauncher/package.nix b/pkgs/by-name/pr/prismlauncher/package.nix index c7e299b2a8e1..c6ff6894389d 100644 --- a/pkgs/by-name/pr/prismlauncher/package.nix +++ b/pkgs/by-name/pr/prismlauncher/package.nix @@ -45,9 +45,17 @@ withWaylandGLFW ? false, }: +assert lib.assertMsg ( + controllerSupport -> stdenv.isLinux +) "controllerSupport only has an effect on Linux."; + +assert lib.assertMsg ( + textToSpeechSupport -> stdenv.isLinux +) "textToSpeechSupport only has an effect on Linux."; + assert lib.assertMsg ( withWaylandGLFW -> stdenv.isLinux -) "withWaylandGLFW is only available on Linux!"; +) "withWaylandGLFW is only available on Linux."; let prismlauncher' = prismlauncher-unwrapped.override { inherit msaClientID gamemodeSupport; }; From 55f0890416832bff72dd4af4f1577ce37a579f2a Mon Sep 17 00:00:00 2001 From: seth Date: Sun, 23 Jun 2024 14:46:14 -0400 Subject: [PATCH 08/29] prismlauncher: use `lib.cmakeFeature` (cherry picked from commit 94ad1c37a84a2065fe30470125d577aa5e3b3994) --- .../by-name/pr/prismlauncher-unwrapped/package.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix b/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix index 2e8b7efef878..2a0850069317 100644 --- a/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix +++ b/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix @@ -74,18 +74,20 @@ stdenv.mkDerivation (finalAttrs: { cmakeFlags = [ # downstream branding - "-DLauncher_BUILD_PLATFORM=nixpkgs" + (lib.cmakeFeature "Launcher_BUILD_PLATFORM" "nixpkgs") + ] + ++ lib.optionals (msaClientID != null) [ + (lib.cmakeFeature "Launcher_MSA_CLIENT_ID" (toString msaClientID)) ] - ++ lib.optionals (msaClientID != null) [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ] ++ lib.optionals (lib.versionOlder kdePackages.qtbase.version "6") [ - "-DLauncher_QT_VERSION_MAJOR=5" + (lib.cmakeFeature "Launcher_QT_VERSION_MAJOR" "5") ] ++ lib.optionals stdenv.isDarwin [ # we wrap our binary manually - "-DINSTALL_BUNDLE=nodeps" + (lib.cmakeFeature "INSTALL_BUNDLE" "nodeps") # disable built-in updater - "-DMACOSX_SPARKLE_UPDATE_FEED_URL=''" - "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}/Applications/" + (lib.cmakeFeature "MACOSX_SPARKLE_UPDATE_FEED_URL" "''") + (lib.cmakeFeature "CMAKE_INSTALL_PREFIX" "${placeholder "out"}/Applications/") ]; dontWrapQtApps = true; From 1fac62a83323f63c925bf91cad76e9fe3d0ac2cb Mon Sep 17 00:00:00 2001 From: Lukas Werling Date: Tue, 16 Jul 2024 23:38:14 +0200 Subject: [PATCH 09/29] nixos/tsm-client: Fix multi-value dsm.sys options A configuration such as: programs.tsmClient.servers.backup.domain = [ "/dir1" "dir2" ]; ...would previously result in an error ("cannot coerce a list to a string"), since `makeDsmSysLines` would return a nested list. (cherry picked from commit f52ee2af3928fbbf02dd7eb368e821ea9d65fb5f) --- nixos/modules/programs/tsm-client.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/programs/tsm-client.nix b/nixos/modules/programs/tsm-client.nix index 82fbc9b26e2d..6f70738ec3c8 100644 --- a/nixos/modules/programs/tsm-client.nix +++ b/nixos/modules/programs/tsm-client.nix @@ -4,7 +4,7 @@ let optionsGlobal = options; in let inherit (lib.attrsets) attrNames attrValues mapAttrsToList removeAttrs; - inherit (lib.lists) all allUnique concatLists elem isList map; + inherit (lib.lists) all allUnique concatLists concatMap elem isList map; inherit (lib.modules) mkDefault mkIf; inherit (lib.options) mkEnableOption mkOption mkPackageOption; inherit (lib.strings) concatLines match optionalString toLower; @@ -231,7 +231,7 @@ let # Turn a key-value pair from the server options attrset # into zero (value==null), one (scalar value) or # more (value is list) configuration stanza lines. - if isList value then map (makeDsmSysLines key) value else # recurse into list + if isList value then concatMap (makeDsmSysLines key) value else # recurse into list if value == null then [ ] else # skip `null` value [ (" ${key}${ if value == true then "" else # just output key if value is `true` From 486943af002650cfea2022270173759691816abf Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Fri, 2 Aug 2024 07:26:38 -0400 Subject: [PATCH 10/29] ipu6: Don't build out-of-tree driver for kernels that have it (cherry picked from commit 3bfeae1428eac1e60a304268bf7dc218f152b145) --- nixos/modules/hardware/video/webcam/ipu6.nix | 6 +++--- pkgs/top-level/linux-kernels.nix | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/nixos/modules/hardware/video/webcam/ipu6.nix b/nixos/modules/hardware/video/webcam/ipu6.nix index de47fe3f6b5a..ae54e24ee2da 100644 --- a/nixos/modules/hardware/video/webcam/ipu6.nix +++ b/nixos/modules/hardware/video/webcam/ipu6.nix @@ -26,9 +26,9 @@ in config = mkIf cfg.enable { - boot.extraModulePackages = with config.boot.kernelPackages; [ - ipu6-drivers - ]; + # Module is upstream as of 6.10 + boot.extraModulePackages = with config.boot.kernelPackages; + optional (kernelOlder "6.10") ipu6-drivers; hardware.firmware = with pkgs; [ ipu6-camera-bins diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index a057d451fa5e..89b06a9fc23a 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -374,7 +374,10 @@ in { intel-speed-select = if lib.versionAtLeast kernel.version "5.3" then callPackage ../os-specific/linux/intel-speed-select { } else null; - ipu6-drivers = callPackage ../os-specific/linux/ipu6-drivers {}; + ipu6-drivers = + if kernelOlder "6.10" + then callPackage ../os-specific/linux/ipu6-drivers {} + else null; ivsc-driver = callPackage ../os-specific/linux/ivsc-driver {}; From 1bb1e77ae210eb9b1c38745e25aedfa042e756ab Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 28 Jun 2024 04:33:17 +0000 Subject: [PATCH 11/29] amazon-ssm-agent: 3.3.484.0 -> 3.3.551.0 (cherry picked from commit be7b4539ea0c1e803fe8e6ca107be2ebdf28294b) --- pkgs/by-name/am/amazon-ssm-agent/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/am/amazon-ssm-agent/package.nix b/pkgs/by-name/am/amazon-ssm-agent/package.nix index 19728be301a8..1c7cae5f152a 100644 --- a/pkgs/by-name/am/amazon-ssm-agent/package.nix +++ b/pkgs/by-name/am/amazon-ssm-agent/package.nix @@ -42,13 +42,13 @@ let in buildGoModule rec { pname = "amazon-ssm-agent"; - version = "3.3.484.0"; + version = "3.3.551.0"; src = fetchFromGitHub { owner = "aws"; repo = "amazon-ssm-agent"; rev = "refs/tags/${version}"; - hash = "sha256-zWjV56xw4eVHKx3J2DDq6b+RYjU0EL9ShQmb72SVBVk="; + hash = "sha256-ncdLaHsQAdK1vtFzo55yWicKVfQHxpFpXYpODeG5/9I="; }; vendorHash = null; From b3dbb7ef6419ee69fb92ca258612201b5110711d Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Wed, 28 Aug 2024 01:54:26 +0800 Subject: [PATCH 12/29] element-desktop: 1.11.75 -> 1.11.76 (cherry picked from commit 27d1923480b060691adf5c671778a8ccceda521f) --- .../networking/instant-messengers/element/pin.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/element/pin.nix b/pkgs/applications/networking/instant-messengers/element/pin.nix index 2387b6ce5db6..ea86d807aafa 100644 --- a/pkgs/applications/networking/instant-messengers/element/pin.nix +++ b/pkgs/applications/networking/instant-messengers/element/pin.nix @@ -1,9 +1,9 @@ { - "version" = "1.11.75"; + "version" = "1.11.76"; "hashes" = { - "desktopSrcHash" = "sha256-bO23E1xG3FfizBBAWh0kCN+5JYbiX5V/wxLlY6ljWVQ="; + "desktopSrcHash" = "sha256-oG1nzOSXl2vjxvxdVg2o5ssKbAqrYHS4pnLCPJsIBCQ="; "desktopYarnHash" = "0bl78yd7apd5qbsqyhxnwj7lwrjx5820zh22rzgn9jqkcv25jwgw"; - "webSrcHash" = "sha256-cDayCoznbmALOiPg9FUYrfdFjzg0NV1NY9/b2KzTvMs="; - "webYarnHash" = "04si1x663z70nxj6nfaq7m2wcd8r4l3vdpirnjhc13wrj1kb8r8x"; + "webSrcHash" = "sha256-1hmSdefNChRcUnwbxS00NYrEexMyg8FIL0BXdEbwm+s="; + "webYarnHash" = "0bnxd7kig2a5scgdsd0yhhmanf7zqi2gd2si6kgnr0v2kc0akc0b"; }; } From 8c5720cf6127c283993b5ad944b540499656e95c Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 18 Jul 2024 17:07:11 +0200 Subject: [PATCH 13/29] python313: 3.13.0b3 -> 3.13.0b4 https://docs.python.org/3.13/whatsnew/changelog.html#python-3-13-0-beta-4 (cherry picked from commit d63b3b2fafa0597ad1c840409bbd84a053936bc0) --- pkgs/development/interpreters/python/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index f31df964319c..986ab0406cd5 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -93,9 +93,9 @@ in { major = "3"; minor = "13"; patch = "0"; - suffix = "b3"; + suffix = "b4"; }; - hash = "sha256-O+CUrQixHcKgZUY1JCOceNyfKzQrAdzU4eYG27xceKU="; + hash = "sha256-sqpVfDyHUjOr2vGxJChOXVD2uyONYqi1XxLcks6hlT8="; inherit (darwin) configd; inherit passthruFun; }; From 1974ec95e3e70e0e96d1f5e28c70a78a1c43fc8e Mon Sep 17 00:00:00 2001 From: DontEatOreo <57304299+DontEatOreo@users.noreply.github.com> Date: Wed, 28 Aug 2024 16:04:53 +0300 Subject: [PATCH 14/29] stats: 2.11.4 -> 2.11.7 Changelog: https://github.com/exelban/stats/releases/tag/v2.11.7 Diff: https://github.com/exelban/stats/compare/v2.11.4...v2.11.7 (cherry picked from commit 43e9e33891085bd22ce151c54c48d624c5deede7) --- pkgs/by-name/st/stats/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/st/stats/package.nix b/pkgs/by-name/st/stats/package.nix index b6c38f73d694..a476ce5cfa39 100644 --- a/pkgs/by-name/st/stats/package.nix +++ b/pkgs/by-name/st/stats/package.nix @@ -8,11 +8,11 @@ stdenvNoCC.mkDerivation (finalAttrs: { pname = "stats"; - version = "2.11.4"; + version = "2.11.7"; src = fetchurl { url = "https://github.com/exelban/stats/releases/download/v${finalAttrs.version}/Stats.dmg"; - hash = "sha256-Cm5gu+rL3eerAOnNcNUL2MlXsxV2jMiJLwgGtskIVP4="; + hash = "sha256-UppO7Cky+9xYg292t/78GPJ822kJ0RMG9yvetxRMVsU="; }; sourceRoot = "."; From 500262409138d999343f6c2e496e35646359f278 Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Sat, 6 Jul 2024 11:45:50 -0300 Subject: [PATCH 15/29] ceph: fix build Failure: https://hydra.nixos.org/build/265092568/nixlog/2/tail (cherry picked from commit c4cdd4aaa38c169eb1e7d3cdb5e7234841e66b28) --- pkgs/tools/filesystems/ceph/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix index fd0529d46f31..ab96126b1013 100644 --- a/pkgs/tools/filesystems/ceph/default.nix +++ b/pkgs/tools/filesystems/ceph/default.nix @@ -318,6 +318,11 @@ in rec { pname = "ceph"; inherit src version; + postPatch = '' + substituteInPlace cmake/modules/Finduring.cmake \ + --replace-fail "liburing.a liburing" "uring" + ''; + nativeBuildInputs = [ cmake fmt From e71c31fd1b25486cb9641a074473d9f8e7c2e5b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Tue, 13 Aug 2024 02:08:58 +0000 Subject: [PATCH 16/29] ceph: Add patch to fix Python `packaging` import (runtime semi-crash). See https://github.com/NixOS/nixpkgs/pull/330226#issuecomment-2268421031 (cherry picked from commit 6db7ec170400f2ea1ff5c5df9ed7c3902e29192c) --- pkgs/tools/filesystems/ceph/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix index ab96126b1013..4b1e140867f8 100644 --- a/pkgs/tools/filesystems/ceph/default.nix +++ b/pkgs/tools/filesystems/ceph/default.nix @@ -4,6 +4,7 @@ , fetchurl , fetchFromGitHub , fetchPypi +, fetchpatch # Build time , cmake @@ -318,6 +319,17 @@ in rec { pname = "ceph"; inherit src version; + patches = [ + # Fixes mgr not being able to import `packaging` due to autotools >= 70. + # Remove once https://github.com/ceph/ceph/pull/58624 is merged, see + # https://github.com/NixOS/nixpkgs/pull/330226#issuecomment-2268421031 + (fetchpatch { + url = "https://github.com/ceph/ceph/commit/8da2d857fa8fdfedd7aad0ca90e1780a3ed085c9.patch"; + name = "ceph-mgr-python-fix-packaging-import.patch"; + hash = "sha256-3Yl1X6UfTf0XCXJxgRnM/Js9sz8tS+hsqViY6gDExoI="; + }) + ]; + postPatch = '' substituteInPlace cmake/modules/Finduring.cmake \ --replace-fail "liburing.a liburing" "uring" From c5b65fe0d533e6b70352b6fa1d84d3e71bdde91c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Tue, 13 Aug 2024 02:18:21 +0000 Subject: [PATCH 17/29] ceph: Add patch to fix broken cryptsetup version parsing. Fixes #334227 (cherry picked from commit e0751fa3ba2f4c1d255fce1456b7579d75be7a9b) --- pkgs/tools/filesystems/ceph/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix index 4b1e140867f8..29f5cdbe31de 100644 --- a/pkgs/tools/filesystems/ceph/default.nix +++ b/pkgs/tools/filesystems/ceph/default.nix @@ -328,6 +328,18 @@ in rec { name = "ceph-mgr-python-fix-packaging-import.patch"; hash = "sha256-3Yl1X6UfTf0XCXJxgRnM/Js9sz8tS+hsqViY6gDExoI="; }) + + # Fixes cryptesetup version parsing regex, see + # * https://github.com/NixOS/nixpkgs/issues/334227 + # * https://www.mail-archive.com/ceph-users@ceph.io/msg26309.html + # * https://github.com/ceph/ceph/pull/58997 + # Remove once we're on the next version of Ceph 18, when this should be in: + # https://github.com/ceph/ceph/pull/58997 + (fetchpatch { + url = "https://github.com/ceph/ceph/commit/6ae874902b63652fa199563b6e7950cd75151304.patch"; + name = "ceph-reef-ceph-volume-fix-set_dmcrypt_no_workqueue.patch"; + hash = "sha256-r+7hcCz2WF/rJfgKwTatKY9unJlE8Uw3fmOyaY5jVH0="; + }) ]; postPatch = '' From 5710927e82c006a168a212c51d9165c5abd5cd66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Sun, 18 Aug 2024 21:12:36 +0000 Subject: [PATCH 18/29] ceph: Fix missing patch for Ceph with dmcrypt. Fixes #334975 (cherry picked from commit 234267e6a1dc2976a41093c666eaa92a7b8529ee) --- pkgs/tools/filesystems/ceph/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix index 29f5cdbe31de..e52672348257 100644 --- a/pkgs/tools/filesystems/ceph/default.nix +++ b/pkgs/tools/filesystems/ceph/default.nix @@ -340,6 +340,11 @@ in rec { name = "ceph-reef-ceph-volume-fix-set_dmcrypt_no_workqueue.patch"; hash = "sha256-r+7hcCz2WF/rJfgKwTatKY9unJlE8Uw3fmOyaY5jVH0="; }) + (fetchpatch { + url = "https://github.com/ceph/ceph/commit/607eb34b2c278566c386efcbf3018629cf08ccfd.patch"; + name = "ceph-volume-fix-set_dmcrypt_no_workqueue-regex.patch"; + hash = "sha256-q28Q7OIyFoMyMBCPXGA+AdNqp+9/6J/XwD4ODjx+JXY="; + }) ]; postPatch = '' From 31e495125b71cd77b90f99e0cb4e19f3b97ed217 Mon Sep 17 00:00:00 2001 From: benaryorg Date: Thu, 22 Aug 2024 13:31:52 +0000 Subject: [PATCH 19/29] tests/ceph: bluestore, dmcrypt, and IPv6 test Signed-off-by: benaryorg (cherry picked from commit 0cd631e61f7ec34287faea382a9311419c2ca869) The cherry-pick required -addresses = [ { Address = "${ip}/128"; } ]; +addresses = [ { addressConfig.Address = "${ip}/128"; } ]; to account for the fact that the test was written for master commit c4fd7cf16d531b09c6178294f5cdaaaa2bc55b01 nixos/networkd: get rid of *Config attributes in lists which is not in this branch. --- nixos/tests/all-tests.nix | 1 + .../ceph-single-node-bluestore-dmcrypt.nix | 270 ++++++++++++++++++ pkgs/tools/filesystems/ceph/default.nix | 3 +- 3 files changed, 273 insertions(+), 1 deletion(-) create mode 100644 nixos/tests/ceph-single-node-bluestore-dmcrypt.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 22e019b86505..3e81b9288feb 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -185,6 +185,7 @@ in { ceph-multi-node = handleTestOn [ "aarch64-linux" "x86_64-linux" ] ./ceph-multi-node.nix {}; ceph-single-node = handleTestOn [ "aarch64-linux" "x86_64-linux" ] ./ceph-single-node.nix {}; ceph-single-node-bluestore = handleTestOn [ "aarch64-linux" "x86_64-linux" ] ./ceph-single-node-bluestore.nix {}; + ceph-single-node-bluestore-dmcrypt = handleTestOn [ "aarch64-linux" "x86_64-linux" ] ./ceph-single-node-bluestore-dmcrypt.nix {}; certmgr = handleTest ./certmgr.nix {}; cfssl = handleTestOn ["aarch64-linux" "x86_64-linux"] ./cfssl.nix {}; cgit = handleTest ./cgit.nix {}; diff --git a/nixos/tests/ceph-single-node-bluestore-dmcrypt.nix b/nixos/tests/ceph-single-node-bluestore-dmcrypt.nix new file mode 100644 index 000000000000..2b7c5d1c4245 --- /dev/null +++ b/nixos/tests/ceph-single-node-bluestore-dmcrypt.nix @@ -0,0 +1,270 @@ +import ./make-test-python.nix ( + { pkgs, lib, ... }: + + let + # the single node ipv6 address + ip = "2001:db8:ffff::"; + # the global ceph cluster id + cluster = "54465b37-b9d8-4539-a1f9-dd33c75ee45a"; + # the fsids of OSDs + osd-fsid-map = { + "0" = "1c1b7ea9-06bf-4d30-9a01-37ac3a0254aa"; + "1" = "bd5a6f49-69d5-428c-ac25-a99f0c44375c"; + "2" = "c90de6c7-86c6-41da-9694-e794096dfc5c"; + }; + + in + { + name = "basic-single-node-ceph-cluster-bluestore-dmcrypt"; + meta = with pkgs.lib.maintainers; { + maintainers = [ benaryorg nh2 ]; + }; + + nodes = { + ceph = + { pkgs, config, ... }: + { + # disks for bluestore + virtualisation.emptyDiskImages = [ + 20480 + 20480 + 20480 + ]; + + # networking setup (no external connectivity required, only local IPv6) + networking.useDHCP = false; + systemd.network = { + enable = true; + wait-online.extraArgs = [ + "-i" + "lo" + ]; + networks = { + "40-loopback" = { + enable = true; + name = "lo"; + DHCP = "no"; + addresses = [ { addressConfig.Address = "${ip}/128"; } ]; + }; + }; + }; + + # do not start the ceph target by default so we can format the disks first + systemd.targets.ceph.wantedBy = lib.mkForce [ ]; + + # add the packages to systemPackages so the testscript doesn't run into any unexpected issues + # this shouldn't be required on production systems which have their required packages in the unit paths only + # but it helps in case one needs to actually run the tooling anyway + environment.systemPackages = with pkgs; [ + ceph + cryptsetup + lvm2 + ]; + + services.ceph = { + enable = true; + client.enable = true; + extraConfig = { + public_addr = ip; + cluster_addr = ip; + # ipv6 + ms_bind_ipv4 = "false"; + ms_bind_ipv6 = "true"; + # msgr2 settings + ms_cluster_mode = "secure"; + ms_service_mode = "secure"; + ms_client_mode = "secure"; + ms_mon_cluster_mode = "secure"; + ms_mon_service_mode = "secure"; + ms_mon_client_mode = "secure"; + # less default modules, cuts down on memory and startup time in the tests + mgr_initial_modules = ""; + # distribute by OSD, not by host, as per https://docs.ceph.com/en/reef/cephadm/install/#single-host + osd_crush_chooseleaf_type = "0"; + }; + client.extraConfig."mon.0" = { + host = "ceph"; + mon_addr = "v2:[${ip}]:3300"; + public_addr = "v2:[${ip}]:3300"; + }; + global = { + fsid = cluster; + clusterNetwork = "${ip}/64"; + publicNetwork = "${ip}/64"; + monInitialMembers = "0"; + }; + + mon = { + enable = true; + daemons = [ "0" ]; + }; + + osd = { + enable = true; + daemons = builtins.attrNames osd-fsid-map; + }; + + mgr = { + enable = true; + daemons = [ "ceph" ]; + }; + }; + + systemd.services = + let + osd-name = id: "ceph-osd-${id}"; + osd-pre-start = id: [ + "!${config.services.ceph.osd.package.out}/bin/ceph-volume lvm activate --bluestore ${id} ${osd-fsid-map.${id}} --no-systemd" + "${config.services.ceph.osd.package.lib}/libexec/ceph/ceph-osd-prestart.sh --id ${id} --cluster ${config.services.ceph.global.clusterName}" + ]; + osd-post-stop = id: [ + "!${config.services.ceph.osd.package.out}/bin/ceph-volume lvm deactivate ${id}" + ]; + map-osd = id: { + name = osd-name id; + value = { + serviceConfig.ExecStartPre = lib.mkForce (osd-pre-start id); + serviceConfig.ExecStopPost = osd-post-stop id; + unitConfig.ConditionPathExists = lib.mkForce [ ]; + unitConfig.StartLimitBurst = lib.mkForce 4; + path = with pkgs; [ + util-linux + lvm2 + cryptsetup + ]; + }; + }; + in + lib.pipe config.services.ceph.osd.daemons [ + (builtins.map map-osd) + builtins.listToAttrs + ]; + }; + }; + + testScript = + { ... }: + '' + start_all() + + ceph.wait_for_unit("default.target") + + # Bootstrap ceph-mon daemon + ceph.succeed( + "mkdir -p /var/lib/ceph/bootstrap-osd", + "ceph-authtool --create-keyring /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'", + "ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *'", + "ceph-authtool --create-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring --gen-key -n client.bootstrap-osd --cap mon 'profile bootstrap-osd' --cap mgr 'allow r'", + "ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring", + "ceph-authtool /tmp/ceph.mon.keyring --import-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring", + "monmaptool --create --fsid ${cluster} --addv 0 'v2:[${ip}]:3300/0' --clobber /tmp/ceph.initial-monmap", + "mkdir -p /var/lib/ceph/mon/ceph-0", + "ceph-mon --mkfs -i 0 --monmap /tmp/ceph.initial-monmap --keyring /tmp/ceph.mon.keyring", + "chown ceph:ceph -R /tmp/ceph.mon.keyring /var/lib/ceph", + "systemctl start ceph-mon-0.service", + ) + + ceph.wait_for_unit("ceph-mon-0.service") + # should the mon not start or bind for some reason this gives us a better error message than the config commands running into a timeout + ceph.wait_for_open_port(3300, "${ip}") + ceph.succeed( + # required for HEALTH_OK + "ceph config set mon auth_allow_insecure_global_id_reclaim false", + # IPv6 + "ceph config set global ms_bind_ipv4 false", + "ceph config set global ms_bind_ipv6 true", + # the new (secure) protocol + "ceph config set global ms_bind_msgr1 false", + "ceph config set global ms_bind_msgr2 true", + # just a small little thing + "ceph config set mon mon_compact_on_start true", + ) + + # Can't check ceph status until a mon is up + ceph.succeed("ceph -s | grep 'mon: 1 daemons'") + + # Bootstrap OSDs (do this before starting the mgr because cryptsetup and the mgr both eat a lot of memory) + ceph.succeed( + # this will automatically do what's required for LVM, cryptsetup, and stores all the data in Ceph's internal databases + "ceph-volume lvm prepare --bluestore --data /dev/vdb --dmcrypt --no-systemd --osd-id 0 --osd-fsid ${osd-fsid-map."0"}", + "ceph-volume lvm prepare --bluestore --data /dev/vdc --dmcrypt --no-systemd --osd-id 1 --osd-fsid ${osd-fsid-map."1"}", + "ceph-volume lvm prepare --bluestore --data /dev/vdd --dmcrypt --no-systemd --osd-id 2 --osd-fsid ${osd-fsid-map."2"}", + "sudo ceph-volume lvm deactivate 0", + "sudo ceph-volume lvm deactivate 1", + "sudo ceph-volume lvm deactivate 2", + "chown -R ceph:ceph /var/lib/ceph", + ) + + # Start OSDs (again, argon2id eats memory, so this happens before starting the mgr) + ceph.succeed( + "systemctl start ceph-osd-0.service", + "systemctl start ceph-osd-1.service", + "systemctl start ceph-osd-2.service", + ) + ceph.wait_until_succeeds("ceph -s | grep 'quorum 0'") + ceph.wait_until_succeeds("ceph osd stat | grep -e '3 osds: 3 up[^,]*, 3 in'") + + # Start the ceph-mgr daemon, after copying in the keyring + ceph.succeed( + "mkdir -p /var/lib/ceph/mgr/ceph-ceph/", + "ceph auth get-or-create -o /var/lib/ceph/mgr/ceph-ceph/keyring mgr.ceph mon 'allow profile mgr' osd 'allow *' mds 'allow *'", + "chown -R ceph:ceph /var/lib/ceph/mgr/ceph-ceph/", + "systemctl start ceph-mgr-ceph.service", + ) + ceph.wait_for_unit("ceph-mgr-ceph") + ceph.wait_until_succeeds("ceph -s | grep 'quorum 0'") + ceph.wait_until_succeeds("ceph -s | grep 'mgr: ceph(active,'") + ceph.wait_until_succeeds("ceph osd stat | grep -e '3 osds: 3 up[^,]*, 3 in'") + ceph.wait_until_succeeds("ceph -s | grep 'HEALTH_OK'") + + # test the actual storage + ceph.succeed( + "ceph osd pool create single-node-test 32 32", + "ceph osd pool ls | grep 'single-node-test'", + + # We need to enable an application on the pool, otherwise it will + # stay unhealthy in state POOL_APP_NOT_ENABLED. + # Creating a CephFS would do this automatically, but we haven't done that here. + # See: https://docs.ceph.com/en/reef/rados/operations/pools/#associating-a-pool-with-an-application + # We use the custom application name "nixos-test" for this. + "ceph osd pool application enable single-node-test nixos-test", + + "ceph osd pool rename single-node-test single-node-other-test", + "ceph osd pool ls | grep 'single-node-other-test'", + ) + ceph.wait_until_succeeds("ceph -s | grep '2 pools, 33 pgs'") + ceph.wait_until_succeeds("ceph -s | grep 'HEALTH_OK'") + ceph.wait_until_succeeds("ceph -s | grep '33 active+clean'") + ceph.fail( + # the old pool should be gone + "ceph osd pool ls | grep 'multi-node-test'", + # deleting the pool should fail without setting mon_allow_pool_delete + "ceph osd pool delete single-node-other-test single-node-other-test --yes-i-really-really-mean-it", + ) + + # rebooting gets rid of any potential tmpfs mounts or device-mapper devices + ceph.shutdown() + ceph.start() + ceph.wait_for_unit("default.target") + + # Start it up (again OSDs first due to memory constraints of cryptsetup and mgr) + ceph.systemctl("start ceph-mon-0.service") + ceph.wait_for_unit("ceph-mon-0") + ceph.systemctl("start ceph-osd-0.service") + ceph.wait_for_unit("ceph-osd-0") + ceph.systemctl("start ceph-osd-1.service") + ceph.wait_for_unit("ceph-osd-1") + ceph.systemctl("start ceph-osd-2.service") + ceph.wait_for_unit("ceph-osd-2") + ceph.systemctl("start ceph-mgr-ceph.service") + ceph.wait_for_unit("ceph-mgr-ceph") + + # Ensure the cluster comes back up again + ceph.succeed("ceph -s | grep 'mon: 1 daemons'") + ceph.wait_until_succeeds("ceph -s | grep 'quorum 0'") + ceph.wait_until_succeeds("ceph osd stat | grep -E '3 osds: 3 up[^,]*, 3 in'") + ceph.wait_until_succeeds("ceph -s | grep 'mgr: ceph(active,'") + ceph.wait_until_succeeds("ceph -s | grep 'HEALTH_OK'") + ''; + } +) diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix index e52672348257..4479c322838d 100644 --- a/pkgs/tools/filesystems/ceph/default.nix +++ b/pkgs/tools/filesystems/ceph/default.nix @@ -508,7 +508,8 @@ in rec { inherit (nixosTests) ceph-multi-node ceph-single-node - ceph-single-node-bluestore; + ceph-single-node-bluestore + ceph-single-node-bluestore-dmcrypt; }; }; }; From d05b6e35734e5555bd071d03752c1e4fd267db46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Sat, 31 Aug 2024 11:47:58 +0000 Subject: [PATCH 20/29] ceph.tests: Fix maintainer eval (cherry picked from commit def05db01841134388a38fe55d9f1951e9bbff0e) --- nixos/tests/ceph-single-node-bluestore-dmcrypt.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/tests/ceph-single-node-bluestore-dmcrypt.nix b/nixos/tests/ceph-single-node-bluestore-dmcrypt.nix index 2b7c5d1c4245..91840fbb38eb 100644 --- a/nixos/tests/ceph-single-node-bluestore-dmcrypt.nix +++ b/nixos/tests/ceph-single-node-bluestore-dmcrypt.nix @@ -17,7 +17,7 @@ import ./make-test-python.nix ( { name = "basic-single-node-ceph-cluster-bluestore-dmcrypt"; meta = with pkgs.lib.maintainers; { - maintainers = [ benaryorg nh2 ]; + maintainers = [ nh2 ]; }; nodes = { From ba7ff1d171a08f472c940a51b64931cb9819a951 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 1 Aug 2024 13:52:30 +0200 Subject: [PATCH 21/29] python313: 3.13.0b4 -> 3.13.0rc1 https://docs.python.org/3.13/whatsnew/changelog.html#python-3-13-0rc1 (cherry picked from commit 430a0092826b79389d6f4298c587909aa5d64049) --- pkgs/development/interpreters/python/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index 986ab0406cd5..263bfa24d7d3 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -93,9 +93,9 @@ in { major = "3"; minor = "13"; patch = "0"; - suffix = "b4"; + suffix = "rc1"; }; - hash = "sha256-sqpVfDyHUjOr2vGxJChOXVD2uyONYqi1XxLcks6hlT8="; + hash = "sha256-Z4uIR3XuwCJNUVn6kAh5AgusoqNs6UL9lf6/oa20pr0="; inherit (darwin) configd; inherit passthruFun; }; From 43e77c3a5fdbb1fc7708b42c1bc7f544eb6973f7 Mon Sep 17 00:00:00 2001 From: Echo Nolan Date: Sat, 31 Aug 2024 15:13:22 -0400 Subject: [PATCH 22/29] nixos/telegraf: make sure ping executable is available when trying to ping We need ping to be in PATH of the service otherwise it can't ping. This commit adds it, conditional on one of the inputs being a ping task. (cherry picked from commit 934a337a13dd3400acfe778c3de52c75152c0c2b) --- nixos/modules/services/monitoring/telegraf.nix | 3 ++- nixos/tests/telegraf.nix | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/monitoring/telegraf.nix b/nixos/modules/services/monitoring/telegraf.nix index 8c51a2838e05..dfff80e1bac2 100644 --- a/nixos/modules/services/monitoring/telegraf.nix +++ b/nixos/modules/services/monitoring/telegraf.nix @@ -61,7 +61,8 @@ in { wantedBy = [ "multi-user.target" ]; wants = [ "network-online.target" ]; after = [ "network-online.target" ]; - path = lib.optional (config.services.telegraf.extraConfig.inputs ? procstat) pkgs.procps; + path = lib.optional (config.services.telegraf.extraConfig.inputs ? procstat) pkgs.procps + ++ lib.optional (config.services.telegraf.extraConfig.inputs ? ping) pkgs.iputils; serviceConfig = { EnvironmentFile = config.services.telegraf.environmentFiles; ExecStartPre = lib.optional (config.services.telegraf.environmentFiles != []) diff --git a/nixos/tests/telegraf.nix b/nixos/tests/telegraf.nix index c3cdb1645213..2ccad7af3f55 100644 --- a/nixos/tests/telegraf.nix +++ b/nixos/tests/telegraf.nix @@ -19,6 +19,12 @@ import ./make-test-python.nix ({ pkgs, ...} : { timeout = "5s"; data_format = "influx"; }; + inputs.ping = { + urls = ["127.0.0.1"]; + count = 4; + interval = "10s"; + timeout = 1.0; + }; outputs.file.files = ["/tmp/metrics.out"]; outputs.file.data_format = "influx"; }; @@ -29,5 +35,6 @@ import ./make-test-python.nix ({ pkgs, ...} : { machine.wait_for_unit("telegraf.service") machine.wait_until_succeeds("grep -q example /tmp/metrics.out") + machine.wait_until_succeeds("grep -q ping /tmp/metrics.out") ''; }) From c7197aab04f5a73bc80180888fb3fdfd94d536c9 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 10 Jun 2024 03:57:11 +0000 Subject: [PATCH 23/29] erigon: 2.60.0 -> 2.60.6 --- pkgs/applications/blockchains/erigon/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/blockchains/erigon/default.nix b/pkgs/applications/blockchains/erigon/default.nix index 4e22796cd6d1..b5fa4dfe134d 100644 --- a/pkgs/applications/blockchains/erigon/default.nix +++ b/pkgs/applications/blockchains/erigon/default.nix @@ -2,7 +2,7 @@ let pname = "erigon"; - version = "2.60.0"; + version = "2.60.6"; in buildGoModule { inherit pname version; @@ -11,11 +11,11 @@ buildGoModule { owner = "ledgerwatch"; repo = pname; rev = "v${version}"; - hash = "sha256-c0CArubKvdh9xcvBM15O4vGwAsSHzaINtoKd0XczJHU="; + hash = "sha256-208gJTLaVEikH92ZDEULPtfnKJyZhZCRCDfCxewABK4="; fetchSubmodules = true; }; - vendorHash = "sha256-38NmSSK3a70WvhZAZ529wdAMlEuk8/4YqtadoLOn1IY="; + vendorHash = "sha256-TUK7obI1wOXroI1NE1GfIP+NMW909+z92Wpy9B/soY0="; proxyVendor = true; # Build errors in mdbx when format hardening is enabled: From 800195d35fe179e21f21257c134097f70245b89d Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 1 Sep 2024 04:12:32 +0000 Subject: [PATCH 24/29] flyctl: 0.2.120 -> 0.2.124 (cherry picked from commit 0b4c2377a76382c4fbfc5d14e525256e1defc426) --- pkgs/development/web/flyctl/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/web/flyctl/default.nix b/pkgs/development/web/flyctl/default.nix index 03485e92ea95..41f5d6a53f43 100644 --- a/pkgs/development/web/flyctl/default.nix +++ b/pkgs/development/web/flyctl/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "flyctl"; - version = "0.2.120"; + version = "0.2.124"; src = fetchFromGitHub { owner = "superfly"; repo = "flyctl"; rev = "v${version}"; - hash = "sha256-n+EWwjz4+zmwqDGzBRi2rtnxe+mxd906JcqtrbGiz4w="; + hash = "sha256-l+rq3L4JQcc8mXbBukAOTtoX0Z7fudYxAIPnPFvupjQ="; }; - vendorHash = "sha256-RtHTAigoPlmop9XURD1nw1nCkGJCdYwFUnp5AWp3x3M="; + vendorHash = "sha256-rFFaRtEXc+rCCxUckrnFq79zIXg2XETa+hPZo1usBrc="; subPackages = [ "." ]; From 8c7565b02328b2ddebd64c313d1492c1e4a1944e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 29 Aug 2024 21:00:20 +0000 Subject: [PATCH 25/29] discord: 0.0.65 -> 0.0.66 (cherry picked from commit 507becefc92abbd801ef496b5fe33f73a1b51a51) --- .../networking/instant-messengers/discord/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/discord/default.nix b/pkgs/applications/networking/instant-messengers/discord/default.nix index c4f352ac67a1..67cc95799d13 100644 --- a/pkgs/applications/networking/instant-messengers/discord/default.nix +++ b/pkgs/applications/networking/instant-messengers/discord/default.nix @@ -2,7 +2,7 @@ let versions = if stdenv.isLinux then { - stable = "0.0.65"; + stable = "0.0.66"; ptb = "0.0.101"; canary = "0.0.475"; development = "0.0.24"; @@ -17,7 +17,7 @@ let x86_64-linux = { stable = fetchurl { url = "https://dl.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz"; - hash = "sha256-kzYLZcjuG7k8RSjc5ooDlMKaAlMHvm0yCl5Krnhqq8A="; + hash = "sha256-tbpo1+fbziJk2JdaMyAW5Ynb0wuWkLdcDnzQbiZJ47A="; }; ptb = fetchurl { url = "https://dl-ptb.discordapp.net/apps/linux/${version}/discord-ptb-${version}.tar.gz"; From cc0efe8f5866a26966167b6912786b57745a7f7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20J=C3=B6ns?= <34899572+jopejoe1@users.noreply.github.com> Date: Sun, 1 Sep 2024 12:42:53 +0000 Subject: [PATCH 26/29] discord: various updates (#338785) * discord-development: 0.0.24 -> 0.0.25 * discord-canary: 0.0.475 -> 0.0.479 * pkgsCross.aarch64-darwin.discord: 0.0.316 -> 0.0.317 * pkgsCross.aarch64-darwin.discord-ptb: 0.0.130 -> 0.0.131 * pkgsCross.aarch64-darwin.discord-development: 0.0.46 -> 0.0.47 * pkgsCross.aarch64-darwin.discord-canary: 0.0.583 -> 0.0.587 (cherry picked from commit f6efa6d64ea9d344dbaff4eb8fa225292af2f50b) --- .../instant-messengers/discord/default.nix | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/discord/default.nix b/pkgs/applications/networking/instant-messengers/discord/default.nix index 67cc95799d13..a891660ab95e 100644 --- a/pkgs/applications/networking/instant-messengers/discord/default.nix +++ b/pkgs/applications/networking/instant-messengers/discord/default.nix @@ -4,13 +4,13 @@ let if stdenv.isLinux then { stable = "0.0.66"; ptb = "0.0.101"; - canary = "0.0.475"; - development = "0.0.24"; + canary = "0.0.479"; + development = "0.0.25"; } else { - stable = "0.0.316"; - ptb = "0.0.130"; - canary = "0.0.583"; - development = "0.0.46"; + stable = "0.0.317"; + ptb = "0.0.131"; + canary = "0.0.587"; + development = "0.0.47"; }; version = versions.${branch}; srcs = rec { @@ -25,29 +25,29 @@ let }; canary = fetchurl { url = "https://dl-canary.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz"; - hash = "sha256-suVIDCZhI6DwUVizBmTm104Clr6pH/olAIbOMNzFNss="; + hash = "sha256-mirioiRpwQB07sL1avGYk2+Cnmdw7PW808AAA6p2Y0U="; }; development = fetchurl { url = "https://dl-development.discordapp.net/apps/linux/${version}/discord-development-${version}.tar.gz"; - hash = "sha256-rSlGL2BwtUxLJltSD2Ms94qmZ4kuX5i9jFqyYC30jyQ="; + hash = "sha256-9dwZ89YOs2iNOeoVrGfNHwr4mvfXmPk1SrJYoteYakY="; }; }; x86_64-darwin = { stable = fetchurl { url = "https://dl.discordapp.net/apps/osx/${version}/Discord.dmg"; - hash = "sha256-ZJ2ybvKGGCm8CZhwGxmLXZWNUD1eAyg17zD/sBwViB4="; + hash = "sha256-SX6a2qPSFURL00dMLrHSI4+964Xc76ada4PUMlG1V9U="; }; ptb = fetchurl { url = "https://dl-ptb.discordapp.net/apps/osx/${version}/DiscordPTB.dmg"; - hash = "sha256-mLfeMx5dQNpoLUyoOSCj8XtNxWjsBpVWdFv1obtHJak="; + hash = "sha256-/wuYPjGh/RJZSDeo8r78YEbCYj+qZWTaIDIfKuSH+r0="; }; canary = fetchurl { url = "https://dl-canary.discordapp.net/apps/osx/${version}/DiscordCanary.dmg"; - hash = "sha256-eIjkXOW07sR26iBttT0mGDxNnpLFKlVJtzSAtFcicBg="; + hash = "sha256-6m6wmGzVOEY2oVAHsSMsAtgQK5zqC0D7U3s28pcH0ss="; }; development = fetchurl { url = "https://dl-development.discordapp.net/apps/osx/${version}/DiscordDevelopment.dmg"; - hash = "sha256-nMihtf/xLIxwqAVrF1BSRewdS2WThx0LZ5HZUI+OzM0="; + hash = "sha256-mgVCuTE2zYFRUW6Ukw7mUmPnOR4g/QUFYlWI3bux0es="; }; }; aarch64-darwin = x86_64-darwin; From f4450fa5a7e935ea71a78c52f408ac4e509e4fa5 Mon Sep 17 00:00:00 2001 From: George Macon Date: Tue, 27 Aug 2024 20:15:47 -0400 Subject: [PATCH 27/29] mautrix-{meta,signal,whatsapp}: Optionally build against goolm After olm gained knownVulnerabilities in #334638, allow building these bridges using the pure-Go goolm library instead of libolm bindings. (cherry picked from commit 8b17835309a5e963de495595c3666602c8d2f019) --- pkgs/by-name/ma/mautrix-meta/package.nix | 9 ++++++++- pkgs/servers/mautrix-signal/default.nix | 18 +++++++++++++++--- pkgs/servers/mautrix-whatsapp/default.nix | 16 ++++++++++++++-- 3 files changed, 37 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/ma/mautrix-meta/package.nix b/pkgs/by-name/ma/mautrix-meta/package.nix index 8a82adf188fd..a698fb6698b9 100644 --- a/pkgs/by-name/ma/mautrix-meta/package.nix +++ b/pkgs/by-name/ma/mautrix-meta/package.nix @@ -4,6 +4,12 @@ , lib , nixosTests , olm +# This option enables the use of an experimental pure-Go implementation of the +# Olm protocol instead of libolm for end-to-end encryption. Using goolm is not +# recommended by the mautrix developers, but they are interested in people +# trying it out in non-production-critical environments and reporting any +# issues they run into. +, withGoolm ? false }: buildGoModule rec { @@ -19,7 +25,8 @@ buildGoModule rec { hash = "sha256-whBqhdB2FSFfrbtGtq8v3pjXW7QMt+I0baHTXVGPWVg="; }; - buildInputs = [ olm ]; + buildInputs = lib.optional (!withGoolm) olm; + tags = lib.optional withGoolm "goolm"; vendorHash = "sha256-rP9wvF6yYW0TdQ+vQV6ZcVMxnCtqz8xRcd9v+4pYYio="; diff --git a/pkgs/servers/mautrix-signal/default.nix b/pkgs/servers/mautrix-signal/default.nix index 7f9641a74ca9..9fd22d387aa6 100644 --- a/pkgs/servers/mautrix-signal/default.nix +++ b/pkgs/servers/mautrix-signal/default.nix @@ -1,4 +1,16 @@ -{ lib, buildGoModule, fetchFromGitHub, olm, libsignal-ffi }: +{ + lib, + buildGoModule, + fetchFromGitHub, + olm, + libsignal-ffi, + # This option enables the use of an experimental pure-Go implementation of + # the Olm protocol instead of libolm for end-to-end encryption. Using goolm + # is not recommended by the mautrix developers, but they are interested in + # people trying it out in non-production-critical environments and reporting + # any issues they run into. + withGoolm ? false, +}: buildGoModule rec { pname = "mautrix-signal"; @@ -11,12 +23,12 @@ buildGoModule rec { hash = "sha256-KBb/rLYM2ne4VD/bPy/lcXD0avCx3J74e3zDcmg+Dzs="; }; - buildInputs = [ - olm + buildInputs = (lib.optional (!withGoolm) olm) ++ [ # must match the version used in https://github.com/mautrix/signal/tree/main/pkg/libsignalgo # see https://github.com/mautrix/signal/issues/401 libsignal-ffi ]; + tags = lib.optional withGoolm "goolm"; vendorHash = "sha256-DDcz4O3RhV6OVI+qC/LkDW/UsE5jOAn5t/gmILxHx1s="; diff --git a/pkgs/servers/mautrix-whatsapp/default.nix b/pkgs/servers/mautrix-whatsapp/default.nix index d7bad1c9c79b..b66dad00dad5 100644 --- a/pkgs/servers/mautrix-whatsapp/default.nix +++ b/pkgs/servers/mautrix-whatsapp/default.nix @@ -1,4 +1,15 @@ -{ lib, buildGoModule, fetchFromGitHub, olm }: +{ + lib, + buildGoModule, + fetchFromGitHub, + olm, + # This option enables the use of an experimental pure-Go implementation of + # the Olm protocol instead of libolm for end-to-end encryption. Using goolm + # is not recommended by the mautrix developers, but they are interested in + # people trying it out in non-production-critical environments and reporting + # any issues they run into. + withGoolm ? false, +}: buildGoModule rec { pname = "mautrix-whatsapp"; @@ -11,7 +22,8 @@ buildGoModule rec { hash = "sha256-iVILI6OGndnxIVmgNcIwHA64tkv9V3OTH3YtrCyeYx4="; }; - buildInputs = [ olm ]; + buildInputs = lib.optional (!withGoolm) olm; + tags = lib.optional withGoolm "goolm"; vendorHash = "sha256-DpgkSXSLF+U6zIzJ4AF2uTcFWQQYsRgkaUTG9F+bnVk="; From b4709e010fe18ace9aab91e5daf521b31afe559f Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 1 Sep 2024 14:57:34 +0200 Subject: [PATCH 28/29] roundcube: 1.6.8 -> 1.6.9 ChangeLog: https://github.com/roundcube/roundcubemail/releases/tag/1.6.9 (cherry picked from commit abc5eb2565ac60b792fd689b591c48ea8eb82cbe) --- pkgs/servers/roundcube/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/roundcube/default.nix b/pkgs/servers/roundcube/default.nix index 6ec9c8c378f2..3052017dd4aa 100644 --- a/pkgs/servers/roundcube/default.nix +++ b/pkgs/servers/roundcube/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "roundcube"; - version = "1.6.8"; + version = "1.6.9"; src = fetchurl { url = "https://github.com/roundcube/roundcubemail/releases/download/${version}/roundcubemail-${version}-complete.tar.gz"; - sha256 = "sha256-hGi+AgSnNMV0re9L4BV4x9xPq5wv40ADvzQaK9IO/So="; + sha256 = "sha256-thpfXCL4kMKZ6TWqz88IcGdpkNiuv/DWzf8HW/F8708="; }; patches = [ ./0001-Don-t-resolve-symlinks-when-trying-to-find-INSTALL_P.patch ]; From a127e601a5766338506053630285fa357f484861 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 1 Sep 2024 20:05:24 +0300 Subject: [PATCH 29/29] zenmonitor: 2.0.0 -> unstable-2024-05-21 and new src Old src disappeared, diffed old src and new src and it's okay (cherry picked from commit 717f39170506b6d790ddef1fc001b0f72be73707) --- pkgs/os-specific/linux/zenmonitor/default.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/os-specific/linux/zenmonitor/default.nix b/pkgs/os-specific/linux/zenmonitor/default.nix index 8101f47c6a24..bf9ddbc5fec5 100644 --- a/pkgs/os-specific/linux/zenmonitor/default.nix +++ b/pkgs/os-specific/linux/zenmonitor/default.nix @@ -1,14 +1,15 @@ -{ lib, stdenv, fetchFromGitHub, pkg-config, gtk3, wrapGAppsHook3 }: +{ lib, stdenv, fetchFromGitea, pkg-config, gtk3, wrapGAppsHook3 }: stdenv.mkDerivation rec { pname = "zenmonitor"; - version = "2.0.0"; + version = "unstable-2024-05-21"; - src = fetchFromGitHub { - owner = "Ta180m"; + src = fetchFromGitea { + domain = "git.exozy.me"; + owner = "a"; repo = "zenmonitor3"; - rev = "v${version}"; - sha256 = "sha256-2EsuSMXnnMg0e0JD1TXJplsi7sOg9em0qqge2WlC6ro="; + rev = "a09f0b25d33967fd32f3831304be049b008cdabf"; + sha256 = "sha256-5N1Hhv2s0cv4Rujw4wFGHyIy7NyKAFThVvAo+xXqSyk="; }; buildInputs = [ gtk3 ];