diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 36716ae1f460..a16fce73f72d 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -10787,6 +10787,12 @@ githubId = 2037002; name = "Konstantinos"; }; + kotatsuyaki = { + email = "kotatsuyaki@mail.kotatsu.dev"; + github = "kotatsuyaki"; + githubId = 17219127; + name = "kotatsuyaki"; + }; kouyk = { email = "skykinetic@stevenkou.xyz"; github = "kouyk"; diff --git a/nixos/modules/services/desktops/pipewire/wireplumber.nix b/nixos/modules/services/desktops/pipewire/wireplumber.nix index 6ab62eb03c25..c924801bcd8b 100644 --- a/nixos/modules/services/desktops/pipewire/wireplumber.nix +++ b/nixos/modules/services/desktops/pipewire/wireplumber.nix @@ -1,18 +1,40 @@ { config, lib, pkgs, ... }: let - inherit (builtins) attrNames concatMap length; + inherit (builtins) concatMap; inherit (lib) maintainers; - inherit (lib.attrsets) attrByPath filterAttrs; + inherit (lib.attrsets) attrByPath mapAttrsToList; inherit (lib.lists) flatten optional; inherit (lib.modules) mkIf; inherit (lib.options) literalExpression mkOption; - inherit (lib.strings) hasPrefix; - inherit (lib.types) bool listOf package; + inherit (lib.strings) concatStringsSep makeSearchPath; + inherit (lib.types) bool listOf attrsOf package lines; + inherit (lib.path) subpath; pwCfg = config.services.pipewire; cfg = pwCfg.wireplumber; pwUsedForAudio = pwCfg.audio.enable; + + json = pkgs.formats.json { }; + + configSectionsToConfFile = path: value: + pkgs.writeTextDir + path + (concatStringsSep "\n" ( + mapAttrsToList + (section: content: "${section} = " + (builtins.toJSON content)) + value + )); + + mapConfigToFiles = config: + mapAttrsToList + (name: value: configSectionsToConfFile "share/wireplumber/wireplumber.conf.d/${name}.conf" value) + config; + + mapScriptsToFiles = scripts: + mapAttrsToList + (relativePath: value: pkgs.writeTextDir (subpath.join ["share/wireplumber/scripts" relativePath]) value) + scripts; in { meta.maintainers = [ maintainers.k900 ]; @@ -33,6 +55,114 @@ in description = "The WirePlumber derivation to use."; }; + extraConfig = mkOption { + # Two layer attrset is necessary before using JSON, because of the whole + # config file not being a JSON object, but a concatenation of JSON objects + # in sections. + type = attrsOf (attrsOf json.type); + default = { }; + example = literalExpression ''{ + "log-level-debug" = { + "context.properties" = { + # Output Debug log messages as opposed to only the default level (Notice) + "log.level" = "D"; + }; + }; + "wh-1000xm3-ldac-hq" = { + "monitor.bluez.rules" = [ + { + matches = [ + { + # Match any bluetooth device with ids equal to that of a WH-1000XM3 + "device.name" = "~bluez_card.*"; + "device.product.id" = "0x0cd3"; + "device.vendor.id" = "usb:054c"; + } + ]; + actions = { + update-props = { + # Set quality to high quality instead of the default of auto + "bluez5.a2dp.ldac.quality" = "hq"; + }; + }; + } + ]; + }; + }''; + description = '' + Additional configuration for the WirePlumber daemon when run in + single-instance mode (the default in nixpkgs and currently the only + supported way to run WirePlumber configured via `extraConfig`). + + See also: + - [The configuration file][docs-the-conf-file] + - [Modifying configuration][docs-modifying-config] + - [Locations of files][docs-file-locations] + - and the [configuration section][docs-config-section] of the docs in general + + Note that WirePlumber (and PipeWire) use dotted attribute names like + `device.product.id`. These are not nested, but flat objects for WirePlumber/PipeWire, + so to write these in nix expressions, remember to quote them like `"device.product.id"`. + Have a look at the example for this. + + [docs-the-conf-file]: https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/conf_file.html + [docs-modifying-config]: https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/modifying_configuration.html + [docs-file-locations]: https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/locations.html + [docs-config-section]: https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration.html + ''; + }; + + extraScripts = mkOption { + type = attrsOf lines; + default = { }; + example = { + "test/hello-world.lua" = '' + print("Hello, world!") + ''; + }; + description = '' + Additional scripts for WirePlumber to be used by configuration files. + + Every item in this attrset becomes a separate lua file with the path + relative to the `scripts` directory specified in the name of the item. + The scripts get passed to the WirePlumber service via the `XDG_DATA_DIRS` + variable. Scripts specified here are preferred over those shipped with + WirePlumber if they occupy the same relative path. + + For a script to be loaded, it needs to be specified as part of a component, + and that component needs to be required by an active profile (e.g. `main`). + Components can be defined in config files either via `extraConfig` or `configPackages`. + + For the hello-world example, you'd have to add the following `extraConfig`: + ```nix + services.pipewire.wireplumber.extraConfig."99-hello-world" = { + "wireplumber.components" = [ + { + name = "test/hello-world.lua"; + type = "script/lua"; + provides = "custom.hello-world"; + } + ]; + + "wireplumber.profiles" = { + main = { + "custom.hello-world" = "required"; + }; + }; + }; + ``` + + See also: + - [Location of scripts][docs-file-locations-scripts] + - [Components & Profiles][docs-components-profiles] + - [Migration - Loading custom scripts][docs-migration-loading-custom-scripts] + + [docs-file-locations-scripts]: https://pipewire.pages.freedesktop.org/wireplumber/daemon/locations.html#location-of-scripts + [docs-components-profiles]: https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/components_and_profiles.html + [docs-migration-loading-custom-scripts]: https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/migration.html#loading-custom-scripts + ''; + }; + configPackages = mkOption { type = listOf package; default = [ ]; @@ -57,7 +187,7 @@ in extraLv2Packages = mkOption { type = listOf package; - default = []; + default = [ ]; example = literalExpression "[ pkgs.lsp-plugins ]"; description = '' List of packages that provide LV2 plugins in `lib/lv2` that should @@ -96,9 +226,22 @@ in } ''; + extraConfigPkg = pkgs.buildEnv { + name = "wireplumber-extra-config"; + paths = mapConfigToFiles cfg.extraConfig; + pathsToLink = [ "/share/wireplumber/wireplumber.conf.d" ]; + }; + + extraScriptsPkg = pkgs.buildEnv { + name = "wireplumber-extra-scrips"; + paths = mapScriptsToFiles cfg.extraScripts; + pathsToLink = [ "/share/wireplumber/scripts" ]; + }; + configPackages = cfg.configPackages - ++ optional (!pwUsedForAudio) pwNotForAudioConfigPkg - ++ optional pwCfg.systemWide systemwideConfigPkg; + ++ [ extraConfigPkg extraScriptsPkg ] + ++ optional (!pwUsedForAudio) pwNotForAudioConfigPkg + ++ optional pwCfg.systemWide systemwideConfigPkg; configs = pkgs.buildEnv { name = "wireplumber-configs"; @@ -110,7 +253,7 @@ in ( concatMap (p: - attrByPath ["passthru" "requiredLv2Packages"] [] p + attrByPath [ "passthru" "requiredLv2Packages" ] [ ] p ) configPackages ); @@ -127,24 +270,10 @@ in assertion = !config.hardware.bluetooth.hsphfpd.enable; message = "Using WirePlumber conflicts with hsphfpd, as it provides the same functionality. `hardware.bluetooth.hsphfpd.enable` needs be set to false"; } - { - assertion = length - (attrNames - ( - filterAttrs - (name: value: - hasPrefix "wireplumber/" name || name == "wireplumber" - ) - config.environment.etc - )) == 1; - message = "Using `environment.etc.\"wireplumber<...>\"` directly is no longer supported in 24.05. Use `services.pipewire.wireplumber.configPackages` instead."; - } ]; environment.systemPackages = [ cfg.package ]; - environment.etc.wireplumber.source = "${configs}/share/wireplumber"; - systemd.packages = [ cfg.package ]; systemd.services.wireplumber.enable = pwCfg.systemWide; @@ -156,10 +285,16 @@ in systemd.services.wireplumber.environment = mkIf pwCfg.systemWide { # Force WirePlumber to use system dbus. DBUS_SESSION_BUS_ADDRESS = "unix:path=/run/dbus/system_bus_socket"; + + # Make WirePlumber find our config/script files and lv2 plugins required by those + # (but also the configs/scripts shipped with WirePlumber) + XDG_DATA_DIRS = makeSearchPath "share" [ configs cfg.package ]; LV2_PATH = "${lv2Plugins}/lib/lv2"; }; - systemd.user.services.wireplumber.environment.LV2_PATH = - mkIf (!pwCfg.systemWide) "${lv2Plugins}/lib/lv2"; + systemd.user.services.wireplumber.environment = mkIf (!pwCfg.systemWide) { + XDG_DATA_DIRS = makeSearchPath "share" [ configs cfg.package ]; + LV2_PATH = "${lv2Plugins}/lib/lv2"; + }; }; } diff --git a/pkgs/applications/editors/emacs/elisp-packages/manual-packages/xapian-lite/default.nix b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/xapian-lite/default.nix index 1b48776f7560..0f9da8136214 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/manual-packages/xapian-lite/default.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/xapian-lite/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: { meta = { homepage = "https://git.sr.ht/~casouri/xapian-lite"; description = "A minimal Emacs dynamic module for Xapian"; - maintainers = [ ]; + maintainers = [ lib.maintainers.kotatsuyaki ]; license = lib.licenses.gpl3Plus; inherit (emacs.meta) platforms; }; diff --git a/pkgs/applications/window-managers/weston/default.nix b/pkgs/applications/window-managers/weston/default.nix index b4472425324e..a4e36c18368e 100644 --- a/pkgs/applications/window-managers/weston/default.nix +++ b/pkgs/applications/window-managers/weston/default.nix @@ -19,11 +19,11 @@ stdenv.mkDerivation rec { pname = "weston"; - version = "13.0.0"; + version = "13.0.1"; src = fetchurl { url = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${version}/downloads/weston-${version}.tar.xz"; - hash = "sha256-Uv8dSqI5Si5BbIWjOLYnzpf6cdQ+t2L9Sq8UXTb8eVo="; + hash = "sha256-6hVmq09f/Ofp/U96H8pbMMquTVACO/RZITmUCU4Cspo="; }; postPatch = '' diff --git a/pkgs/by-name/cl/clash-verge-rev/package.nix b/pkgs/by-name/cl/clash-verge-rev/package.nix index 95415d03cfec..b262d0f7547e 100644 --- a/pkgs/by-name/cl/clash-verge-rev/package.nix +++ b/pkgs/by-name/cl/clash-verge-rev/package.nix @@ -5,11 +5,11 @@ clash-verge.overrideAttrs (old: rec { pname = "clash-verge-rev"; - version = "1.5.11"; + version = "1.6.0"; src = fetchurl { url = "https://github.com/clash-verge-rev/clash-verge-rev/releases/download/v${version}/clash-verge_${version}_amd64.deb"; - hash = "sha256-FoNWCH4SE7DnKoDMwdUiTnWoFwHSUCAIDQhvgZdgyeU="; + hash = "sha256-wSpWTQ+AuDG3zKocDVatRqVW5yhrOtcbNI+jfMOaXvg="; }; meta = old.meta // (with lib; { diff --git a/pkgs/by-name/di/discordchatexporter-cli/deps.nix b/pkgs/by-name/di/discordchatexporter-cli/deps.nix index c75966de85c3..46c8ca068279 100644 --- a/pkgs/by-name/di/discordchatexporter-cli/deps.nix +++ b/pkgs/by-name/di/discordchatexporter-cli/deps.nix @@ -2,22 +2,21 @@ # Please dont edit it manually, your changes might get overwritten! { fetchNuGet }: [ - (fetchNuGet { pname = "AdvancedStringBuilder"; version = "0.1.0"; sha256 = "1lpv5sggdxza0bmcqmzf5r4i340f0m7nr5073lac18naj5697q5g"; }) - (fetchNuGet { pname = "AngleSharp"; version = "1.0.7"; sha256 = "1f0sb4jknw7f9mhg4f5khk1q257mn97b9qyy017jjljhqyxp449f"; }) - (fetchNuGet { pname = "AsyncKeyedLock"; version = "6.2.4"; sha256 = "1sizwdkj7ysk7nvdrnnnvl67r4smyq45k6ih4si38kxm27sqwhjw"; }) + (fetchNuGet { pname = "AdvancedStringBuilder"; version = "0.1.1"; sha256 = "1qc5b9vlh42yyw00kppkrdz0cji0cxslh97794km9nid8wcv3f54"; }) + (fetchNuGet { pname = "AngleSharp"; version = "1.1.2"; sha256 = "0rfild46lmqhxkfh6nhy7a9m8zzv25lj29riav5j6dmzw07l7wif"; }) + (fetchNuGet { pname = "AsyncKeyedLock"; version = "6.4.2"; sha256 = "1pghspgz9xis139b5v8h2y40gp14x6qfcam27zawq6cp278gnjhi"; }) (fetchNuGet { pname = "CliFx"; version = "2.3.5"; sha256 = "0rlbv93ssw0d8kvhnvrz2f06ka66gz4gbz1va2q135dab99cmrin"; }) - (fetchNuGet { pname = "CSharpier.MsBuild"; version = "0.26.7"; sha256 = "1pa96gci9nwav1g93vxq4mc0h1bjasax9j6giya1ms6rdmqxxlyn"; }) + (fetchNuGet { pname = "CSharpier.MsBuild"; version = "0.28.2"; sha256 = "10c3v3pqv49y5wi0slswfzkwjh9q93diihpmkbfp3r7yjpv6871d"; }) (fetchNuGet { pname = "Deorcify"; version = "1.0.2"; sha256 = "0nwxyrl4rd5x621i2hs5fl3w7fxpm13lkdssxr9fd5042px2gqbm"; }) - (fetchNuGet { pname = "DotnetRuntimeBootstrapper"; version = "2.5.2"; sha256 = "0j3z9wdhn6d4np0cjxv2wb5n9blm9frgbxs1p6zdafbxr98qzb73"; }) + (fetchNuGet { pname = "DotnetRuntimeBootstrapper"; version = "2.5.4"; sha256 = "0pjzyvq0a975m0y7b0k8wsr7mskykv3bzba98xmcc29nsyib2a8h"; }) (fetchNuGet { pname = "Gress"; version = "2.1.1"; sha256 = "1svz1flhyl26h3xjch0acjjinympgf6bhj5vpb188njfih3ip4ck"; }) (fetchNuGet { pname = "JsonExtensions"; version = "1.2.0"; sha256 = "0g54hibabbqqfhxjlnxwv1rxagpali5agvnpymp2w3dk8h6q66xy"; }) - (fetchNuGet { pname = "Polly"; version = "8.2.0"; sha256 = "0gxdi4sf60vpxsb258v592ykkq9a3dq2awayp99yy9djys8bglks"; }) - (fetchNuGet { pname = "Polly.Core"; version = "8.2.0"; sha256 = "00b4jbyiyslqvswy4j2lfw0rl0gq8m4v5fj2asb96i6l224bs7d3"; }) - (fetchNuGet { pname = "RazorBlade"; version = "0.5.0"; sha256 = "11s68yqvpp65yam954f281vw9pmb2c5mxnk0n5j6xv1xylng4x5b"; }) - (fetchNuGet { pname = "Spectre.Console"; version = "0.48.0"; sha256 = "0v3zijim9k5lcmhn0ajlsix0japvx3c20r9b7x7f7gvraa8w3gl6"; }) + (fetchNuGet { pname = "Polly"; version = "8.3.1"; sha256 = "19q7s493sv90879052pxfcbsk3bmxjg5688ya7l12964ddafiwsl"; }) + (fetchNuGet { pname = "Polly.Core"; version = "8.3.1"; sha256 = "15ylkqdcwpr76n0nfzpvd6s00ywjagn1ignyrcz9arwahrxpsm4b"; }) + (fetchNuGet { pname = "RazorBlade"; version = "0.6.0"; sha256 = "11k2j7d7ddb47sj4lkply8v4aqrfxl0b314cv0l4f5syi4ilfa6s"; }) + (fetchNuGet { pname = "Spectre.Console"; version = "0.49.1"; sha256 = "0fhl96p3xjd5k1wwvhs80cp35rrlgnza6mw9vy0knhmf7ji9b95n"; }) (fetchNuGet { pname = "Superpower"; version = "3.0.0"; sha256 = "0p6riay4732j1fahc081dzgs9q4z3n2fpxrin4zfpj6q2226dhz4"; }) - (fetchNuGet { pname = "System.Memory"; version = "4.5.5"; sha256 = "08jsfwimcarfzrhlyvjjid61j02irx6xsklf32rv57x2aaikvx0h"; }) (fetchNuGet { pname = "System.Text.Encoding.CodePages"; version = "8.0.0"; sha256 = "1lgdd78cik4qyvp2fggaa0kzxasw6kc9a6cjqw46siagrm0qnc3y"; }) - (fetchNuGet { pname = "WebMarkupMin.Core"; version = "2.14.0"; sha256 = "0c41zw1bwz6ybxagq5vr26cx7najd17rrdbqjpn8mabynq380ayr"; }) - (fetchNuGet { pname = "YoutubeExplode"; version = "6.3.10"; sha256 = "0b3n8mfxa4l7bfk0c1s7yfw4m1kvnm2r5pqfvr6s20gjq3wzfih5"; }) + (fetchNuGet { pname = "WebMarkupMin.Core"; version = "2.16.0"; sha256 = "0cbkgrrkam76bhygrjzd4nj4mpzpgbnsddfzwry1933rcvjlqh6m"; }) + (fetchNuGet { pname = "YoutubeExplode"; version = "6.3.14"; sha256 = "12w9zz6y7cdw6p2gvr34r4qcl35hh19zn9fm0risrrcs8577msxs"; }) ] diff --git a/pkgs/by-name/di/discordchatexporter-cli/package.nix b/pkgs/by-name/di/discordchatexporter-cli/package.nix index 9f3d709fd166..ed6f4e836aa3 100644 --- a/pkgs/by-name/di/discordchatexporter-cli/package.nix +++ b/pkgs/by-name/di/discordchatexporter-cli/package.nix @@ -8,13 +8,13 @@ buildDotnetModule rec { pname = "discordchatexporter-cli"; - version = "2.42.8"; + version = "2.43"; src = fetchFromGitHub { owner = "tyrrrz"; repo = "discordchatexporter"; rev = version; - hash = "sha256-54NTeIs0a8hd2xKQkAxwfyGwEPUlSSXXvDamGLfa9ls="; + hash = "sha256-FbZ2Kt5lKTINpj0EsJGXWY1aK0qitks16GClBWa/iQ4="; }; projectFile = "DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj"; diff --git a/pkgs/by-name/ho/home-manager/package.nix b/pkgs/by-name/ho/home-manager/package.nix index 1347b1fe93fb..eab2ca256876 100644 --- a/pkgs/by-name/ho/home-manager/package.nix +++ b/pkgs/by-name/ho/home-manager/package.nix @@ -16,14 +16,14 @@ stdenvNoCC.mkDerivation (finalAttrs: { pname = "home-manager"; - version = "unstable-2024-04-23"; + version = "0-unstable-2024-04-29"; src = fetchFromGitHub { name = "home-manager-source"; owner = "nix-community"; repo = "home-manager"; - rev = "33a20182e3164f451b6a4ac2ecadcab5c2c36703"; - hash = "sha256-pHJYZIVFmzPAwyTfcMGJwlfz18nOsS4p0CuDnI1EDL4="; + rev = "9fe79591c1005ce6f93084ae7f7dab0a2891440d"; + hash = "sha256-OzD1P0o46uD3Ix4ZI/g9z3YAeg+4g+W3qctB6bNOReo="; }; nativeBuildInputs = [ diff --git a/pkgs/by-name/la/labwc-tweaks-gtk/package.nix b/pkgs/by-name/la/labwc-tweaks-gtk/package.nix new file mode 100644 index 000000000000..84c71665ea9c --- /dev/null +++ b/pkgs/by-name/la/labwc-tweaks-gtk/package.nix @@ -0,0 +1,54 @@ +{ lib +, stdenv +, fetchFromGitHub +, meson +, ninja +, pkg-config +, gtk3 +, libxml2 +, xkeyboard_config +, wrapGAppsHook +, unstableGitUpdater +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "labwc-tweaks-gtk"; + version = "0-unstable-2024-04-07"; + + src = fetchFromGitHub { + owner = "labwc"; + repo = "labwc-tweaks-gtk"; + rev = "67adbedd610a1b44e7ba667ae72a5c9b07105119"; + hash = "sha256-RGPm+hvyTWxkd3z841Y8ozXrDD1ZgHCZjimyRdRNrCs="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + wrapGAppsHook + ]; + + buildInputs = [ + gtk3 + libxml2 + ]; + + strictDeps = true; + + postPatch = '' + substituteInPlace stack-lang.c --replace /usr/share/X11/xkb ${xkeyboard_config}/share/X11/xkb + substituteInPlace theme.c --replace /usr/share /run/current-system/sw/share + ''; + + passthru.updateScript = unstableGitUpdater { }; + + meta = { + homepage = "https://github.com/labwc/labwc-tweaks-gtk"; + description = "Configuration gui app for labwc; gtk fork"; + mainProgram = "labwc-tweaks"; + license = lib.licenses.gpl2Only; + platforms = lib.platforms.unix; + maintainers = with lib.maintainers; [ AndersonTorres romildo ]; + }; +}) diff --git a/pkgs/by-name/la/labwc-tweaks/package.nix b/pkgs/by-name/la/labwc-tweaks/package.nix index 22189e74be31..c79b59846903 100644 --- a/pkgs/by-name/la/labwc-tweaks/package.nix +++ b/pkgs/by-name/la/labwc-tweaks/package.nix @@ -1,44 +1,42 @@ { lib , stdenv , fetchFromGitHub -, meson -, ninja +, cmake +, perl , pkg-config -, gtk3 -, libxml2 +, qt6 , xkeyboard_config -, wrapGAppsHook3 , unstableGitUpdater }: -stdenv.mkDerivation (finalAttrs: { +stdenv.mkDerivation { pname = "labwc-tweaks"; - version = "unstable-2024-04-02"; + version = "0-unstable-2024-04-27"; src = fetchFromGitHub { owner = "labwc"; repo = "labwc-tweaks"; - rev = "a1a3cfaefd1908de8752d0d6d6b7170b04ee075c"; - hash = "sha256-uvUsoqiQBuNMBQWAxl/tCIvWsEYmZ4dQ31TrznI/XcA="; + rev = "9007079640e0f38c1d69ac94899229354a5c67b2"; + hash = "sha256-klKPHAhJ6fedFojXPfesjs1dG5NJhBZkzynhka5vD8M="; }; nativeBuildInputs = [ - meson - ninja + cmake + perl pkg-config - wrapGAppsHook3 + qt6.qttools + qt6.wrapQtAppsHook ]; buildInputs = [ - gtk3 - libxml2 + qt6.qtbase + qt6.qtwayland ]; strictDeps = true; postPatch = '' - substituteInPlace stack-lang.c --replace /usr/share/X11/xkb ${xkeyboard_config}/share/X11/xkb - substituteInPlace theme.c --replace /usr/share /run/current-system/sw/share + substituteInPlace tweaks-qt/gen-layout-list --replace-fail /usr/share/X11/xkb ${xkeyboard_config}/share/X11/xkb ''; passthru.updateScript = unstableGitUpdater { }; @@ -51,4 +49,4 @@ stdenv.mkDerivation (finalAttrs: { platforms = lib.platforms.unix; maintainers = with lib.maintainers; [ AndersonTorres romildo ]; }; -}) +} diff --git a/pkgs/development/ocaml-modules/mtime/1_x.nix b/pkgs/development/ocaml-modules/mtime/1_x.nix deleted file mode 100644 index e10f2b7d7a3b..000000000000 --- a/pkgs/development/ocaml-modules/mtime/1_x.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg, mtime }: - -lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08") - "mtime is not available for OCaml ${ocaml.version}" - -stdenv.mkDerivation rec { - pname = "ocaml${ocaml.version}-mtime"; - version = "1.4.0"; - - src = fetchurl { - url = "https://erratique.ch/software/mtime/releases/mtime-${version}.tbz"; - sha256 = "VQyYEk8+57Yq8SUuYossaQUHZKqemHDJtf4LK8qjxvc="; - }; - - nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; - buildInputs = [ topkg ]; - - strictDeps = true; - - inherit (topkg) buildPhase installPhase; - inherit (mtime) meta; -} diff --git a/pkgs/development/rocm-modules/6/clr/default.nix b/pkgs/development/rocm-modules/6/clr/default.nix index c5a3f641ff41..dedda194c828 100644 --- a/pkgs/development/rocm-modules/6/clr/default.nix +++ b/pkgs/development/rocm-modules/6/clr/default.nix @@ -111,6 +111,16 @@ in stdenv.mkDerivation (finalAttrs: { url = "https://github.com/ROCm/clr/commit/77c581a3ebd47b5e2908973b70adea66891159ee.patch"; hash = "sha256-auBedbd7rghlKav7A9V6l64J7VmtE9GizIdi5gWj+fs="; }) + (fetchpatch { + name = "extend-hip-isa-compatibility-check.patch"; + url = "https://salsa.debian.org/rocm-team/rocm-hipamd/-/raw/d6d20142c37e1dff820950b16ff8f0523241d935/debian/patches/0026-extend-hip-isa-compatibility-check.patch"; + hash = "sha256-eG0ALZZQLRzD7zJueJFhi2emontmYy6xx8Rsm346nQI="; + }) + (fetchpatch { + name = "improve-rocclr-isa-compatibility-check.patch"; + url = "https://salsa.debian.org/rocm-team/rocm-hipamd/-/raw/d6d20142c37e1dff820950b16ff8f0523241d935/debian/patches/0025-improve-rocclr-isa-compatibility-check.patch"; + hash = "sha256-8eowuRiOAdd9ucKv4Eg9FPU7c6367H3eP3fRAGfXc6Y="; + }) ]; postPatch = '' @@ -124,6 +134,10 @@ in stdenv.mkDerivation (finalAttrs: { substituteInPlace hipamd/src/hip_embed_pch.sh \ --replace "\''$LLVM_DIR/bin/clang" "${clang}/bin/clang" + + # https://lists.debian.org/debian-ai/2024/02/msg00178.html + substituteInPlace rocclr/utils/flags.hpp \ + --replace-fail "HIP_USE_RUNTIME_UNBUNDLER, false" "HIP_USE_RUNTIME_UNBUNDLER, true" ''; postInstall = '' diff --git a/pkgs/development/rocm-modules/6/default.nix b/pkgs/development/rocm-modules/6/default.nix index 567b5bee4f72..e74df33a7bfb 100644 --- a/pkgs/development/rocm-modules/6/default.nix +++ b/pkgs/development/rocm-modules/6/default.nix @@ -194,7 +194,7 @@ in rec { }; rocblas = callPackage ./rocblas { - inherit rocblas rocmUpdateScript rocm-cmake clr tensile; + inherit rocmUpdateScript rocm-cmake clr tensile; inherit (llvm) openmp; stdenv = llvm.rocmClangStdenv; }; diff --git a/pkgs/development/rocm-modules/6/miopen/default.nix b/pkgs/development/rocm-modules/6/miopen/default.nix index 09bcf1042953..0b57cf6592cb 100644 --- a/pkgs/development/rocm-modules/6/miopen/default.nix +++ b/pkgs/development/rocm-modules/6/miopen/default.nix @@ -116,6 +116,11 @@ in stdenv.mkDerivation (finalAttrs: { url = "https://github.com/ROCm/MIOpen/commit/3413d2daaeb44b7d6eadcc03033a5954a118491e.patch"; hash = "sha256-ST4snUcTmmSI1Ogx815KEX9GdMnmubsavDzXCGJkiKs="; }) + (fetchpatch { + name = "Extend-MIOpen-ISA-compatibility.patch"; + url = "https://github.com/GZGavinZhao/MIOpen/commit/416088b534618bd669a765afce59cfc7197064c1.patch"; + hash = "sha256-OwONCA68y8s2GqtQj+OtotXwUXQ5jM8tpeM92iaD4MU="; + }) ]; outputs = [ diff --git a/pkgs/development/rocm-modules/6/rccl/default.nix b/pkgs/development/rocm-modules/6/rccl/default.nix index cdbbd70440c2..a830883b4f82 100644 --- a/pkgs/development/rocm-modules/6/rccl/default.nix +++ b/pkgs/development/rocm-modules/6/rccl/default.nix @@ -65,7 +65,9 @@ stdenv.mkDerivation (finalAttrs: { # Really strange behavior, `#!/usr/bin/env perl` should work... substituteInPlace CMakeLists.txt \ - --replace "\''$ \''${hipify-perl_executable}" "${perl}/bin/perl ${hipify}/bin/hipify-perl" + --replace "\''$ \''${hipify-perl_executable}" "${perl}/bin/perl ${hipify}/bin/hipify-perl" \ + --replace-warn "-parallel-jobs=12" "-parallel-jobs=1" \ + --replace-warn "-parallel-jobs=16" "-parallel-jobs=1" ''; postInstall = lib.optionalString buildTests '' diff --git a/pkgs/development/rocm-modules/6/rocblas/default.nix b/pkgs/development/rocm-modules/6/rocblas/default.nix index 296167bb6f28..f93cceddd68a 100644 --- a/pkgs/development/rocm-modules/6/rocblas/default.nix +++ b/pkgs/development/rocm-modules/6/rocblas/default.nix @@ -1,7 +1,7 @@ -{ rocblas -, lib +{ lib , stdenv , fetchFromGitHub +, fetchpatch , rocmUpdateScript , runCommand , cmake @@ -21,57 +21,26 @@ , buildBenchmarks ? false , tensileLogic ? "asm_full" , tensileCOVersion ? "default" -, tensileSepArch ? true -, tensileLazyLib ? true +# https://github.com/ROCm/Tensile/issues/1757 +# Allows gfx101* users to use rocBLAS normally. +# Turn the below two values to `true` after the fix has been cherry-picked +# into a release. Just backporting that single fix is not enough because it +# depends on some previous commits. +, tensileSepArch ? false +, tensileLazyLib ? false , tensileLibFormat ? "msgpack" -, gpuTargets ? [ "all" ] +# `gfx940`, `gfx941` are not present in this list because they are early +# engineering samples, and all final MI300 hardware are `gfx942`: +# https://github.com/NixOS/nixpkgs/pull/298388#issuecomment-2032791130 +# +# `gfx1012` is not present in this list because the ISA compatibility patches +# would force all `gfx101*` GPUs to run as `gfx1010`, so `gfx101*` GPUs will +# always try to use `gfx1010` code objects, hence building for `gfx1012` is +# useless: https://github.com/NixOS/nixpkgs/pull/298388#issuecomment-2076327152 +, gpuTargets ? [ "gfx900;gfx906:xnack-;gfx908:xnack-;gfx90a:xnack+;gfx90a:xnack-;gfx942;gfx1010;gfx1030;gfx1100;gfx1101;gfx1102" ] }: -let - # NOTE: Update the default GPU targets on every update - gfx80 = (rocblas.override { - gpuTargets = [ - "gfx803" - ]; - }).overrideAttrs { pname = "rocblas-tensile-gfx80"; }; - - gfx90 = (rocblas.override { - gpuTargets = [ - "gfx900" - "gfx906:xnack-" - "gfx908:xnack-" - "gfx90a:xnack+" - "gfx90a:xnack-" - ]; - }).overrideAttrs { pname = "rocblas-tensile-gfx90"; }; - - gfx94 = (rocblas.override { - gpuTargets = [ - "gfx940" - "gfx941" - "gfx942" - ]; - }).overrideAttrs { pname = "rocblas-tensile-gfx94"; }; - - gfx10 = (rocblas.override { - gpuTargets = [ - "gfx1010" - "gfx1012" - "gfx1030" - ]; - }).overrideAttrs { pname = "rocblas-tensile-gfx10"; }; - - gfx11 = (rocblas.override { - gpuTargets = [ - "gfx1100" - "gfx1101" - "gfx1102" - ]; - }).overrideAttrs { pname = "rocblas-tensile-gfx11"; }; - - # Unfortunately, we have to do two full builds, otherwise we get overlapping _fallback.dat files - fallbacks = rocblas.overrideAttrs { pname = "rocblas-tensile-fallbacks"; }; -in stdenv.mkDerivation (finalAttrs: { +stdenv.mkDerivation (finalAttrs: { pname = "rocblas"; version = "6.0.2"; @@ -94,6 +63,8 @@ in stdenv.mkDerivation (finalAttrs: { cmake rocm-cmake clr + ] ++ lib.optionals buildTensile [ + tensile ]; buildInputs = [ @@ -114,80 +85,41 @@ in stdenv.mkDerivation (finalAttrs: { ]; cmakeFlags = [ - "-DCMAKE_C_COMPILER=hipcc" - "-DCMAKE_CXX_COMPILER=hipcc" - "-Dpython=python3" - "-DAMDGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}" - "-DBUILD_WITH_TENSILE=${if buildTensile then "ON" else "OFF"}" - # Manually define CMAKE_INSTALL_