From 72ed33777c6b6bc797b2b3e11ea127424dd95693 Mon Sep 17 00:00:00 2001 From: Hans Christian Schmitz Date: Wed, 28 Feb 2024 17:23:33 +0100 Subject: [PATCH 01/27] nixos/wireplumber: add `extraConfig`/`extraScripts` options Follow-up to #282377. #282377 broke `environment.etc."wireplumber<...>"`, however WirePlumber did not yet have `extraConfig` style options for configuring it ergonomically outside of `environment.etc`. This has caused issues for people who had custom config files for WirePlumber, as having to create a config package just to edit some settings is not as ergonomic or discoverable as with a proper `extraConfig` style option. This commit fixes this issue by adding the `extraConfig` option for additional config file and the `extraScripts` option for additional scripts to be used by config files. With WirePlumber 0.5 it is possible to supply config files and scripts via the `XDG_DATA_DIRS` variable to the WirePlumber daemon. This is how the new options and with this change also the `configPackages` option expose their files to the daemon. This way `environment.etc."wireplumber"` works again for user configuration and breakage of old configs from 23.11 to 24.05 should be limited to those caused by the change in the config format from WirePlumber 0.4 to 0.5. --- .../desktops/pipewire/wireplumber.nix | 183 +++++++++++++++--- 1 file changed, 159 insertions(+), 24 deletions(-) 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"; + }; }; } From f579c74f3c20b7bd667b0acf21b9b0d1a2e94eec Mon Sep 17 00:00:00 2001 From: Gavin Zhao Date: Sat, 23 Mar 2024 11:37:42 -0400 Subject: [PATCH 02/27] rocmPackages: extend rocm-runtime ISA compatibility Signed-off-by: Gavin Zhao --- pkgs/development/rocm-modules/6/clr/default.nix | 6 ++++++ .../rocm-modules/6/rocm-runtime/default.nix | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/pkgs/development/rocm-modules/6/clr/default.nix b/pkgs/development/rocm-modules/6/clr/default.nix index c5a3f641ff41..f2a0ea5c5d44 100644 --- a/pkgs/development/rocm-modules/6/clr/default.nix +++ b/pkgs/development/rocm-modules/6/clr/default.nix @@ -111,6 +111,8 @@ in stdenv.mkDerivation (finalAttrs: { url = "https://github.com/ROCm/clr/commit/77c581a3ebd47b5e2908973b70adea66891159ee.patch"; hash = "sha256-auBedbd7rghlKav7A9V6l64J7VmtE9GizIdi5gWj+fs="; }) + ./0001-Improve-hipamd-compat-check.patch + ./0001-improve-rocclr-isa-compatibility-check.patch ]; postPatch = '' @@ -124,6 +126,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/rocm-runtime/default.nix b/pkgs/development/rocm-modules/6/rocm-runtime/default.nix index 8c3d0cdc976d..f603b708265d 100644 --- a/pkgs/development/rocm-modules/6/rocm-runtime/default.nix +++ b/pkgs/development/rocm-modules/6/rocm-runtime/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , rocmUpdateScript , pkg-config , cmake @@ -42,6 +43,15 @@ stdenv.mkDerivation (finalAttrs: { libxml2 ]; + patches = [ + (fetchpatch { + name = "extend-isa-compatibility-check.patch"; + url = "https://salsa.debian.org/rocm-team/rocr-runtime/-/raw/076026d43bbee7f816b81fea72f984213a9ff961/debian/patches/0004-extend-isa-compatibility-check.patch"; + hash = "sha256-cC030zVGS4kNXwaztv5cwfXfVwOldpLGV9iYgEfPEnY="; + stripLen = 1; + }) + ]; + postPatch = '' patchShebangs image/blit_src/create_hsaco_ascii_file.sh patchShebangs core/runtime/trap_handler/create_trap_handler_header.sh From f1367529e9c92acb1cc1a431dae39440a045c64f Mon Sep 17 00:00:00 2001 From: Gavin Zhao Date: Sat, 23 Mar 2024 11:38:02 -0400 Subject: [PATCH 03/27] rocmPackages: extend clr ISA compatibility Signed-off-by: Gavin Zhao --- pkgs/development/rocm-modules/6/clr/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/development/rocm-modules/6/clr/default.nix b/pkgs/development/rocm-modules/6/clr/default.nix index f2a0ea5c5d44..3c8d20fb393a 100644 --- a/pkgs/development/rocm-modules/6/clr/default.nix +++ b/pkgs/development/rocm-modules/6/clr/default.nix @@ -111,8 +111,16 @@ in stdenv.mkDerivation (finalAttrs: { url = "https://github.com/ROCm/clr/commit/77c581a3ebd47b5e2908973b70adea66891159ee.patch"; hash = "sha256-auBedbd7rghlKav7A9V6l64J7VmtE9GizIdi5gWj+fs="; }) - ./0001-Improve-hipamd-compat-check.patch - ./0001-improve-rocclr-isa-compatibility-check.patch + (fetchpatch { + name = "Improve-hipamd-compat-check.patch"; + url = "https://github.com/GZGavinZhao/clr/commit/f52172a0767f88bf386dc615a3354156d023bdb8.patch"; + hash = "sha256-kbEeJsQgAxbNfBCPB2Jny4z526UAnIxHNQLGsD2iFvg="; + }) + (fetchpatch { + name = "improve-rocclr-isa-compatibility-check.patch"; + url = "https://github.com/GZGavinZhao/clr/commit/2783c57b0f225ad8bc553e2d244837d57d8375bc.patch"; + hash = "sha256-uQMex3gT/LqgQeMETbldpVODWorGLD/YMgjdwHlhd+M="; + }) ]; postPatch = '' From d6adc4b1d41559e3d46c88cd0fd941f9f4f063f3 Mon Sep 17 00:00:00 2001 From: Gavin Zhao Date: Sat, 23 Mar 2024 11:42:10 -0400 Subject: [PATCH 04/27] rocmPackages: extend tensile ISA compatibility Signed-off-by: Gavin Zhao --- .../rocm-modules/6/tensile/default.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pkgs/development/rocm-modules/6/tensile/default.nix b/pkgs/development/rocm-modules/6/tensile/default.nix index af33fd789e84..410264a235ee 100644 --- a/pkgs/development/rocm-modules/6/tensile/default.nix +++ b/pkgs/development/rocm-modules/6/tensile/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , rocmUpdateScript , buildPythonPackage , pytestCheckHook @@ -34,6 +35,14 @@ buildPythonPackage rec { joblib ]; + patches = [ + (fetchpatch { + name = "Extend-Tensile-HIP-ISA-compatibility.patch"; + url = "https://github.com/GZGavinZhao/Tensile/commit/855cb15839849addb0816a6dde45772034a3e41f.patch"; + hash = "sha256-d+fVf/vz+sxGqJ96vuxe0jRMgbC5K6j5FQ5SJ1e3Sl8="; + }) + ]; + doCheck = false; # Too many errors, not sure how to set this up properly nativeCheckInputs = [ @@ -42,9 +51,9 @@ buildPythonPackage rec { rocminfo ]; - preCheck = '' - export ROCM_PATH=${rocminfo} - ''; + env = { + ROCM_PATH = rocminfo; + }; pythonImportsCheck = [ "Tensile" ]; From 41f946176f12adcc897779c530e4abc9bcf396d4 Mon Sep 17 00:00:00 2001 From: Gavin Zhao Date: Sat, 23 Mar 2024 11:44:21 -0400 Subject: [PATCH 05/27] rocmPackages: extend rocblas ISA compatibility Signed-off-by: Gavin Zhao --- .../rocm-modules/6/rocblas/default.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pkgs/development/rocm-modules/6/rocblas/default.nix b/pkgs/development/rocm-modules/6/rocblas/default.nix index 296167bb6f28..c5c399777390 100644 --- a/pkgs/development/rocm-modules/6/rocblas/default.nix +++ b/pkgs/development/rocm-modules/6/rocblas/default.nix @@ -2,6 +2,7 @@ , lib , stdenv , fetchFromGitHub +, fetchpatch , rocmUpdateScript , runCommand , cmake @@ -21,8 +22,13 @@ , 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" ] }: @@ -141,6 +147,14 @@ in stdenv.mkDerivation (finalAttrs: { "-DCMAKE_CXX_FLAGS=-I${amd-blis}/include/blis" ]; + patches = [ + (fetchpatch { + name = "Extend-rocBLAS-HIP-ISA-compatibility.patch"; + url = "https://github.com/GZGavinZhao/rocBLAS/commit/89b75ff9cc731f71f370fad90517395e117b03bb.patch"; + hash = "sha256-W/ohOOyNCcYYLOiQlPzsrTlNtCBdJpKVxO8s+4G7sjo="; + }) + ]; + postPatch = lib.optionalString (finalAttrs.pname != "rocblas") '' # Return early and install tensile files manually substituteInPlace library/src/CMakeLists.txt \ From e24032988f4641951e6ec635e8b7062a5dcff01f Mon Sep 17 00:00:00 2001 From: Gavin Zhao Date: Sat, 23 Mar 2024 11:54:06 -0400 Subject: [PATCH 06/27] rocmPackages: extend miopen ISA compatibility Signed-off-by: Gavin Zhao --- pkgs/development/rocm-modules/6/miopen/default.nix | 5 +++++ 1 file changed, 5 insertions(+) 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 = [ From e15c44956b5cd9d8001096cba220afdb037f2e03 Mon Sep 17 00:00:00 2001 From: Gavin Zhao Date: Sun, 24 Mar 2024 23:58:41 -0400 Subject: [PATCH 07/27] rocmPackages: respect NIX_BUILD_CORES and cleanup CMake options in rocblas Signed-off-by: Gavin Zhao --- .../rocm-modules/6/rocblas/default.nix | 51 ++++++++++--------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/pkgs/development/rocm-modules/6/rocblas/default.nix b/pkgs/development/rocm-modules/6/rocblas/default.nix index c5c399777390..ff5b57431b8f 100644 --- a/pkgs/development/rocm-modules/6/rocblas/default.nix +++ b/pkgs/development/rocm-modules/6/rocblas/default.nix @@ -120,31 +120,31 @@ 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_ - # See: https://github.com/NixOS/nixpkgs/pull/197838 - "-DCMAKE_INSTALL_BINDIR=bin" - "-DCMAKE_INSTALL_LIBDIR=lib" - "-DCMAKE_INSTALL_INCLUDEDIR=include" + (lib.cmakeFeature "CMAKE_C_COMPILER" "hipcc") + (lib.cmakeFeature "CMAKE_CXX_COMPILER" "hipcc") + (lib.cmakeFeature "python" "python3") + (lib.cmakeFeature "AMDGPU_TARGETS" (lib.concatStringsSep ";" gpuTargets)) + (lib.cmakeBool "BUILD_WITH_TENSILE" buildTensile) + (lib.cmakeBool "ROCM_SYMLINK_LIBS" false) + # # Manually define CMAKE_INSTALL_ + # # See: https://github.com/NixOS/nixpkgs/pull/197838 + # "-DCMAKE_INSTALL_BINDIR=bin" + # "-DCMAKE_INSTALL_LIBDIR=lib" + # "-DCMAKE_INSTALL_INCLUDEDIR=include" + (lib.cmakeBool "BUILD_CLIENTS_TESTS" buildTests) + (lib.cmakeBool "BUILD_CLIENTS_BENCHMARKS" buildBenchmarks) ] ++ lib.optionals buildTensile [ - "-DVIRTUALENV_HOME_DIR=/build/source/tensile" - "-DTensile_TEST_LOCAL_PATH=/build/source/tensile" - "-DTensile_ROOT=/build/source/tensile/${python3.sitePackages}/Tensile" - "-DTensile_LOGIC=${tensileLogic}" - "-DTensile_CODE_OBJECT_VERSION=${tensileCOVersion}" - "-DTensile_SEPARATE_ARCHITECTURES=${if tensileSepArch then "ON" else "OFF"}" - "-DTensile_LAZY_LIBRARY_LOADING=${if tensileLazyLib then "ON" else "OFF"}" - "-DTensile_LIBRARY_FORMAT=${tensileLibFormat}" - ] ++ lib.optionals buildTests [ - "-DBUILD_CLIENTS_TESTS=ON" - ] ++ lib.optionals buildBenchmarks [ - "-DBUILD_CLIENTS_BENCHMARKS=ON" + (lib.cmakeFeature "VIRTUALENV_HOME_DIR" "/build/source/tensile") + (lib.cmakeFeature "Tensile_TEST_LOCAL_PATH" "/build/source/tensile") + (lib.cmakeFeature "Tensile_ROOT" "/build/source/tensile/${python3.sitePackages}/Tensile") + (lib.cmakeFeature "Tensile_LOGIC" tensileLogic) + (lib.cmakeFeature "Tensile_CODE_OBJECT_VERSION" tensileCOVersion) + (lib.cmakeBool "Tensile_SEPARATE_ARCHITECTURES" tensileSepArch) + (lib.cmakeBool "Tensile_LAZY_LIBRARY_LOADING" tensileLazyLib) + (lib.cmakeFeature "Tensile_LIBRARY_FORMAT" tensileLibFormat) + (lib.cmakeBool "Tensile_PRINT_DEBUG" true) ] ++ lib.optionals (buildTests || buildBenchmarks) [ - "-DCMAKE_CXX_FLAGS=-I${amd-blis}/include/blis" + (lib.cmakeFeature "CMAKE_CXX_FLAGS" "-I${amd-blis}/include/blis") ]; patches = [ @@ -155,7 +155,10 @@ in stdenv.mkDerivation (finalAttrs: { }) ]; - postPatch = lib.optionalString (finalAttrs.pname != "rocblas") '' + postPatch = '' + substituteInPlace cmake/build-options.cmake \ + --replace-fail 'Tensile_CPU_THREADS ""' 'Tensile_CPU_THREADS "$ENV{NIX_BUILD_CORES}"' + '' + lib.optionalString (finalAttrs.pname != "rocblas") '' # Return early and install tensile files manually substituteInPlace library/src/CMakeLists.txt \ --replace "set_target_properties( TensileHost PROPERTIES OUTPUT_NAME" "return()''\nset_target_properties( TensileHost PROPERTIES OUTPUT_NAME" From f4f68f4f6bb8b7c41f4d8fa68f44e0824b068a67 Mon Sep 17 00:00:00 2001 From: Gavin Zhao Date: Thu, 28 Mar 2024 11:16:00 -0400 Subject: [PATCH 08/27] rocmPackages: cleanup and remove double building for rocblas Signed-off-by: Gavin Zhao --- .../rocm-modules/6/rocblas/default.nix | 105 +----------------- .../rocm-modules/6/tensile/default.nix | 5 + 2 files changed, 10 insertions(+), 100 deletions(-) diff --git a/pkgs/development/rocm-modules/6/rocblas/default.nix b/pkgs/development/rocm-modules/6/rocblas/default.nix index ff5b57431b8f..e6b7ed34717c 100644 --- a/pkgs/development/rocm-modules/6/rocblas/default.nix +++ b/pkgs/development/rocm-modules/6/rocblas/default.nix @@ -33,51 +33,7 @@ , gpuTargets ? [ "all" ] }: -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"; @@ -100,6 +56,7 @@ in stdenv.mkDerivation (finalAttrs: { cmake rocm-cmake clr + tensile ]; buildInputs = [ @@ -126,17 +83,11 @@ in stdenv.mkDerivation (finalAttrs: { (lib.cmakeFeature "AMDGPU_TARGETS" (lib.concatStringsSep ";" gpuTargets)) (lib.cmakeBool "BUILD_WITH_TENSILE" buildTensile) (lib.cmakeBool "ROCM_SYMLINK_LIBS" false) - # # Manually define CMAKE_INSTALL_ - # # See: https://github.com/NixOS/nixpkgs/pull/197838 - # "-DCMAKE_INSTALL_BINDIR=bin" - # "-DCMAKE_INSTALL_LIBDIR=lib" - # "-DCMAKE_INSTALL_INCLUDEDIR=include" + (lib.cmakeFeature "ROCBLAS_TENSILE_LIBRARY_DIR" "lib/rocblas") (lib.cmakeBool "BUILD_CLIENTS_TESTS" buildTests) (lib.cmakeBool "BUILD_CLIENTS_BENCHMARKS" buildBenchmarks) ] ++ lib.optionals buildTensile [ - (lib.cmakeFeature "VIRTUALENV_HOME_DIR" "/build/source/tensile") - (lib.cmakeFeature "Tensile_TEST_LOCAL_PATH" "/build/source/tensile") - (lib.cmakeFeature "Tensile_ROOT" "/build/source/tensile/${python3.sitePackages}/Tensile") + (lib.cmakeBool "BUILD_WITH_PIP" false) (lib.cmakeFeature "Tensile_LOGIC" tensileLogic) (lib.cmakeFeature "Tensile_CODE_OBJECT_VERSION" tensileCOVersion) (lib.cmakeBool "Tensile_SEPARATE_ARCHITECTURES" tensileSepArch) @@ -155,56 +106,10 @@ in stdenv.mkDerivation (finalAttrs: { }) ]; + # Pass $NIX_BUILD_CORES to Tensile postPatch = '' substituteInPlace cmake/build-options.cmake \ --replace-fail 'Tensile_CPU_THREADS ""' 'Tensile_CPU_THREADS "$ENV{NIX_BUILD_CORES}"' - '' + lib.optionalString (finalAttrs.pname != "rocblas") '' - # Return early and install tensile files manually - substituteInPlace library/src/CMakeLists.txt \ - --replace "set_target_properties( TensileHost PROPERTIES OUTPUT_NAME" "return()''\nset_target_properties( TensileHost PROPERTIES OUTPUT_NAME" - '' + lib.optionalString (buildTensile && finalAttrs.pname == "rocblas") '' - # Link the prebuilt Tensile files - mkdir -p build/Tensile/library - - for path in ${gfx80} ${gfx90} ${gfx94} ${gfx10} ${gfx11} ${fallbacks}; do - ln -s $path/lib/rocblas/library/* build/Tensile/library - done - - unlink build/Tensile/library/TensileManifest.txt - '' + lib.optionalString buildTensile '' - # Tensile REALLY wants to write to the nix directory if we include it normally - cp -a ${tensile} tensile - chmod +w -R tensile - - # Rewrap Tensile - substituteInPlace tensile/bin/{.t*,.T*,*} \ - --replace "${tensile}" "/build/source/tensile" - - substituteInPlace CMakeLists.txt \ - --replace "include(virtualenv)" "" \ - --replace "virtualenv_install(\''${Tensile_TEST_LOCAL_PATH})" "" - ''; - - postInstall = lib.optionalString (finalAttrs.pname == "rocblas") '' - ln -sf ${fallbacks}/lib/rocblas/library/TensileManifest.txt $out/lib/rocblas/library - '' + lib.optionalString (finalAttrs.pname != "rocblas") '' - mkdir -p $out/lib/rocblas/library - rm -rf $out/share - '' + lib.optionalString (finalAttrs.pname != "rocblas" && finalAttrs.pname != "rocblas-tensile-fallbacks") '' - rm Tensile/library/{TensileManifest.txt,*_fallback.dat} - mv Tensile/library/* $out/lib/rocblas/library - '' + lib.optionalString (finalAttrs.pname == "rocblas-tensile-fallbacks") '' - mv Tensile/library/{TensileManifest.txt,*_fallback.dat} $out/lib/rocblas/library - '' + lib.optionalString buildTests '' - mkdir -p $test/bin - cp -a $out/bin/* $test/bin - rm $test/bin/*-bench || true - '' + lib.optionalString buildBenchmarks '' - mkdir -p $benchmark/bin - cp -a $out/bin/* $benchmark/bin - rm $benchmark/bin/*-test || true - '' + lib.optionalString (buildTests || buildBenchmarks ) '' - rm -rf $out/bin ''; passthru.updateScript = rocmUpdateScript { diff --git a/pkgs/development/rocm-modules/6/tensile/default.nix b/pkgs/development/rocm-modules/6/tensile/default.nix index 410264a235ee..6df403249e9a 100644 --- a/pkgs/development/rocm-modules/6/tensile/default.nix +++ b/pkgs/development/rocm-modules/6/tensile/default.nix @@ -41,6 +41,11 @@ buildPythonPackage rec { url = "https://github.com/GZGavinZhao/Tensile/commit/855cb15839849addb0816a6dde45772034a3e41f.patch"; hash = "sha256-d+fVf/vz+sxGqJ96vuxe0jRMgbC5K6j5FQ5SJ1e3Sl8="; }) + (fetchpatch { + name = "Don-t-copy-file-twice-in-copyStaticFiles.patch"; + url = "https://github.com/GZGavinZhao/Tensile/commit/9e14d5a00a096bddac605910a0e4dfb4c35bb0d5.patch"; + hash = "sha256-gOzjJyD1K056OFQ+hK5nbUeBhxLTIgQLoT+0K12SypI="; + }) ]; doCheck = false; # Too many errors, not sure how to set this up properly From d276a67466c27e39ba4d343d6f54006d09446a31 Mon Sep 17 00:00:00 2001 From: Gavin Zhao Date: Thu, 28 Mar 2024 11:45:58 -0400 Subject: [PATCH 09/27] rocmPackages: don't build arches in parallel in rccl Signed-off-by: Gavin Zhao --- pkgs/development/rocm-modules/6/rccl/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 '' From 73e919d8b76ea437b77512e819ed9c3711193775 Mon Sep 17 00:00:00 2001 From: Gavin Zhao Date: Fri, 29 Mar 2024 10:48:59 -0400 Subject: [PATCH 10/27] rocmPackages: install headers correctly in rocblas Signed-off-by: Gavin Zhao --- pkgs/development/rocm-modules/6/rocblas/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/rocm-modules/6/rocblas/default.nix b/pkgs/development/rocm-modules/6/rocblas/default.nix index e6b7ed34717c..f1c709dc79fc 100644 --- a/pkgs/development/rocm-modules/6/rocblas/default.nix +++ b/pkgs/development/rocm-modules/6/rocblas/default.nix @@ -86,6 +86,8 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeFeature "ROCBLAS_TENSILE_LIBRARY_DIR" "lib/rocblas") (lib.cmakeBool "BUILD_CLIENTS_TESTS" buildTests) (lib.cmakeBool "BUILD_CLIENTS_BENCHMARKS" buildBenchmarks) + # rocblas header files are not installed unless we set this + (lib.cmakeFeature "CMAKE_INSTALL_INCLUDEDIR" "include") ] ++ lib.optionals buildTensile [ (lib.cmakeBool "BUILD_WITH_PIP" false) (lib.cmakeFeature "Tensile_LOGIC" tensileLogic) From 7ff6984fd3e0a063b22c00ca56a7bfe502326cba Mon Sep 17 00:00:00 2001 From: Gavin Zhao Date: Wed, 3 Apr 2024 01:05:46 -0400 Subject: [PATCH 11/27] rocmPackages: fix dependencies in rocblas Signed-off-by: Gavin Zhao --- pkgs/development/rocm-modules/6/rocblas/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/rocm-modules/6/rocblas/default.nix b/pkgs/development/rocm-modules/6/rocblas/default.nix index f1c709dc79fc..9dfa8636f120 100644 --- a/pkgs/development/rocm-modules/6/rocblas/default.nix +++ b/pkgs/development/rocm-modules/6/rocblas/default.nix @@ -1,5 +1,4 @@ -{ rocblas -, lib +{ lib , stdenv , fetchFromGitHub , fetchpatch @@ -56,6 +55,7 @@ stdenv.mkDerivation (finalAttrs: { cmake rocm-cmake clr + ] ++ lib.optionals buildTensile [ tensile ]; From e30bae6a69fc77dd5c573d42fc7c8e0490d0b63c Mon Sep 17 00:00:00 2001 From: Gavin Zhao Date: Wed, 3 Apr 2024 01:23:05 -0400 Subject: [PATCH 12/27] rocmPackages: fetch patches from Debian if possible Signed-off-by: Gavin Zhao --- pkgs/development/rocm-modules/6/clr/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/rocm-modules/6/clr/default.nix b/pkgs/development/rocm-modules/6/clr/default.nix index 3c8d20fb393a..dedda194c828 100644 --- a/pkgs/development/rocm-modules/6/clr/default.nix +++ b/pkgs/development/rocm-modules/6/clr/default.nix @@ -112,14 +112,14 @@ in stdenv.mkDerivation (finalAttrs: { hash = "sha256-auBedbd7rghlKav7A9V6l64J7VmtE9GizIdi5gWj+fs="; }) (fetchpatch { - name = "Improve-hipamd-compat-check.patch"; - url = "https://github.com/GZGavinZhao/clr/commit/f52172a0767f88bf386dc615a3354156d023bdb8.patch"; - hash = "sha256-kbEeJsQgAxbNfBCPB2Jny4z526UAnIxHNQLGsD2iFvg="; + 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://github.com/GZGavinZhao/clr/commit/2783c57b0f225ad8bc553e2d244837d57d8375bc.patch"; - hash = "sha256-uQMex3gT/LqgQeMETbldpVODWorGLD/YMgjdwHlhd+M="; + url = "https://salsa.debian.org/rocm-team/rocm-hipamd/-/raw/d6d20142c37e1dff820950b16ff8f0523241d935/debian/patches/0025-improve-rocclr-isa-compatibility-check.patch"; + hash = "sha256-8eowuRiOAdd9ucKv4Eg9FPU7c6367H3eP3fRAGfXc6Y="; }) ]; From 45b3242ab43885004198f9ae0bd79db4b7d97abe Mon Sep 17 00:00:00 2001 From: Gavin Zhao Date: Wed, 3 Apr 2024 01:28:19 -0400 Subject: [PATCH 13/27] rocmPackages: add isa conversion patch in rocprim Signed-off-by: Gavin Zhao --- pkgs/development/rocm-modules/6/rocprim/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/rocm-modules/6/rocprim/default.nix b/pkgs/development/rocm-modules/6/rocprim/default.nix index e9996cae61e7..3e8525655141 100644 --- a/pkgs/development/rocm-modules/6/rocprim/default.nix +++ b/pkgs/development/rocm-modules/6/rocprim/default.nix @@ -1,4 +1,5 @@ { lib +, fetchpatch , stdenv , fetchFromGitHub , rocmUpdateScript @@ -31,6 +32,14 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-nWvq26qRPZ6Au1rc5cR74TKArcdUFg7O9djFi8SvMeM="; }; + patches = [ + (fetchpatch { + name = "arch-conversion-marco.patch"; + url = "https://salsa.debian.org/rocm-team/rocprim/-/raw/70c8aaee3cf545d92685f4ed9bf8f41e3d4d570c/debian/patches/arch-conversion-macro.patch"; + hash = "sha256-oXdmbCArOB5bKE8ozDFrSh4opbO+c4VI6PNhljeUSms="; + }) + ]; + nativeBuildInputs = [ cmake rocm-cmake From 7bbde1756d70eacb2f3ba5ec8e8a34de28e801b2 Mon Sep 17 00:00:00 2001 From: Gavin Zhao Date: Wed, 3 Apr 2024 02:13:22 -0400 Subject: [PATCH 14/27] rocmPackages: no need to pass rocblas to itself Signed-off-by: Gavin Zhao --- pkgs/development/rocm-modules/6/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }; From 32b9f37d57826364db0bc579ee75fa82af1fd623 Mon Sep 17 00:00:00 2001 From: Gavin Zhao Date: Wed, 24 Apr 2024 22:22:11 -0400 Subject: [PATCH 15/27] rocmPackages.rocblas: do not build for gfx1012, gfx940, and gfx 941 GPU targets Signed-off-by: Gavin Zhao --- pkgs/development/rocm-modules/6/rocblas/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/rocm-modules/6/rocblas/default.nix b/pkgs/development/rocm-modules/6/rocblas/default.nix index 9dfa8636f120..6bfb76532263 100644 --- a/pkgs/development/rocm-modules/6/rocblas/default.nix +++ b/pkgs/development/rocm-modules/6/rocblas/default.nix @@ -29,7 +29,7 @@ , tensileSepArch ? false , tensileLazyLib ? false , tensileLibFormat ? "msgpack" -, gpuTargets ? [ "all" ] +, gpuTargets ? [ "gfx900;gfx906:xnack-;gfx908:xnack-;gfx90a:xnack+;gfx90a:xnack-;gfx942;gfx1010;gfx1030;gfx1100;gfx1101;gfx1102" ] }: stdenv.mkDerivation (finalAttrs: { From c3848d59c9506ce6e54e6c1d52670a6191e427ea Mon Sep 17 00:00:00 2001 From: Gavin Zhao Date: Thu, 25 Apr 2024 11:45:45 -0400 Subject: [PATCH 16/27] rocmPackages.rocblas: add comments about why some GPU archs are not built Signed-off-by: Gavin Zhao --- pkgs/development/rocm-modules/6/rocblas/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/rocm-modules/6/rocblas/default.nix b/pkgs/development/rocm-modules/6/rocblas/default.nix index 6bfb76532263..f93cceddd68a 100644 --- a/pkgs/development/rocm-modules/6/rocblas/default.nix +++ b/pkgs/development/rocm-modules/6/rocblas/default.nix @@ -29,6 +29,14 @@ , tensileSepArch ? false , tensileLazyLib ? false , tensileLibFormat ? "msgpack" +# `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" ] }: From 3bcba25270188c1c19131f682d650cbd56511d81 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Fri, 26 Apr 2024 08:38:27 +0200 Subject: [PATCH 17/27] alock: unstable-2017-07-20 -> 2.5.1 --- pkgs/misc/screensavers/alock/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/misc/screensavers/alock/default.nix b/pkgs/misc/screensavers/alock/default.nix index 65a04839096f..bbe0c75350f3 100644 --- a/pkgs/misc/screensavers/alock/default.nix +++ b/pkgs/misc/screensavers/alock/default.nix @@ -3,13 +3,13 @@ stdenv.mkDerivation rec { pname = "alock"; - version = "unstable-2017-07-20"; + version = "2.5.1"; src = fetchFromGitHub { owner = "Arkq"; repo = "alock"; - rev = "2035e1d4a2293432f5503e82d10f899232eb0f38"; - sha256 = "sha256-Rm00ytSfEv5Wljz4f/4bbyrK3sCV/oRUwz4DKx0pya8="; + rev = "refs/tags/v${version}"; + hash = "sha256-xfPhsXZrTlEqea75SvacDfjM9o21MTudrqfNN9xtdcg="; }; PAM_DEFAULT_SERVICE = "login"; From d80c38e75369b2d54599f3c55a3c59a400d32446 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Fri, 26 Apr 2024 08:44:05 +0200 Subject: [PATCH 18/27] alock: add update script --- pkgs/misc/screensavers/alock/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/misc/screensavers/alock/default.nix b/pkgs/misc/screensavers/alock/default.nix index bbe0c75350f3..4fcee6fa9b10 100644 --- a/pkgs/misc/screensavers/alock/default.nix +++ b/pkgs/misc/screensavers/alock/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook +{ lib, stdenv, fetchFromGitHub, gitUpdater, pkg-config, autoreconfHook , libX11, pam, libgcrypt, libXrender, imlib2 }: stdenv.mkDerivation rec { @@ -27,6 +27,11 @@ stdenv.mkDerivation rec { pam libgcrypt libXrender imlib2 ]; + passthru.updateScript = gitUpdater { + rev-prefix = "v"; + ignoredVersions = "^[^.]+$"; # ignore versions without a dot + }; + meta = with lib; { homepage = "https://github.com/Arkq/alock"; description = "Simple screen lock application for X server"; From 505d953e93ee78d08327360e81355041e9485e94 Mon Sep 17 00:00:00 2001 From: kotatsuyaki Date: Sun, 28 Apr 2024 10:05:58 +0800 Subject: [PATCH 19/27] maintainers: add kotatsuyaki --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index ddeca615d702..82f60cafb157 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -10804,6 +10804,12 @@ githubId = 2037002; name = "Konstantinos"; }; + kotatsuyaki = { + email = "kotatsuyaki@mail.kotatsu.dev"; + github = "kotatsuyaki"; + githubId = 17219127; + name = "kotatsuyaki"; + }; kouyk = { email = "skykinetic@stevenkou.xyz"; github = "kouyk"; From 3c0122a42a73f8ff511c661159f04ebef1759073 Mon Sep 17 00:00:00 2001 From: kotatsuyaki Date: Sun, 28 Apr 2024 10:06:15 +0800 Subject: [PATCH 20/27] emacsPackages.xapian-lite: add kotatsuyaki to maintainers --- .../elisp-packages/manual-packages/xapian-lite/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }; From 709442b1b26b495f2a80b1075aa6027aaf985f69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Thu, 25 Apr 2024 18:44:06 -0300 Subject: [PATCH 21/27] labwc-tweaks: unstable-2024-04-02 -> 0-unstable-2024-04-27 - update version - upstream migrated to qt --- pkgs/by-name/la/labwc-tweaks/package.nix | 32 +++++++++++------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/pkgs/by-name/la/labwc-tweaks/package.nix b/pkgs/by-name/la/labwc-tweaks/package.nix index fee334974a27..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 -, wrapGAppsHook , 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 - wrapGAppsHook + 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 ]; }; -}) +} From 3f03d0a43c0857c6b3b7f45777df9441d204f573 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Sun, 28 Apr 2024 08:00:53 -0300 Subject: [PATCH 22/27] labwc-tweaks-gtk: init at 0-unstable-2024-04-07 --- pkgs/by-name/la/labwc-tweaks-gtk/package.nix | 54 ++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 pkgs/by-name/la/labwc-tweaks-gtk/package.nix 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 ]; + }; +}) From d6ffebb44a61482e26d1d5f28f89c1cdf82be5e2 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sun, 28 Apr 2024 20:18:48 +0200 Subject: [PATCH 23/27] weston: 13.0.0 -> 13.0.1 --- pkgs/applications/window-managers/weston/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 = '' From 14f2acd171fb25f0996c5b7d7d14de4b49de15ee Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 28 Apr 2024 18:42:02 +0000 Subject: [PATCH 24/27] clash-verge-rev: 1.5.11 -> 1.6.0 --- pkgs/by-name/cl/clash-verge-rev/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; { From 5ccd11ee4faa6827edeeb64ce1170fc657d443ac Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 29 Apr 2024 00:45:20 +0000 Subject: [PATCH 25/27] home-manager: unstable-2024-04-23 -> 0-unstable-2024-04-29 --- pkgs/by-name/ho/home-manager/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 = [ From 6d051c4cb52ac2d5e4c0c7d7b5447f58d212d12d Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 29 Apr 2024 02:09:44 +0000 Subject: [PATCH 26/27] discordchatexporter-cli: 2.42.8 -> 2.43 --- .../di/discordchatexporter-cli/deps.nix | 23 +++++++++---------- .../di/discordchatexporter-cli/package.nix | 4 ++-- 2 files changed, 13 insertions(+), 14 deletions(-) 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"; From 35092bf19cb71ea0609f763b6d425943b0ec92c2 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 22 Apr 2024 08:03:23 +0200 Subject: [PATCH 27/27] ocamlPackages.mtime_1: remove --- pkgs/development/ocaml-modules/mtime/1_x.nix | 22 -------------------- pkgs/top-level/ocaml-packages.nix | 3 +-- 2 files changed, 1 insertion(+), 24 deletions(-) delete mode 100644 pkgs/development/ocaml-modules/mtime/1_x.nix 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/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 932ff6505b78..b5f51c68d1d8 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1184,7 +1184,6 @@ let msat = callPackage ../development/ocaml-modules/msat { }; - mtime_1 = callPackage ../development/ocaml-modules/mtime/1_x.nix { }; mtime = callPackage ../development/ocaml-modules/mtime { }; multipart-form-data = callPackage ../development/ocaml-modules/multipart-form-data { }; @@ -1385,7 +1384,7 @@ let inherit (pkgs) unzip; }; - opium = callPackage ../development/ocaml-modules/opium { mtime = mtime_1; }; + opium = callPackage ../development/ocaml-modules/opium { }; opti = callPackage ../development/ocaml-modules/opti { };