From f4841c2e68ab892760a610fa61508ed93410cec9 Mon Sep 17 00:00:00 2001 From: qubitnano <146656568+qubitnano@users.noreply.github.com> Date: Sat, 28 Sep 2024 12:06:39 -0400 Subject: [PATCH 01/42] sdl_gamecontrollerdb: init at 0-unstable-2025-06-14 --- .../sd/sdl_gamecontrollerdb/package.nix | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 pkgs/by-name/sd/sdl_gamecontrollerdb/package.nix diff --git a/pkgs/by-name/sd/sdl_gamecontrollerdb/package.nix b/pkgs/by-name/sd/sdl_gamecontrollerdb/package.nix new file mode 100644 index 000000000000..e3b59013fcec --- /dev/null +++ b/pkgs/by-name/sd/sdl_gamecontrollerdb/package.nix @@ -0,0 +1,40 @@ +{ + lib, + stdenvNoCC, + fetchFromGitHub, + unstableGitUpdater, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "sdl_gamecontrollerdb"; + version = "0-unstable-2025-06-14"; + + src = fetchFromGitHub { + owner = "mdqinc"; + repo = "SDL_GameControllerDB"; + rev = "79b8ea1035256740c22fb1686fa0c77d201fe45f"; + hash = "sha256-pFzIvTlcQW9wGiuMcH6chm6kzE2LLcPgPiSgWbDvgUk="; + }; + + dontBuild = true; + dontConfigure = true; + + installPhase = '' + runHook preInstall + + install -Dm644 gamecontrollerdb.txt -t $out/share + install -Dm644 LICENSE -t $out/share/licenses/sdl_gamecontrollerdb + + runHook postInstall + ''; + + passthru.updateScript = unstableGitUpdater { }; + + meta = { + description = "Community sourced database of game controller mappings to be used with SDL2 and SDL3 Game Controller functionality"; + homepage = "https://github.com/mdqinc/SDL_GameControllerDB"; + license = lib.licenses.zlib; + maintainers = with lib.maintainers; [ qubitnano ]; + platforms = lib.platforms.all; + }; +}) From 7628af124b7764fd7ec9c877e6b8c41da97d0f91 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Sun, 22 Jun 2025 22:38:05 +0200 Subject: [PATCH 02/42] build-support/php: DRY improvements --- .../builders/v2/hooks/php-script-utils.bash | 64 ++++++++----------- 1 file changed, 26 insertions(+), 38 deletions(-) diff --git a/pkgs/build-support/php/builders/v2/hooks/php-script-utils.bash b/pkgs/build-support/php/builders/v2/hooks/php-script-utils.bash index 6061f06d7016..9c9651b6bd3e 100644 --- a/pkgs/build-support/php/builders/v2/hooks/php-script-utils.bash +++ b/pkgs/build-support/php/builders/v2/hooks/php-script-utils.bash @@ -18,28 +18,23 @@ setComposerEnvVariables() { checkComposerValidate() { command="composer validate --strict --quiet --no-interaction --no-check-all --no-check-lock" if ! $command; then + echo + echo -e "\e[31mERROR: composer files validation failed\e[0m" + echo + echo -e '\e[31mThe validation of the composer.json failed.\e[0m' + echo -e '\e[31mMake sure that the file composer.json is valid.\e[0m' + echo + echo -e '\e[31mTo address the issue efficiently, follow one of these steps:\e[0m' + echo -e '\e[31m 1. File an issue in the project'\''s issue tracker with detailed information, and apply any available remote patches as a temporary solution '\('with fetchpatch'\)'.\e[0m' + echo -e '\e[31m 2. If an immediate fix is needed or if reporting upstream isn'\''t suitable, develop a temporary local patch.\e[0m' + echo + if [[ "${composerStrictValidation}" == "1" ]]; then echo - echo -e "\e[31mERROR: composer files validation failed\e[0m" - echo - echo -e '\e[31mThe validation of the composer.json failed.\e[0m' - echo -e '\e[31mMake sure that the file composer.json is valid.\e[0m' - echo - echo -e '\e[31mTo address the issue efficiently, follow one of these steps:\e[0m' - echo -e '\e[31m 1. File an issue in the project'\''s issue tracker with detailed information, and apply any available remote patches as a temporary solution '\('with fetchpatch'\)'.\e[0m' - echo -e '\e[31m 2. If an immediate fix is needed or if reporting upstream isn'\''t suitable, develop a temporary local patch.\e[0m' + echo -e '\e[33mThis check is blocking, set the attribute composerStrictValidation to false to make it not blocking.\e[0m' echo exit 1 else - echo - echo -e "\e[33mWARNING: composer files validation failed\e[0m" - echo - echo -e '\e[33mThe validation of the composer.json failed.\e[0m' - echo -e '\e[33mMake sure that the file composer.json is valid.\e[0m' - echo - echo -e '\e[33mTo address the issue efficiently, follow one of these steps:\e[0m' - echo -e '\e[33m 1. File an issue in the project'\''s issue tracker with detailed information, and apply any available remote patches as a temporary solution with '\('with fetchpatch'\)'.\e[0m' - echo -e '\e[33m 2. If an immediate fix is needed or if reporting upstream isn'\''t suitable, develop a temporary local patch.\e[0m' echo echo -e '\e[33mThis check is not blocking, but it is recommended to fix the issue.\e[0m' echo @@ -48,32 +43,25 @@ checkComposerValidate() { command="composer validate --strict --no-ansi --no-interaction --quiet --no-check-all --check-lock" if ! $command; then + echo + echo -e "\e[31mERROR: composer files validation failed\e[0m" + echo + echo -e '\e[31mThe validation of the composer.json and composer.lock failed.\e[0m' + echo -e '\e[31mMake sure that the file composer.lock is consistent with composer.json.\e[0m' + echo + echo -e '\e[31mThis often indicates an issue with the upstream project, which can typically be resolved by reporting the issue to the relevant project maintainers.\e[0m' + echo + echo -e '\e[31mTo address the issue efficiently, follow one of these steps:\e[0m' + echo -e '\e[31m 1. File an issue in the project'\''s issue tracker with detailed information '\('run '\''composer update --lock --no-install'\'' to fix the issue'\)', and apply any available remote patches as a temporary solution with '\('with fetchpatch'\)'.\e[0m' + echo -e '\e[31m 2. If an immediate fix is needed or if reporting upstream isn'\''t suitable, develop a temporary local patch.\e[0m' + echo + if [[ "${composerStrictValidation}" == "1" ]]; then echo - echo -e "\e[31mERROR: composer files validation failed\e[0m" - echo - echo -e '\e[31mThe validation of the composer.json and composer.lock failed.\e[0m' - echo -e '\e[31mMake sure that the file composer.lock is consistent with composer.json.\e[0m' - echo - echo -e '\e[31mThis often indicates an issue with the upstream project, which can typically be resolved by reporting the issue to the relevant project maintainers.\e[0m' - echo - echo -e '\e[31mTo address the issue efficiently, follow one of these steps:\e[0m' - echo -e '\e[31m 1. File an issue in the project'\''s issue tracker with detailed information '\('run '\''composer update --lock --no-install'\'' to fix the issue'\)', and apply any available remote patches as a temporary solution with '\('with fetchpatch'\)'.\e[0m' - echo -e '\e[31m 2. If an immediate fix is needed or if reporting upstream isn'\''t suitable, develop a temporary local patch.\e[0m' + echo -e '\e[33mThis check is blocking, set the attribute composerStrictValidation to false to make it not blocking.\e[0m' echo exit 1 else - echo - echo -e "\e[33mWARNING: composer files validation failed\e[0m" - echo - echo -e '\e[33mThe validation of the composer.json and composer.lock failed.\e[0m' - echo -e '\e[33mMake sure that the file composer.lock is consistent with composer.json.\e[0m' - echo - echo -e '\e[33mThis often indicates an issue with the upstream project, which can typically be resolved by reporting the issue to the relevant project maintainers.\e[0m' - echo - echo -e '\e[33mTo address the issue efficiently, follow one of these steps:\e[0m' - echo -e '\e[33m 1. File an issue in the project'\''s issue tracker with detailed information '\('run '\''composer update --lock --no-install'\'' to fix the issue'\)', and apply any available remote patches as a temporary solution with '\('with fetchpatch'\)'.\e[0m' - echo -e '\e[33m 2. If an immediate fix is needed or if reporting upstream isn'\''t suitable, develop a temporary local patch.\e[0m' echo echo -e '\e[33mThis check is not blocking, but it is recommended to fix the issue.\e[0m' echo From bb0c422eb6ec009b2c98c3f32cb8cfeabe674398 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Sun, 22 Jun 2025 22:44:32 +0200 Subject: [PATCH 03/42] build-support/php: run `shfmt` on hooks --- .../v2/hooks/composer-install-hook.sh | 66 +++---- .../builders/v2/hooks/composer-vendor-hook.sh | 162 +++++++++--------- .../builders/v2/hooks/php-script-utils.bash | 108 ++++++------ 3 files changed, 168 insertions(+), 168 deletions(-) diff --git a/pkgs/build-support/php/builders/v2/hooks/composer-install-hook.sh b/pkgs/build-support/php/builders/v2/hooks/composer-install-hook.sh index 9b30f762eb0e..9458375dcd8b 100644 --- a/pkgs/build-support/php/builders/v2/hooks/composer-install-hook.sh +++ b/pkgs/build-support/php/builders/v2/hooks/composer-install-hook.sh @@ -11,60 +11,60 @@ preInstallHooks+=(composerInstallInstallHook) source @phpScriptUtils@ composerInstallConfigureHook() { - echo "Executing composerInstallConfigureHook" + echo "Executing composerInstallConfigureHook" - setComposerRootVersion + setComposerRootVersion - if [[ ! -e "${composerVendor}" ]]; then - echo "No local composer vendor found." >&2 - exit 1 - fi + if [[ ! -e "${composerVendor}" ]]; then + echo "No local composer vendor found." >&2 + exit 1 + fi - install -Dm644 ${composerVendor}/composer.json . + install -Dm644 ${composerVendor}/composer.json . - if [[ -f "${composerVendor}/composer.lock" ]]; then - install -Dm644 ${composerVendor}/composer.lock . - fi + if [[ -f "${composerVendor}/composer.lock" ]]; then + install -Dm644 ${composerVendor}/composer.lock . + fi - if [[ -f "composer.lock" ]]; then - chmod +w composer.lock - fi + if [[ -f "composer.lock" ]]; then + chmod +w composer.lock + fi - chmod +w composer.json + chmod +w composer.json - echo "Finished composerInstallConfigureHook" + echo "Finished composerInstallConfigureHook" } composerInstallBuildHook() { - echo "Executing composerInstallBuildHook" + echo "Executing composerInstallBuildHook" - echo "Finished composerInstallBuildHook" + echo "Finished composerInstallBuildHook" } composerInstallCheckHook() { - echo "Executing composerInstallCheckHook" + echo "Executing composerInstallCheckHook" - checkComposerValidate + checkComposerValidate - echo "Finished composerInstallCheckHook" + echo "Finished composerInstallCheckHook" } composerInstallInstallHook() { - echo "Executing composerInstallInstallHook" + echo "Executing composerInstallInstallHook" - cp -ar ${composerVendor}/* . + cp -ar ${composerVendor}/* . - # Copy the relevant files only in the store. - mkdir -p "$out"/share/php/"${pname}" - cp -r . "$out"/share/php/"${pname}"/ + # Copy the relevant files only in the store. + mkdir -p "$out"/share/php/"${pname}" + cp -r . "$out"/share/php/"${pname}"/ - # Create symlinks for the binaries. - mapfile -t BINS < <(jq -r -c 'try (.bin[] | select(test(".bat$")? | not) )' composer.json) - for bin in "${BINS[@]}"; do - echo -e "\e[32mCreating symlink ${bin}...\e[0m" - mkdir -p "$out/bin" - ln -s "$out/share/php/${pname}/${bin}" "$out/bin/$(basename "$bin")" - done + # Create symlinks for the binaries. + mapfile -t BINS < <(jq -r -c 'try (.bin[] | select(test(".bat$")? | not) )' composer.json) + for bin in "${BINS[@]}"; do + echo -e "\e[32mCreating symlink ${bin}...\e[0m" + mkdir -p "$out/bin" + ln -s "$out/share/php/${pname}/${bin}" "$out/bin/$(basename "$bin")" + done - echo "Finished composerInstallInstallHook" + echo "Finished composerInstallInstallHook" } diff --git a/pkgs/build-support/php/builders/v2/hooks/composer-vendor-hook.sh b/pkgs/build-support/php/builders/v2/hooks/composer-vendor-hook.sh index c19ea29ebe74..6116fe35452d 100644 --- a/pkgs/build-support/php/builders/v2/hooks/composer-vendor-hook.sh +++ b/pkgs/build-support/php/builders/v2/hooks/composer-vendor-hook.sh @@ -10,111 +10,111 @@ preCheckHooks+=(composerVendorCheckHook) preInstallHooks+=(composerVendorInstallHook) composerVendorConfigureHook() { - echo "Executing composerVendorConfigureHook" + echo "Executing composerVendorConfigureHook" - setComposerRootVersion + setComposerRootVersion + + if [[ -f "composer.lock" ]]; then + echo -e "\e[32mUsing \`composer.lock\` file from the source package\e[0m" + fi + + if [[ -e "$composerLock" ]]; then + echo -e "\e[32mUsing user provided \`composer.lock\` file from \`$composerLock\`\e[0m" + install -Dm644 $composerLock ./composer.lock + fi + + if [[ ! -f "composer.lock" ]]; then + composer \ + --no-cache \ + --no-install \ + --no-interaction \ + --no-progress \ + --optimize-autoloader \ + ${composerNoDev} \ + ${composerNoPlugins} \ + ${composerNoScripts} \ + update if [[ -f "composer.lock" ]]; then - echo -e "\e[32mUsing \`composer.lock\` file from the source package\e[0m" + install -Dm644 composer.lock -t $out/ + + echo + echo -e "\e[31mERROR: No composer.lock found\e[0m" + echo + echo -e '\e[31mNo composer.lock file found, consider adding one to your repository to ensure reproducible builds.\e[0m' + echo -e "\e[31mIn the meantime, a composer.lock file has been generated for you in $out/composer.lock\e[0m" + echo + echo -e '\e[31mTo fix the issue:\e[0m' + echo -e "\e[31m1. Copy the composer.lock file from $out/composer.lock to the project's source:\e[0m" + echo -e "\e[31m cp $out/composer.lock \e[0m" + echo -e '\e[31m2. Add the composerLock attribute, pointing to the copied composer.lock file:\e[0m' + echo -e '\e[31m composerLock = ./composer.lock;\e[0m' + echo + + exit 1 fi + fi - if [[ -e "$composerLock" ]]; then - echo -e "\e[32mUsing user provided \`composer.lock\` file from \`$composerLock\`\e[0m" - install -Dm644 $composerLock ./composer.lock - fi + if [[ -f "composer.lock" ]]; then + chmod +w composer.lock + fi - if [[ ! -f "composer.lock" ]]; then - composer \ - --no-cache \ - --no-install \ - --no-interaction \ - --no-progress \ - --optimize-autoloader \ - ${composerNoDev} \ - ${composerNoPlugins} \ - ${composerNoScripts} \ - update + chmod +w composer.json - if [[ -f "composer.lock" ]]; then - install -Dm644 composer.lock -t $out/ - - echo - echo -e "\e[31mERROR: No composer.lock found\e[0m" - echo - echo -e '\e[31mNo composer.lock file found, consider adding one to your repository to ensure reproducible builds.\e[0m' - echo -e "\e[31mIn the meantime, a composer.lock file has been generated for you in $out/composer.lock\e[0m" - echo - echo -e '\e[31mTo fix the issue:\e[0m' - echo -e "\e[31m1. Copy the composer.lock file from $out/composer.lock to the project's source:\e[0m" - echo -e "\e[31m cp $out/composer.lock \e[0m" - echo -e '\e[31m2. Add the composerLock attribute, pointing to the copied composer.lock file:\e[0m' - echo -e '\e[31m composerLock = ./composer.lock;\e[0m' - echo - - exit 1 - fi - fi - - if [[ -f "composer.lock" ]]; then - chmod +w composer.lock - fi - - chmod +w composer.json - - echo "Finished composerVendorConfigureHook" + echo "Finished composerVendorConfigureHook" } composerVendorBuildHook() { - echo "Executing composerVendorBuildHook" + echo "Executing composerVendorBuildHook" - setComposerEnvVariables + setComposerEnvVariables - composer \ - --no-cache \ - --no-interaction \ - --no-progress \ - --optimize-autoloader \ - ${composerNoDev} \ - ${composerNoPlugins} \ - ${composerNoScripts} \ - install + composer \ + --no-cache \ + --no-interaction \ + --no-progress \ + --optimize-autoloader \ + ${composerNoDev} \ + ${composerNoPlugins} \ + ${composerNoScripts} \ + install - echo "Finished composerVendorBuildHook" + echo "Finished composerVendorBuildHook" } composerVendorCheckHook() { - echo "Executing composerVendorCheckHook" + echo "Executing composerVendorCheckHook" - checkComposerValidate + checkComposerValidate - echo "Finished composerVendorCheckHook" + echo "Finished composerVendorCheckHook" } composerVendorInstallHook() { - echo "Executing composerVendorInstallHook" + echo "Executing composerVendorInstallHook" - mkdir -p $out + mkdir -p $out - cp -ar composer.json $(composer config vendor-dir) $out/ - mapfile -t installer_paths < <(jq -r -c 'try((.extra."installer-paths") | keys[])' composer.json) + cp -ar composer.json $(composer config vendor-dir) $out/ + mapfile -t installer_paths < <(jq -r -c 'try((.extra."installer-paths") | keys[])' composer.json) - for installer_path in "${installer_paths[@]}"; do - # Remove everything after {$name} placeholder - installer_path="${installer_path/\{\$name\}*/}"; - out_installer_path="$out/${installer_path/\{\$name\}*/}"; - # Copy the installer path if it exists - if [[ -d "$installer_path" ]]; then - mkdir -p $(dirname "$out_installer_path") - echo -e "\e[32mCopying installer path $installer_path to $out_installer_path\e[0m" - cp -ar "$installer_path" "$out_installer_path" - # Strip out the git repositories - find $out_installer_path -name .git -type d -prune -print -exec rm -rf {} ";" - fi - done - - if [[ -f "composer.lock" ]]; then - cp -ar composer.lock $out/ + for installer_path in "${installer_paths[@]}"; do + # Remove everything after {$name} placeholder + installer_path="${installer_path/\{\$name\}*/}" + out_installer_path="$out/${installer_path/\{\$name\}*/}" + # Copy the installer path if it exists + if [[ -d "$installer_path" ]]; then + mkdir -p $(dirname "$out_installer_path") + echo -e "\e[32mCopying installer path $installer_path to $out_installer_path\e[0m" + cp -ar "$installer_path" "$out_installer_path" + # Strip out the git repositories + find $out_installer_path -name .git -type d -prune -print -exec rm -rf {} ";" fi + done - echo "Finished composerVendorInstallHook" + if [[ -f "composer.lock" ]]; then + cp -ar composer.lock $out/ + fi + + echo "Finished composerVendorInstallHook" } diff --git a/pkgs/build-support/php/builders/v2/hooks/php-script-utils.bash b/pkgs/build-support/php/builders/v2/hooks/php-script-utils.bash index 9c9651b6bd3e..42c1e61acb17 100644 --- a/pkgs/build-support/php/builders/v2/hooks/php-script-utils.bash +++ b/pkgs/build-support/php/builders/v2/hooks/php-script-utils.bash @@ -2,69 +2,69 @@ declare -g version declare -g -i composerStrictValidation="${composerStrictValidation:-0}" setComposerRootVersion() { - if [[ -n $version ]]; then - echo -e "\e[32mSetting COMPOSER_ROOT_VERSION to $version\e[0m" - export COMPOSER_ROOT_VERSION="$version" - fi + if [[ -n $version ]]; then + echo -e "\e[32mSetting COMPOSER_ROOT_VERSION to $version\e[0m" + export COMPOSER_ROOT_VERSION="$version" + fi } setComposerEnvVariables() { - echo -e "\e[32mSetting some required environment variables for Composer...\e[0m" - export COMPOSER_MIRROR_PATH_REPOS=1 - export COMPOSER_HTACCESS_PROTECT=0 - export COMPOSER_FUND=0 + echo -e "\e[32mSetting some required environment variables for Composer...\e[0m" + export COMPOSER_MIRROR_PATH_REPOS=1 + export COMPOSER_HTACCESS_PROTECT=0 + export COMPOSER_FUND=0 } checkComposerValidate() { - command="composer validate --strict --quiet --no-interaction --no-check-all --no-check-lock" - if ! $command; then - echo - echo -e "\e[31mERROR: composer files validation failed\e[0m" - echo - echo -e '\e[31mThe validation of the composer.json failed.\e[0m' - echo -e '\e[31mMake sure that the file composer.json is valid.\e[0m' - echo - echo -e '\e[31mTo address the issue efficiently, follow one of these steps:\e[0m' - echo -e '\e[31m 1. File an issue in the project'\''s issue tracker with detailed information, and apply any available remote patches as a temporary solution '\('with fetchpatch'\)'.\e[0m' - echo -e '\e[31m 2. If an immediate fix is needed or if reporting upstream isn'\''t suitable, develop a temporary local patch.\e[0m' - echo + command="composer validate --strict --quiet --no-interaction --no-check-all --no-check-lock" + if ! $command; then + echo + echo -e "\e[31mERROR: composer files validation failed\e[0m" + echo + echo -e '\e[31mThe validation of the composer.json failed.\e[0m' + echo -e '\e[31mMake sure that the file composer.json is valid.\e[0m' + echo + echo -e '\e[31mTo address the issue efficiently, follow one of these steps:\e[0m' + echo -e '\e[31m 1. File an issue in the project'\''s issue tracker with detailed information, and apply any available remote patches as a temporary solution '\('with fetchpatch'\)'.\e[0m' + echo -e '\e[31m 2. If an immediate fix is needed or if reporting upstream isn'\''t suitable, develop a temporary local patch.\e[0m' + echo - if [[ "${composerStrictValidation}" == "1" ]]; then - echo - echo -e '\e[33mThis check is blocking, set the attribute composerStrictValidation to false to make it not blocking.\e[0m' - echo - exit 1 - else - echo - echo -e '\e[33mThis check is not blocking, but it is recommended to fix the issue.\e[0m' - echo - fi + if [[ "${composerStrictValidation}" == "1" ]]; then + echo + echo -e '\e[33mThis check is blocking, set the attribute composerStrictValidation to false to make it not blocking.\e[0m' + echo + exit 1 + else + echo + echo -e '\e[33mThis check is not blocking, but it is recommended to fix the issue.\e[0m' + echo fi + fi - command="composer validate --strict --no-ansi --no-interaction --quiet --no-check-all --check-lock" - if ! $command; then - echo - echo -e "\e[31mERROR: composer files validation failed\e[0m" - echo - echo -e '\e[31mThe validation of the composer.json and composer.lock failed.\e[0m' - echo -e '\e[31mMake sure that the file composer.lock is consistent with composer.json.\e[0m' - echo - echo -e '\e[31mThis often indicates an issue with the upstream project, which can typically be resolved by reporting the issue to the relevant project maintainers.\e[0m' - echo - echo -e '\e[31mTo address the issue efficiently, follow one of these steps:\e[0m' - echo -e '\e[31m 1. File an issue in the project'\''s issue tracker with detailed information '\('run '\''composer update --lock --no-install'\'' to fix the issue'\)', and apply any available remote patches as a temporary solution with '\('with fetchpatch'\)'.\e[0m' - echo -e '\e[31m 2. If an immediate fix is needed or if reporting upstream isn'\''t suitable, develop a temporary local patch.\e[0m' - echo + command="composer validate --strict --no-ansi --no-interaction --quiet --no-check-all --check-lock" + if ! $command; then + echo + echo -e "\e[31mERROR: composer files validation failed\e[0m" + echo + echo -e '\e[31mThe validation of the composer.json and composer.lock failed.\e[0m' + echo -e '\e[31mMake sure that the file composer.lock is consistent with composer.json.\e[0m' + echo + echo -e '\e[31mThis often indicates an issue with the upstream project, which can typically be resolved by reporting the issue to the relevant project maintainers.\e[0m' + echo + echo -e '\e[31mTo address the issue efficiently, follow one of these steps:\e[0m' + echo -e '\e[31m 1. File an issue in the project'\''s issue tracker with detailed information '\('run '\''composer update --lock --no-install'\'' to fix the issue'\)', and apply any available remote patches as a temporary solution with '\('with fetchpatch'\)'.\e[0m' + echo -e '\e[31m 2. If an immediate fix is needed or if reporting upstream isn'\''t suitable, develop a temporary local patch.\e[0m' + echo - if [[ "${composerStrictValidation}" == "1" ]]; then - echo - echo -e '\e[33mThis check is blocking, set the attribute composerStrictValidation to false to make it not blocking.\e[0m' - echo - exit 1 - else - echo - echo -e '\e[33mThis check is not blocking, but it is recommended to fix the issue.\e[0m' - echo - fi + if [[ "${composerStrictValidation}" == "1" ]]; then + echo + echo -e '\e[33mThis check is blocking, set the attribute composerStrictValidation to false to make it not blocking.\e[0m' + echo + exit 1 + else + echo + echo -e '\e[33mThis check is not blocking, but it is recommended to fix the issue.\e[0m' + echo fi + fi } From 767ed2a8d070845ba5230afd250eb5d16a5bcebc Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Sun, 22 Jun 2025 22:46:46 +0200 Subject: [PATCH 04/42] build-support/php: make shellcheck happy --- .../v2/hooks/composer-install-hook.sh | 11 ++++--- .../builders/v2/hooks/composer-vendor-hook.sh | 31 +++++++++++-------- .../builders/v2/hooks/php-script-utils.bash | 2 ++ 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/pkgs/build-support/php/builders/v2/hooks/composer-install-hook.sh b/pkgs/build-support/php/builders/v2/hooks/composer-install-hook.sh index 9458375dcd8b..4e3eba5f0785 100644 --- a/pkgs/build-support/php/builders/v2/hooks/composer-install-hook.sh +++ b/pkgs/build-support/php/builders/v2/hooks/composer-install-hook.sh @@ -1,4 +1,6 @@ -declare -g version +# shellcheck shell=bash + +declare -g out declare -g pname declare -g composerVendor declare -g -i composerStrictValidation="${composerStrictValidation:-0}" @@ -8,6 +10,7 @@ preBuildHooks+=(composerInstallBuildHook) preCheckHooks+=(composerInstallCheckHook) preInstallHooks+=(composerInstallInstallHook) +# shellcheck source=/dev/null source @phpScriptUtils@ composerInstallConfigureHook() { @@ -20,10 +23,10 @@ composerInstallConfigureHook() { exit 1 fi - install -Dm644 ${composerVendor}/composer.json . + install -Dm644 "${composerVendor}"/composer.json . if [[ -f "${composerVendor}/composer.lock" ]]; then - install -Dm644 ${composerVendor}/composer.lock . + install -Dm644 "${composerVendor}"/composer.lock . fi if [[ -f "composer.lock" ]]; then @@ -52,7 +55,7 @@ composerInstallCheckHook() { composerInstallInstallHook() { echo "Executing composerInstallInstallHook" - cp -ar ${composerVendor}/* . + cp -ar "${composerVendor}"/* . # Copy the relevant files only in the store. mkdir -p "$out"/share/php/"${pname}" diff --git a/pkgs/build-support/php/builders/v2/hooks/composer-vendor-hook.sh b/pkgs/build-support/php/builders/v2/hooks/composer-vendor-hook.sh index 6116fe35452d..867ee1189b94 100644 --- a/pkgs/build-support/php/builders/v2/hooks/composer-vendor-hook.sh +++ b/pkgs/build-support/php/builders/v2/hooks/composer-vendor-hook.sh @@ -1,5 +1,10 @@ +# shellcheck shell=bash + +# shellcheck source=/dev/null source @phpScriptUtils@ +declare -g out +declare -g composerLock declare -g composerNoDev="${composerNoDev:+--no-dev}" declare -g composerNoPlugins="${composerNoPlugins:+--no-plugins}" declare -g composerNoScripts="${composerNoScripts:+--no-scripts}" @@ -20,7 +25,7 @@ composerVendorConfigureHook() { if [[ -e "$composerLock" ]]; then echo -e "\e[32mUsing user provided \`composer.lock\` file from \`$composerLock\`\e[0m" - install -Dm644 $composerLock ./composer.lock + install -Dm644 "$composerLock" ./composer.lock fi if [[ ! -f "composer.lock" ]]; then @@ -30,13 +35,13 @@ composerVendorConfigureHook() { --no-interaction \ --no-progress \ --optimize-autoloader \ - ${composerNoDev} \ - ${composerNoPlugins} \ - ${composerNoScripts} \ + "${composerNoDev}" \ + "${composerNoPlugins}" \ + "${composerNoScripts}" \ update if [[ -f "composer.lock" ]]; then - install -Dm644 composer.lock -t $out/ + install -Dm644 composer.lock -t "$out"/ echo echo -e "\e[31mERROR: No composer.lock found\e[0m" @@ -74,9 +79,9 @@ composerVendorBuildHook() { --no-interaction \ --no-progress \ --optimize-autoloader \ - ${composerNoDev} \ - ${composerNoPlugins} \ - ${composerNoScripts} \ + "${composerNoDev}" \ + "${composerNoPlugins}" \ + "${composerNoScripts}" \ install echo "Finished composerVendorBuildHook" @@ -93,9 +98,9 @@ composerVendorCheckHook() { composerVendorInstallHook() { echo "Executing composerVendorInstallHook" - mkdir -p $out + mkdir -p "$out" - cp -ar composer.json $(composer config vendor-dir) $out/ + cp -ar composer.json "$(composer config vendor-dir)" "$out"/ mapfile -t installer_paths < <(jq -r -c 'try((.extra."installer-paths") | keys[])' composer.json) for installer_path in "${installer_paths[@]}"; do @@ -104,16 +109,16 @@ composerVendorInstallHook() { out_installer_path="$out/${installer_path/\{\$name\}*/}" # Copy the installer path if it exists if [[ -d "$installer_path" ]]; then - mkdir -p $(dirname "$out_installer_path") + mkdir -p "$(dirname "$out_installer_path")" echo -e "\e[32mCopying installer path $installer_path to $out_installer_path\e[0m" cp -ar "$installer_path" "$out_installer_path" # Strip out the git repositories - find $out_installer_path -name .git -type d -prune -print -exec rm -rf {} ";" + find "$out_installer_path" -name .git -type d -prune -print -exec rm -rf {} ";" fi done if [[ -f "composer.lock" ]]; then - cp -ar composer.lock $out/ + cp -ar composer.lock "$out"/ fi echo "Finished composerVendorInstallHook" diff --git a/pkgs/build-support/php/builders/v2/hooks/php-script-utils.bash b/pkgs/build-support/php/builders/v2/hooks/php-script-utils.bash index 42c1e61acb17..bec552bfaa46 100644 --- a/pkgs/build-support/php/builders/v2/hooks/php-script-utils.bash +++ b/pkgs/build-support/php/builders/v2/hooks/php-script-utils.bash @@ -1,3 +1,5 @@ +# shellcheck shell=bash + declare -g version declare -g -i composerStrictValidation="${composerStrictValidation:-0}" From d9ee6a3e629c39005e099b9470a46ff7cb11b0a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 24 Jun 2025 16:16:58 +0200 Subject: [PATCH 05/42] nixVersions.git: 2.30pre20250521 -> 2.30pre20250624 --- pkgs/tools/package-management/nix/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 7d3c6fbfcc59..9ba6cc9d11db 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -203,14 +203,14 @@ lib.makeExtensible ( nix_2_29 = addTests "nix_2_29" self.nixComponents_2_29.nix-everything; nixComponents_git = nixDependencies.callPackage ./modular/packages.nix rec { - version = "2.30pre20250521_${lib.substring 0 8 src.rev}"; + version = "2.30pre20250624_${lib.substring 0 8 src.rev}"; inherit (self.nix_2_24.meta) maintainers teams; otherSplices = generateSplicesForNixComponents "nixComponents_git"; src = fetchFromGitHub { owner = "NixOS"; repo = "nix"; - rev = "76a4d4c2913a1654dddd195b034ff7e66cb3e96f"; - hash = "sha256-OA22Ig72oV6reHN8HMlimmnrsxpNzqyzi4h6YBVzzEA="; + rev = "448cfb71eafbb3f2932b025aa2600c80b6d383f1"; + hash = "sha256-tk1H8lOA5lIvhNP/izZ6JzT0EuDmCOX5RBhOeHdc2cM="; }; }; From 520250a23bb2564a7e9950ebc773c5893f5220dd Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 25 Jun 2025 13:17:55 +0000 Subject: [PATCH 06/42] openapi-generator-cli: 7.13.0 -> 7.14.0 --- pkgs/tools/networking/openapi-generator-cli/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/openapi-generator-cli/default.nix b/pkgs/tools/networking/openapi-generator-cli/default.nix index 62f9fbfbaf6c..19782c0af6ad 100644 --- a/pkgs/tools/networking/openapi-generator-cli/default.nix +++ b/pkgs/tools/networking/openapi-generator-cli/default.nix @@ -9,7 +9,7 @@ let this = stdenv.mkDerivation (finalAttrs: { - version = "7.13.0"; + version = "7.14.0"; pname = "openapi-generator-cli"; jarfilename = "openapi-generator-cli-${finalAttrs.version}.jar"; @@ -20,7 +20,7 @@ let src = fetchurl { url = "mirror://maven/org/openapitools/openapi-generator-cli/${finalAttrs.version}/${finalAttrs.jarfilename}"; - sha256 = "sha256-0G2kaAm2L96cp6ism9OZv7omUWYbF+JMqlMDQtBoH+I="; + sha256 = "sha256-4DGGg1AiygLaSqleOWe2o7bUTC5fdgbm1cIkZvUZx1c="; }; dontUnpack = true; From 1f73b45f6cfe0e335074a27f475a959ac51e5ba7 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Mon, 30 Jun 2025 10:03:53 +0200 Subject: [PATCH 07/42] ntpd-rs: 1.5.0 -> 1.6.0 --- pkgs/by-name/nt/ntpd-rs/package.nix | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/pkgs/by-name/nt/ntpd-rs/package.nix b/pkgs/by-name/nt/ntpd-rs/package.nix index 9836a34f8dc4..39b582ba5796 100644 --- a/pkgs/by-name/nt/ntpd-rs/package.nix +++ b/pkgs/by-name/nt/ntpd-rs/package.nix @@ -13,17 +13,17 @@ rustPlatform.buildRustPackage rec { pname = "ntpd-rs"; - version = "1.5.0"; + version = "1.6.0"; src = fetchFromGitHub { owner = "pendulum-project"; repo = "ntpd-rs"; tag = "v${version}"; - hash = "sha256-APQHxlsyUMA1N6FatQvotOokxNikOO22GGyXUMh3ABo="; + hash = "sha256-PX3vNrw/EM1d7/9JuxhfHG63dIULNUYWs0PGbOC7AcA="; }; useFetchCargoVendor = true; - cargoHash = "sha256-BiLYKOgmmqOesfl/8y4590Xo2Z4+u/Rn7CglNjQk2bU="; + cargoHash = "sha256-lBwhaoRdYOmfVSYKmeBbLp/D7cZ43z3CEnyt7sVVRlw="; nativeBuildInputs = [ pandoc @@ -39,14 +39,6 @@ rustPlatform.buildRustPackage rec { source utils/generate-man.sh ''; - # lots of flaky tests - doCheck = false; - - checkFlags = [ - # doesn't find the testca - "--skip=daemon::keyexchange::tests" - ]; - postInstall = '' install -Dm444 -t $out/lib/systemd/system docs/examples/conf/{ntpd-rs,ntpd-rs-metrics}.service installManPage docs/precompiled/man/{ntp.toml.5,ntp-ctl.8,ntp-daemon.8,ntp-metrics-exporter.8} From 6ce69de6e0c39808e2b1ff6928d0b4cee7dc7a5f Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Mon, 30 Jun 2025 15:47:50 +0200 Subject: [PATCH 08/42] mmc-utils: unstable-2024-03-07 -> 1.0 --- pkgs/by-name/mm/mmc-utils/package.nix | 34 ++++++++++++--------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/pkgs/by-name/mm/mmc-utils/package.nix b/pkgs/by-name/mm/mmc-utils/package.nix index 7e197e6bbda5..2312f7ecca8e 100644 --- a/pkgs/by-name/mm/mmc-utils/package.nix +++ b/pkgs/by-name/mm/mmc-utils/package.nix @@ -1,37 +1,33 @@ { lib, stdenv, - fetchzip, - unstableGitUpdater, + fetchgit, + gitUpdater, + sparse, }: -stdenv.mkDerivation { +stdenv.mkDerivation (finalAttrs: { pname = "mmc-utils"; - version = "unstable-2024-03-07"; + version = "1.0"; - src = fetchzip rec { - url = "https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git/snapshot/mmc-utils-${passthru.rev}.tar.gz"; - passthru.rev = "e1281d4de9166b7254ba30bb58f9191fc2c9e7fb"; - sha256 = "/lkcZ/ArdBAStV9usavrbfjULXenqb+h2rbDJzxZjJk="; + src = fetchgit { + url = "https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git"; + tag = "v${finalAttrs.version}"; + hash = "sha256-iWLA1psNPUBCPOP393/xnYJ6BEuOcPCEYgymqE06F3Q="; }; + nativeBuildInputs = [ sparse ]; + makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "prefix=$(out)" + "mandir=$(out)/share/man" ]; - # causes redefinition of _FORTIFY_SOURCE - hardeningDisable = [ "fortify3" ]; - - postInstall = '' - mkdir -p $out/share/man/man1 - cp man/mmc.1 $out/share/man/man1/ - ''; - enableParallelBuilding = true; - passthru.updateScript = unstableGitUpdater { - url = "https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git"; + passthru.updateScript = gitUpdater { + rev-prefix = "v"; }; meta = with lib; { @@ -42,4 +38,4 @@ stdenv.mkDerivation { maintainers = [ maintainers.dezgeg ]; platforms = platforms.linux; }; -} +}) From 437f2274265d3e4d672ce01dab4b6c8a84a5cee1 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Mon, 30 Jun 2025 16:17:13 +0200 Subject: [PATCH 09/42] cpp-jwt: 1.4 -> 1.5 --- pkgs/by-name/cp/cpp-jwt/fix-version.patch | 12 ------------ pkgs/by-name/cp/cpp-jwt/package.nix | 7 ++----- 2 files changed, 2 insertions(+), 17 deletions(-) delete mode 100644 pkgs/by-name/cp/cpp-jwt/fix-version.patch diff --git a/pkgs/by-name/cp/cpp-jwt/fix-version.patch b/pkgs/by-name/cp/cpp-jwt/fix-version.patch deleted file mode 100644 index d04525e15464..000000000000 --- a/pkgs/by-name/cp/cpp-jwt/fix-version.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2f35431..f08eb22 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,5 +1,5 @@ - cmake_minimum_required(VERSION 3.5.0) --project(cpp-jwt VERSION 1.2.0) -+project(cpp-jwt VERSION 1.4.0) - - option(CPP_JWT_BUILD_EXAMPLES "build examples" ON) - option(CPP_JWT_BUILD_TESTS "build tests" ON) - \ No newline at end of file diff --git a/pkgs/by-name/cp/cpp-jwt/package.nix b/pkgs/by-name/cp/cpp-jwt/package.nix index 838916f65566..05dc6730104f 100644 --- a/pkgs/by-name/cp/cpp-jwt/package.nix +++ b/pkgs/by-name/cp/cpp-jwt/package.nix @@ -10,18 +10,15 @@ stdenv.mkDerivation rec { pname = "cpp-jwt"; - version = "1.4"; + version = "1.5"; src = fetchFromGitHub { owner = "arun11299"; repo = "cpp-jwt"; rev = "v${version}"; - sha256 = "sha256-5hVsFanTCT/uLLXrnb2kMvmL6qs9RXVkvxdWaT6m4mk="; + sha256 = "sha256-l1FevNhGX7vouKmGh/ypCcmZQLMpHJ4JFUp5dnNMEwg="; }; - # fix reported version - patches = [ ./fix-version.patch ]; - cmakeFlags = [ "-DCPP_JWT_USE_VENDORED_NLOHMANN_JSON=OFF" "-DCPP_JWT_BUILD_EXAMPLES=OFF" From 9ff638701ea5786359a13c32c376153e1959fc68 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Tue, 1 Jul 2025 06:23:10 +0200 Subject: [PATCH 10/42] maintainers/README.md: encourage notifying maintainers --- maintainers/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/maintainers/README.md b/maintainers/README.md index 70687604b611..d1e9433f909f 100644 --- a/maintainers/README.md +++ b/maintainers/README.md @@ -49,6 +49,7 @@ The maintainer is welcome to come back at any time. ## Tools for maintainers When a pull request is made against a package, nixpkgs CI will notify the appropriate maintainer(s) by trying to correlate the files the PR touches with the packages that need rebuilding. +This process is subject to error however, so we encourage PR authors to notify the appropriate people. Maintainers can also invoke the [nixpkgs-merge-bot](https://github.com/nixos/nixpkgs-merge-bot) to merge pull requests targeting packages they are the maintainer of, which satisfy the current security [constraints](https://github.com/NixOS/nixpkgs-merge-bot/blob/main/README.md#constraints). Examples: [#397273](https://github.com/NixOS/nixpkgs/pull/397273#issuecomment-2789382120) and [#377027](https://github.com/NixOS/nixpkgs/pull/377027#issuecomment-2614510869) From d7d0c4e12d5e245a110e43fcebd3a6685782ab6a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 1 Jul 2025 07:58:55 +0000 Subject: [PATCH 11/42] zsh-forgit: 25.06.0 -> 25.07.0 --- pkgs/by-name/zs/zsh-forgit/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/zs/zsh-forgit/package.nix b/pkgs/by-name/zs/zsh-forgit/package.nix index 11c8fe9609d0..a652f9996ab8 100644 --- a/pkgs/by-name/zs/zsh-forgit/package.nix +++ b/pkgs/by-name/zs/zsh-forgit/package.nix @@ -15,13 +15,13 @@ stdenvNoCC.mkDerivation (finalAttrs: { pname = "zsh-forgit"; - version = "25.06.0"; + version = "25.07.0"; src = fetchFromGitHub { owner = "wfxr"; repo = "forgit"; tag = finalAttrs.version; - hash = "sha256-D1we3pOPXNsK8KgEaRBAmD5eH1i2ud4zX1GwYbOyZvY="; + hash = "sha256-h9li2nwKG6SnOQntWZpdeBbU3RrwO4+4yO7tAwuOwhE="; }; strictDeps = true; From 7f44452c4e253e82047797fb6977a7a624c0cfb0 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 1 Jul 2025 09:39:37 +0000 Subject: [PATCH 12/42] c3c: 0.7.2 -> 0.7.3 --- pkgs/by-name/c3/c3c/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/c3/c3c/package.nix b/pkgs/by-name/c3/c3c/package.nix index b2c9d6e2d78e..842a51c33ffa 100644 --- a/pkgs/by-name/c3/c3c/package.nix +++ b/pkgs/by-name/c3/c3c/package.nix @@ -19,13 +19,13 @@ in llvmPackages.stdenv.mkDerivation (finalAttrs: { pname = "c3c${optionalString debug "-debug"}"; - version = "0.7.2"; + version = "0.7.3"; src = fetchFromGitHub { owner = "c3lang"; repo = "c3c"; tag = "v${finalAttrs.version}"; - hash = "sha256-/S2rcZZe441b1sbiJDH1rnxT/mEP1694d5L8MIV6QQc="; + hash = "sha256-MOnYWlGcxLX+agChuk0BPq8BWsVvNP2QYqaGk24lb5Q="; }; cmakeBuildType = if debug then "Debug" else "Release"; From 567c44882cf45bda4e3e4350b566f449f0e35099 Mon Sep 17 00:00:00 2001 From: Sizhe Zhao Date: Tue, 1 Jul 2025 17:59:23 +0800 Subject: [PATCH 13/42] nqp: 2025.06 -> 2025.06.1 --- pkgs/development/interpreters/rakudo/nqp.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/rakudo/nqp.nix b/pkgs/development/interpreters/rakudo/nqp.nix index d6bf9d254faa..75b07b83b78a 100644 --- a/pkgs/development/interpreters/rakudo/nqp.nix +++ b/pkgs/development/interpreters/rakudo/nqp.nix @@ -8,14 +8,14 @@ stdenv.mkDerivation rec { pname = "nqp"; - version = "2025.06"; + version = "2025.06.1"; # nixpkgs-update: no auto update src = fetchFromGitHub { owner = "raku"; repo = "nqp"; rev = version; - hash = "sha256-zI/Br2GwZuhX7X+vnRDPERVmx5hW64+t79P1oFIeVnI="; + hash = "sha256-zM3JilRBbx2r8s+dj9Yn8m2SQfQFnn1bxOUiz3Q7FT8="; fetchSubmodules = true; }; From fb75d76161396d6f7dbb2911cdf73cbbe509b3e8 Mon Sep 17 00:00:00 2001 From: Sizhe Zhao Date: Tue, 1 Jul 2025 18:02:46 +0800 Subject: [PATCH 14/42] rakudo: 2025.06 -> 2025.06.1 --- pkgs/development/interpreters/rakudo/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/rakudo/default.nix b/pkgs/development/interpreters/rakudo/default.nix index 3e42ae21591e..416255a90d9d 100644 --- a/pkgs/development/interpreters/rakudo/default.nix +++ b/pkgs/development/interpreters/rakudo/default.nix @@ -12,14 +12,14 @@ stdenv.mkDerivation rec { pname = "rakudo"; - version = "2025.06"; + version = "2025.06.1"; # nixpkgs-update: no auto update src = fetchFromGitHub { owner = "rakudo"; repo = "rakudo"; rev = version; - hash = "sha256-vZ8U18TS+L6P8jTwUxasKH+nrDMElAnGKvgT3nXdpwU="; + hash = "sha256-cofiX6VHHeki8GQcMamDyPYoVMUKiuhKVz8Gh8L9qu0="; fetchSubmodules = true; }; From 2c8500b91dcfffa29b2657269bb1a3088878a8b4 Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Mon, 30 Jun 2025 10:40:45 +0200 Subject: [PATCH 15/42] test-driver: Move machine code into its own python module folder --- nixos/lib/test-driver/nixos-test-driver-docstrings.nix | 2 +- .../src/test_driver/{machine.py => machine/__init__.py} | 0 nixos/lib/test-driver/src/test_driver/{ => machine}/qmp.py | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename nixos/lib/test-driver/src/test_driver/{machine.py => machine/__init__.py} (100%) rename nixos/lib/test-driver/src/test_driver/{ => machine}/qmp.py (100%) diff --git a/nixos/lib/test-driver/nixos-test-driver-docstrings.nix b/nixos/lib/test-driver/nixos-test-driver-docstrings.nix index b6450685e047..107d590e2745 100644 --- a/nixos/lib/test-driver/nixos-test-driver-docstrings.nix +++ b/nixos/lib/test-driver/nixos-test-driver-docstrings.nix @@ -11,6 +11,6 @@ in runCommand "nixos-test-driver-docstrings" env '' mkdir $out - python3 ${./src/extract-docstrings.py} ${./src/test_driver/machine.py} \ + python3 ${./src/extract-docstrings.py} ${./src/test_driver/machine/__init__.py} \ > $out/machine-methods.md '' diff --git a/nixos/lib/test-driver/src/test_driver/machine.py b/nixos/lib/test-driver/src/test_driver/machine/__init__.py similarity index 100% rename from nixos/lib/test-driver/src/test_driver/machine.py rename to nixos/lib/test-driver/src/test_driver/machine/__init__.py diff --git a/nixos/lib/test-driver/src/test_driver/qmp.py b/nixos/lib/test-driver/src/test_driver/machine/qmp.py similarity index 100% rename from nixos/lib/test-driver/src/test_driver/qmp.py rename to nixos/lib/test-driver/src/test_driver/machine/qmp.py From 9f10c9bce89915bed2e69c0656bdf05a37cbcb51 Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Mon, 30 Jun 2025 11:54:21 +0200 Subject: [PATCH 16/42] test-driver: Factor out OCR related code to machine/ocr.py --- .../src/test_driver/machine/__init__.py | 120 ++++-------------- .../src/test_driver/machine/ocr.py | 111 ++++++++++++++++ 2 files changed, 137 insertions(+), 94 deletions(-) create mode 100644 nixos/lib/test-driver/src/test_driver/machine/ocr.py diff --git a/nixos/lib/test-driver/src/test_driver/machine/__init__.py b/nixos/lib/test-driver/src/test_driver/machine/__init__.py index 1b9dd1262ce6..7ad30178394e 100644 --- a/nixos/lib/test-driver/src/test_driver/machine/__init__.py +++ b/nixos/lib/test-driver/src/test_driver/machine/__init__.py @@ -13,8 +13,8 @@ import sys import tempfile import threading import time -from collections.abc import Callable, Iterable -from contextlib import _GeneratorContextManager, nullcontext +from collections.abc import Callable, Generator +from contextlib import _GeneratorContextManager, contextmanager, nullcontext from pathlib import Path from queue import Queue from typing import Any @@ -22,6 +22,7 @@ from typing import Any from test_driver.errors import MachineError, RequestedAssertionFailed from test_driver.logger import AbstractLogger +from .ocr import perform_ocr_on_screenshot, perform_ocr_variants_on_screenshot from .qmp import QMPSession CHAR_TO_KEY = { @@ -92,84 +93,6 @@ def make_command(args: list) -> str: return " ".join(map(shlex.quote, (map(str, args)))) -def _preprocess_screenshot(screenshot_path: str, negate: bool = False) -> str: - magick_args = [ - "-filter", - "Catrom", - "-density", - "72", - "-resample", - "300", - "-contrast", - "-normalize", - "-despeckle", - "-type", - "grayscale", - "-sharpen", - "1", - "-posterize", - "3", - ] - out_file = screenshot_path - - if negate: - magick_args.append("-negate") - out_file += ".negative" - - magick_args += [ - "-gamma", - "100", - "-blur", - "1x65535", - ] - out_file += ".png" - - ret = subprocess.run( - ["magick", "convert"] + magick_args + [screenshot_path, out_file], - capture_output=True, - ) - - if ret.returncode != 0: - raise MachineError( - f"Image processing failed with exit code {ret.returncode}, stdout: {ret.stdout.decode()}, stderr: {ret.stderr.decode()}" - ) - - return out_file - - -def _perform_ocr_on_screenshot( - screenshot_path: str, model_ids: Iterable[int] -) -> list[str]: - if shutil.which("tesseract") is None: - raise MachineError("OCR requested but enableOCR is false") - - processed_image = _preprocess_screenshot(screenshot_path, negate=False) - processed_negative = _preprocess_screenshot(screenshot_path, negate=True) - - model_results = [] - for image in [screenshot_path, processed_image, processed_negative]: - for model_id in model_ids: - ret = subprocess.run( - [ - "tesseract", - image, - "-", - "--oem", - str(model_id), - "-c", - "debug_file=/dev/null", - "--psm", - "11", - ], - capture_output=True, - ) - if ret.returncode != 0: - raise MachineError(f"OCR failed with exit code {ret.returncode}") - model_results.append(ret.stdout.decode("utf-8")) - - return model_results - - def retry(fn: Callable, timeout: int = 900) -> None: """Call the given function repeatedly, with 1 second intervals, until it returns True or a timeout is reached. @@ -910,6 +833,17 @@ class Machine: self.log(f"(connecting took {toc - tic:.2f} seconds)") self.connected = True + @contextmanager + def _managed_screenshot(self) -> Generator[str]: + """ + Take a screenshot and yield the screenshot filepath. + The file will be deleted when leaving the generator. + """ + with tempfile.TemporaryDirectory() as tmpdir: + screenshot_path: str = os.path.join(tmpdir, "ppm") + self.send_monitor_command(f"screendump {screenshot_path}") + yield screenshot_path + def screenshot(self, filename: str) -> None: """ Take a picture of the display of the virtual machine, in PNG format. @@ -919,17 +853,19 @@ class Machine: filename += ".png" if "/" not in filename: filename = os.path.join(self.out_dir, filename) - tmp = f"{filename}.ppm" with self.nested( f"making screenshot {filename}", {"image": os.path.basename(filename)}, ): - self.send_monitor_command(f"screendump {tmp}") - ret = subprocess.run(f"pnmtopng '{tmp}' > '{filename}'", shell=True) - os.unlink(tmp) - if ret.returncode != 0: - raise MachineError("Cannot convert screenshot") + with self._managed_screenshot() as screenshot_path: + ret = subprocess.run( + f"pnmtopng '{screenshot_path}' > '{filename}'", shell=True + ) + if ret.returncode != 0: + raise MachineError( + f"Cannot convert screenshot (pnmtopng returned code {ret.returncode})" + ) def copy_from_host_via_shell(self, source: str, target: str) -> None: """Copy a file from the host into the guest by piping it over the @@ -1003,12 +939,6 @@ class Machine: """Debugging: Dump the contents of the TTY""" self.execute(f"fold -w 80 /dev/vcs{tty} | systemd-cat") - def _get_screen_text_variants(self, model_ids: Iterable[int]) -> list[str]: - with tempfile.TemporaryDirectory() as tmpdir: - screenshot_path = os.path.join(tmpdir, "ppm") - self.send_monitor_command(f"screendump {screenshot_path}") - return _perform_ocr_on_screenshot(screenshot_path, model_ids) - def get_screen_text_variants(self) -> list[str]: """ Return a list of different interpretations of what is currently @@ -1021,7 +951,8 @@ class Machine: This requires [`enableOCR`](#test-opt-enableOCR) to be set to `true`. ::: """ - return self._get_screen_text_variants([0, 1, 2]) + with self._managed_screenshot() as screenshot_path: + return perform_ocr_variants_on_screenshot(screenshot_path) def get_screen_text(self) -> str: """ @@ -1032,7 +963,8 @@ class Machine: This requires [`enableOCR`](#test-opt-enableOCR) to be set to `true`. ::: """ - return self._get_screen_text_variants([2])[0] + with self._managed_screenshot() as screenshot_path: + return perform_ocr_on_screenshot(screenshot_path) def wait_for_text(self, regex: str, timeout: int = 900) -> None: """ diff --git a/nixos/lib/test-driver/src/test_driver/machine/ocr.py b/nixos/lib/test-driver/src/test_driver/machine/ocr.py new file mode 100644 index 000000000000..7b1cc62dd7db --- /dev/null +++ b/nixos/lib/test-driver/src/test_driver/machine/ocr.py @@ -0,0 +1,111 @@ +import shutil +import subprocess + +from test_driver.errors import MachineError + + +def perform_ocr_on_screenshot(screenshot_path: str) -> str: + """ + Perform OCR on a screenshot that contains text. + Returns a string with all words that could be found. + """ + return perform_ocr_variants_on_screenshot(screenshot_path, False)[0] + + +def perform_ocr_variants_on_screenshot( + screenshot_path: str, variants: bool = True +) -> list[str]: + """ + Same as perform_ocr_on_screenshot but will create variants of the images + that can lead to more words being detected. + Returns a string with words for each variant. + """ + if shutil.which("tesseract") is None: + raise MachineError("OCR requested but `tesseract` is not available") + + # tesseract --help-oem + # OCR Engine modes (OEM): + # 0|tesseract_only Legacy engine only. + # 1|lstm_only Neural nets LSTM engine only. + # 2|tesseract_lstm_combined Legacy + LSTM engines. + # 3|default Default, based on what is available. + model_ids: list[int] = [0, 1, 2] if variants else [3] + + image_paths = [ + screenshot_path, + _preprocess_screenshot(screenshot_path, negate=False), + _preprocess_screenshot(screenshot_path, negate=True), + ] + + def run_tesseract(image: str, model_id: int) -> str: + ret = subprocess.run( + [ + "tesseract", + image, + "-", + "--oem", + str(model_id), + "-c", + "debug_file=/dev/null", + "--psm", + "11", + ], + capture_output=True, + ) + if ret.returncode != 0: + raise MachineError(f"OCR failed with exit code {ret.returncode}") + return ret.stdout.decode("utf-8") + + return [ + run_tesseract(image, model_id) + for image in image_paths + for model_id in model_ids + ] + + +def _preprocess_screenshot(screenshot_path: str, negate: bool = False) -> str: + if shutil.which("magick") is None: + raise MachineError("OCR requested but `magick` is not available") + + magick_args = [ + "-filter", + "Catrom", + "-density", + "72", + "-resample", + "300", + "-contrast", + "-normalize", + "-despeckle", + "-type", + "grayscale", + "-sharpen", + "1", + "-posterize", + "3", + ] + out_file = screenshot_path + + if negate: + magick_args.append("-negate") + out_file += ".negative" + + magick_args += [ + "-gamma", + "100", + "-blur", + "1x65535", + ] + out_file += ".png" + + ret = subprocess.run( + ["magick", "convert"] + magick_args + [screenshot_path, out_file], + capture_output=True, + ) + + if ret.returncode != 0: + raise MachineError( + f"Image processing failed with exit code {ret.returncode}, stdout: {ret.stdout.decode()}, stderr: {ret.stderr.decode()}" + ) + + return out_file From 14c01b5af544ed14f7f0cd7e259ba9425e8bd99e Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Mon, 30 Jun 2025 14:21:35 +0200 Subject: [PATCH 17/42] test-driver: Parallelize OCR --- .../src/test_driver/machine/ocr.py | 71 +++++++++++-------- 1 file changed, 41 insertions(+), 30 deletions(-) diff --git a/nixos/lib/test-driver/src/test_driver/machine/ocr.py b/nixos/lib/test-driver/src/test_driver/machine/ocr.py index 7b1cc62dd7db..c8b19c6e1066 100644 --- a/nixos/lib/test-driver/src/test_driver/machine/ocr.py +++ b/nixos/lib/test-driver/src/test_driver/machine/ocr.py @@ -1,3 +1,6 @@ +import itertools +import multiprocessing +import os import shutil import subprocess @@ -9,7 +12,10 @@ def perform_ocr_on_screenshot(screenshot_path: str) -> str: Perform OCR on a screenshot that contains text. Returns a string with all words that could be found. """ - return perform_ocr_variants_on_screenshot(screenshot_path, False)[0] + variants = perform_ocr_variants_on_screenshot(screenshot_path, False)[0] + if len(variants) != 1: + raise MachineError(f"Received wrong number of OCR results: {len(variants)}") + return variants[0] def perform_ocr_variants_on_screenshot( @@ -29,38 +35,43 @@ def perform_ocr_variants_on_screenshot( # 1|lstm_only Neural nets LSTM engine only. # 2|tesseract_lstm_combined Legacy + LSTM engines. # 3|default Default, based on what is available. - model_ids: list[int] = [0, 1, 2] if variants else [3] + model_ids: list[int] = [0, 1] if variants else [2] - image_paths = [ - screenshot_path, - _preprocess_screenshot(screenshot_path, negate=False), - _preprocess_screenshot(screenshot_path, negate=True), - ] + # Tesseract runs parallel on up to 4 cores. + # Docs suggest to run it with OMP_THREAD_LIMIT=1 for hundreds of parallel + # runs. Our average test run is somewhere inbetween. + # https://github.com/tesseract-ocr/tesseract/issues/3109 + processes = max(1, int(os.process_cpu_count() / 4)) + with multiprocessing.Pool(processes=processes) as pool: + image_paths: list[str] = [screenshot_path] + if variants: + image_paths.extend( + pool.starmap( + _preprocess_screenshot, + [(screenshot_path, False), (screenshot_path, True)], + ) + ) + return pool.starmap(_run_tesseract, itertools.product(image_paths, model_ids)) - def run_tesseract(image: str, model_id: int) -> str: - ret = subprocess.run( - [ - "tesseract", - image, - "-", - "--oem", - str(model_id), - "-c", - "debug_file=/dev/null", - "--psm", - "11", - ], - capture_output=True, - ) - if ret.returncode != 0: - raise MachineError(f"OCR failed with exit code {ret.returncode}") - return ret.stdout.decode("utf-8") - return [ - run_tesseract(image, model_id) - for image in image_paths - for model_id in model_ids - ] +def _run_tesseract(image: str, model_id: int) -> str: + ret = subprocess.run( + [ + "tesseract", + image, + "-", + "--oem", + str(model_id), + "-c", + "debug_file=/dev/null", + "--psm", + "11", + ], + capture_output=True, + ) + if ret.returncode != 0: + raise MachineError(f"OCR failed with exit code {ret.returncode}") + return ret.stdout.decode("utf-8") def _preprocess_screenshot(screenshot_path: str, negate: bool = False) -> str: From f56933ebbfd645f735d6e73688f884125228ace8 Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Mon, 30 Jun 2025 17:46:07 +0200 Subject: [PATCH 18/42] test-driver: drop OCR engine mode variations --- .../src/test_driver/machine/ocr.py | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/nixos/lib/test-driver/src/test_driver/machine/ocr.py b/nixos/lib/test-driver/src/test_driver/machine/ocr.py index c8b19c6e1066..1c32165ef363 100644 --- a/nixos/lib/test-driver/src/test_driver/machine/ocr.py +++ b/nixos/lib/test-driver/src/test_driver/machine/ocr.py @@ -1,4 +1,3 @@ -import itertools import multiprocessing import os import shutil @@ -29,14 +28,6 @@ def perform_ocr_variants_on_screenshot( if shutil.which("tesseract") is None: raise MachineError("OCR requested but `tesseract` is not available") - # tesseract --help-oem - # OCR Engine modes (OEM): - # 0|tesseract_only Legacy engine only. - # 1|lstm_only Neural nets LSTM engine only. - # 2|tesseract_lstm_combined Legacy + LSTM engines. - # 3|default Default, based on what is available. - model_ids: list[int] = [0, 1] if variants else [2] - # Tesseract runs parallel on up to 4 cores. # Docs suggest to run it with OMP_THREAD_LIMIT=1 for hundreds of parallel # runs. Our average test run is somewhere inbetween. @@ -51,17 +42,25 @@ def perform_ocr_variants_on_screenshot( [(screenshot_path, False), (screenshot_path, True)], ) ) - return pool.starmap(_run_tesseract, itertools.product(image_paths, model_ids)) + return pool.map(_run_tesseract, image_paths) -def _run_tesseract(image: str, model_id: int) -> str: +def _run_tesseract(image: str) -> str: + # tesseract --help-oem + # OCR Engine modes (OEM): + # 0|tesseract_only Legacy engine only. + # 1|lstm_only Neural nets LSTM engine only. + # 2|tesseract_lstm_combined Legacy + LSTM engines. + # 3|default Default, based on what is available. + ocr_engine_mode = 2 + ret = subprocess.run( [ "tesseract", image, "-", "--oem", - str(model_id), + str(ocr_engine_mode), "-c", "debug_file=/dev/null", "--psm", From e6ea13f4ea9e4783a241f473aa3105b777bef3dc Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Tue, 1 Jul 2025 13:05:00 +0200 Subject: [PATCH 19/42] test-driver: User proper `Path` instead of `str` in OCR code --- .../src/test_driver/machine/__init__.py | 4 ++-- .../test-driver/src/test_driver/machine/ocr.py | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/nixos/lib/test-driver/src/test_driver/machine/__init__.py b/nixos/lib/test-driver/src/test_driver/machine/__init__.py index 7ad30178394e..8115a5967a2d 100644 --- a/nixos/lib/test-driver/src/test_driver/machine/__init__.py +++ b/nixos/lib/test-driver/src/test_driver/machine/__init__.py @@ -834,13 +834,13 @@ class Machine: self.connected = True @contextmanager - def _managed_screenshot(self) -> Generator[str]: + def _managed_screenshot(self) -> Generator[Path]: """ Take a screenshot and yield the screenshot filepath. The file will be deleted when leaving the generator. """ with tempfile.TemporaryDirectory() as tmpdir: - screenshot_path: str = os.path.join(tmpdir, "ppm") + screenshot_path: Path = Path(tmpdir) / "ppm" self.send_monitor_command(f"screendump {screenshot_path}") yield screenshot_path diff --git a/nixos/lib/test-driver/src/test_driver/machine/ocr.py b/nixos/lib/test-driver/src/test_driver/machine/ocr.py index 1c32165ef363..b4a0eeee4722 100644 --- a/nixos/lib/test-driver/src/test_driver/machine/ocr.py +++ b/nixos/lib/test-driver/src/test_driver/machine/ocr.py @@ -2,11 +2,12 @@ import multiprocessing import os import shutil import subprocess +from pathlib import Path from test_driver.errors import MachineError -def perform_ocr_on_screenshot(screenshot_path: str) -> str: +def perform_ocr_on_screenshot(screenshot_path: Path) -> str: """ Perform OCR on a screenshot that contains text. Returns a string with all words that could be found. @@ -18,7 +19,7 @@ def perform_ocr_on_screenshot(screenshot_path: str) -> str: def perform_ocr_variants_on_screenshot( - screenshot_path: str, variants: bool = True + screenshot_path: Path, variants: bool = True ) -> list[str]: """ Same as perform_ocr_on_screenshot but will create variants of the images @@ -34,7 +35,7 @@ def perform_ocr_variants_on_screenshot( # https://github.com/tesseract-ocr/tesseract/issues/3109 processes = max(1, int(os.process_cpu_count() / 4)) with multiprocessing.Pool(processes=processes) as pool: - image_paths: list[str] = [screenshot_path] + image_paths: list[Path] = [screenshot_path] if variants: image_paths.extend( pool.starmap( @@ -45,7 +46,7 @@ def perform_ocr_variants_on_screenshot( return pool.map(_run_tesseract, image_paths) -def _run_tesseract(image: str) -> str: +def _run_tesseract(image: Path) -> str: # tesseract --help-oem # OCR Engine modes (OEM): # 0|tesseract_only Legacy engine only. @@ -73,7 +74,7 @@ def _run_tesseract(image: str) -> str: return ret.stdout.decode("utf-8") -def _preprocess_screenshot(screenshot_path: str, negate: bool = False) -> str: +def _preprocess_screenshot(screenshot_path: Path, negate: bool = False) -> Path: if shutil.which("magick") is None: raise MachineError("OCR requested but `magick` is not available") @@ -98,7 +99,7 @@ def _preprocess_screenshot(screenshot_path: str, negate: bool = False) -> str: if negate: magick_args.append("-negate") - out_file += ".negative" + out_file = out_file.with_suffix(".negative") magick_args += [ "-gamma", @@ -106,7 +107,7 @@ def _preprocess_screenshot(screenshot_path: str, negate: bool = False) -> str: "-blur", "1x65535", ] - out_file += ".png" + out_file = out_file.with_suffix(".png") ret = subprocess.run( ["magick", "convert"] + magick_args + [screenshot_path, out_file], From 5b82346744bf90cf8880772a9ae93ffe12a627b9 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Tue, 1 Jul 2025 23:42:58 +0800 Subject: [PATCH 20/42] pantheon.gala: 8.2.3 -> 8.2.4 https://github.com/elementary/gala/compare/8.2.3...8.2.4 --- pkgs/desktops/pantheon/desktop/gala/default.nix | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/pkgs/desktops/pantheon/desktop/gala/default.nix b/pkgs/desktops/pantheon/desktop/gala/default.nix index 97741d122cc8..5645b268c5f2 100644 --- a/pkgs/desktops/pantheon/desktop/gala/default.nix +++ b/pkgs/desktops/pantheon/desktop/gala/default.nix @@ -2,7 +2,6 @@ stdenv, lib, fetchFromGitHub, - fetchpatch, desktop-file-utils, gettext, libxml2, @@ -30,26 +29,19 @@ stdenv.mkDerivation rec { pname = "gala"; - version = "8.2.3"; + version = "8.2.4"; src = fetchFromGitHub { owner = "elementary"; repo = pname; rev = version; - hash = "sha256-6M9IWwrCaJoi7b5e4ltdyZfdT7KkOgsollHNKhLPr9U="; + hash = "sha256-Q+1l9KZ1Za0pb4X2It99Ui7RiOsTWDt0UrIus9ZAoJU="; }; patches = [ # We look for plugins in `/run/current-system/sw/lib/` because # there are multiple plugin providers (e.g. gala and wingpanel). ./plugins-dir.patch - - # WindowStateSaver: fix crash - # https://github.com/elementary/gala/pull/2443 - (fetchpatch { - url = "https://github.com/elementary/gala/commit/9defe95ef412f87eb14e0efd8b87f2fde5378a76.patch"; - hash = "sha256-P50ahXFlTLyHMT+WdHdLU2qNdMUnfXF+CjoJRchmyzw="; - }) ]; depsBuildBuild = [ pkg-config ]; From 050f2cd9963e5264440e4b8665d8c8f6036c79e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Tue, 1 Jul 2025 15:03:19 -0300 Subject: [PATCH 21/42] libff: remove boost dependency Although the libff README claims you need Boost to build the library, there is no current use of it in the codebase. --- pkgs/by-name/li/libff/package.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/by-name/li/libff/package.nix b/pkgs/by-name/li/libff/package.nix index 3a48a3145a44..0a03e00978cf 100644 --- a/pkgs/by-name/li/libff/package.nix +++ b/pkgs/by-name/li/libff/package.nix @@ -3,7 +3,6 @@ stdenv, fetchFromGitHub, cmake, - boost, gmp, openssl, pkg-config, @@ -38,7 +37,6 @@ stdenv.mkDerivation rec { pkg-config ]; buildInputs = [ - boost gmp openssl ]; From fab8be2aa886509f770842028194d422e45506d5 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 1 Jul 2025 18:16:41 +0000 Subject: [PATCH 22/42] xdg-desktop-portal-termfilechooser: 1.1.0 -> 1.1.1 --- .../by-name/xd/xdg-desktop-portal-termfilechooser/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/xd/xdg-desktop-portal-termfilechooser/package.nix b/pkgs/by-name/xd/xdg-desktop-portal-termfilechooser/package.nix index 533b5d89bf41..d0a5f94eb8a6 100644 --- a/pkgs/by-name/xd/xdg-desktop-portal-termfilechooser/package.nix +++ b/pkgs/by-name/xd/xdg-desktop-portal-termfilechooser/package.nix @@ -13,13 +13,13 @@ }: stdenv.mkDerivation (finalAttrs: { pname = "xdg-desktop-portal-termfilechooser"; - version = "1.1.0"; + version = "1.1.1"; src = fetchFromGitHub { owner = "hunkyburrito"; repo = "xdg-desktop-portal-termfilechooser"; tag = "v${finalAttrs.version}"; - hash = "sha256-o2FBPSJrcyAz6bJKQukj6Y5ikGpFuH1Un1qwX4w73os="; + hash = "sha256-aqFaf87f0Th9MRzLthCnTuw41R2B5z0hx7dAaZ/KEWo="; }; nativeBuildInputs = [ From 3938d1ea8e8696b031d7162ec6b9737b58ffbe87 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 1 Jul 2025 19:17:45 +0200 Subject: [PATCH 23/42] dolphin-emu: get gtk dialogs working --- pkgs/by-name/do/dolphin-emu/package.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/by-name/do/dolphin-emu/package.nix b/pkgs/by-name/do/dolphin-emu/package.nix index bad3ecbae5f6..725d024b52ab 100644 --- a/pkgs/by-name/do/dolphin-emu/package.nix +++ b/pkgs/by-name/do/dolphin-emu/package.nix @@ -7,6 +7,7 @@ cmake, pkg-config, qt6, + wrapGAppsHook3, # darwin-only xcbuild, @@ -77,6 +78,7 @@ stdenv.mkDerivation (finalAttrs: { cmake pkg-config qt6.wrapQtAppsHook + wrapGAppsHook3 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild # for plutil @@ -169,6 +171,12 @@ stdenv.mkDerivation (finalAttrs: { ln -s $out/Applications/Dolphin.app/Contents/MacOS/Dolphin $out/bin ''; + dontWrapGApps = true; + + preFixup = '' + qtWrapperArgs+=("''${gappsWrapperArgs[@]}") + ''; + passthru = { tests = { version = testers.testVersion { From 297f585267449c1b8f665c0fdcf270c2d2f410f6 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 1 Jul 2025 18:35:16 +0000 Subject: [PATCH 24/42] python3Packages.xonsh: 0.19.4 -> 0.19.9 --- pkgs/by-name/xo/xonsh/unwrapped.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/xo/xonsh/unwrapped.nix b/pkgs/by-name/xo/xonsh/unwrapped.nix index 9f7a8e1873da..96faca5ca7da 100644 --- a/pkgs/by-name/xo/xonsh/unwrapped.nix +++ b/pkgs/by-name/xo/xonsh/unwrapped.nix @@ -28,7 +28,7 @@ buildPythonPackage rec { pname = "xonsh"; - version = "0.19.4"; + version = "0.19.9"; pyproject = true; # PyPI package ships incomplete tests @@ -36,7 +36,7 @@ buildPythonPackage rec { owner = "xonsh"; repo = "xonsh"; tag = version; - hash = "sha256-gOk0BZNuKsEzs72Lukq7+7vltmtPE75gEs+JyLqBDdc="; + hash = "sha256-7A6V2lfJHpjrp3AWSnfNuvPy02GvjNUXZqBBSomHJew="; }; build-system = [ From 3d51dfb9261c34efb60b6eed5517744d2984aadc Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 2 Jul 2025 06:46:02 +0000 Subject: [PATCH 25/42] cri-o-unwrapped: 1.33.1 -> 1.33.2 --- pkgs/applications/virtualization/cri-o/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/virtualization/cri-o/default.nix b/pkgs/applications/virtualization/cri-o/default.nix index 75d52f342601..39db872e8fa3 100644 --- a/pkgs/applications/virtualization/cri-o/default.nix +++ b/pkgs/applications/virtualization/cri-o/default.nix @@ -17,13 +17,13 @@ buildGoModule rec { pname = "cri-o"; - version = "1.33.1"; + version = "1.33.2"; src = fetchFromGitHub { owner = "cri-o"; repo = "cri-o"; rev = "v${version}"; - hash = "sha256-leWFoZ8aMGQgy0JDcbyZ+GX9B6Qdm+f5ng1X0beIcw0="; + hash = "sha256-QHWE0BVsGFk1UOo51wZUl24bisS9GzCeWkE7yM3dYec="; }; vendorHash = null; From 7f7b760c5728b8ad51208d0e3d49f326987539d1 Mon Sep 17 00:00:00 2001 From: Gliczy <129636582+Gliczy@users.noreply.github.com> Date: Wed, 2 Jul 2025 10:45:09 +0200 Subject: [PATCH 26/42] proton-ge-bin: GE-Proton10-7 -> GE-Proton10-8 --- pkgs/by-name/pr/proton-ge-bin/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/pr/proton-ge-bin/package.nix b/pkgs/by-name/pr/proton-ge-bin/package.nix index e0108e5c3f2f..4a6e1c0c0a41 100644 --- a/pkgs/by-name/pr/proton-ge-bin/package.nix +++ b/pkgs/by-name/pr/proton-ge-bin/package.nix @@ -9,11 +9,11 @@ }: stdenvNoCC.mkDerivation (finalAttrs: { pname = "proton-ge-bin"; - version = "GE-Proton10-7"; + version = "GE-Proton10-8"; src = fetchzip { url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/${finalAttrs.version}/${finalAttrs.version}.tar.gz"; - hash = "sha256-XlZVQ+xYgg1H1xAHBcXZmF5//7k6w9NNspXJ/1KhzX8="; + hash = "sha256-cbmOQYWEP/uB2ZoMAbtbeXbOJjxZui0n2U+Tr/OLKjA="; }; dontUnpack = true; From 4a742a231e23efa9911438f2877a4c2301f7a319 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 2 Jul 2025 09:06:41 +0000 Subject: [PATCH 27/42] git-gamble: 2.10.0 -> 2.11.0 --- pkgs/by-name/gi/git-gamble/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/gi/git-gamble/package.nix b/pkgs/by-name/gi/git-gamble/package.nix index d39850168a15..a891eca70350 100644 --- a/pkgs/by-name/gi/git-gamble/package.nix +++ b/pkgs/by-name/gi/git-gamble/package.nix @@ -9,13 +9,13 @@ }: let - version = "2.10.0"; + version = "2.11.0"; src = fetchFromGitLab { owner = "pinage404"; repo = "git-gamble"; rev = "version/${version}"; - hash = "sha256-oWbV3KhDcb/LlDkaGqkrYU/b2LEijUTX0RaHi0yS5cw="; + hash = "sha256-b7jGrt8uJ9arH4EEsOOPCIcQmhwrrJb8uXcSsZPFrNQ="; }; in rustPlatform.buildRustPackage { @@ -23,7 +23,7 @@ rustPlatform.buildRustPackage { inherit version src; useFetchCargoVendor = true; - cargoHash = "sha256-v8sQuFmHHWuLUhRND1CzI5VkybgHRETVyNNabw1Uhyg="; + cargoHash = "sha256-lf66me4ot5lvrz2JTj8MreaHyVwOcFSVfPGX9lBTKug="; nativeCheckInputs = [ gitMinimal ]; preCheck = '' From e8cb3a820434570feef99e1d0fd3590994992354 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 2 Jul 2025 10:27:57 +0000 Subject: [PATCH 28/42] gildas: 20250601_a -> 20250701_a --- pkgs/by-name/gi/gildas/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/gi/gildas/package.nix b/pkgs/by-name/gi/gildas/package.nix index c6ca9514111a..ea7c307ee290 100644 --- a/pkgs/by-name/gi/gildas/package.nix +++ b/pkgs/by-name/gi/gildas/package.nix @@ -24,8 +24,8 @@ let in stdenv.mkDerivation rec { - srcVersion = "jun25a"; - version = "20250601_a"; + srcVersion = "jul25a"; + version = "20250701_a"; pname = "gildas"; src = fetchurl { @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { "http://www.iram.fr/~gildas/dist/gildas-src-${srcVersion}.tar.xz" "http://www.iram.fr/~gildas/dist/archive/gildas/gildas-src-${srcVersion}.tar.xz" ]; - hash = "sha256-DhUGaG96bsZ1NGfDQEujtiM0AUwZBMD42uRpRWI5DX0="; + hash = "sha256-t64lcbdrPXu4II5IGyd9Un6yJGrH+wqKRt5jmr/F5y4="; }; nativeBuildInputs = [ From 7d684b6ca07d8def5ce7c2a90d83f3fcac41c39d Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 2 Jul 2025 11:17:45 +0000 Subject: [PATCH 29/42] wavelog: 2.0.4 -> 2.0.5 --- pkgs/by-name/wa/wavelog/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/wa/wavelog/package.nix b/pkgs/by-name/wa/wavelog/package.nix index f4b8cc30f0ca..33b4e2f3df96 100644 --- a/pkgs/by-name/wa/wavelog/package.nix +++ b/pkgs/by-name/wa/wavelog/package.nix @@ -8,13 +8,13 @@ stdenvNoCC.mkDerivation (finalAttrs: { pname = "wavelog"; - version = "2.0.4"; + version = "2.0.5"; src = fetchFromGitHub { owner = "wavelog"; repo = "wavelog"; tag = finalAttrs.version; - hash = "sha256-P4Rwrm9S6nI7TqFlEpX2MVm5k8l0vnvXWdshgr+7wiQ="; + hash = "sha256-FFPg9VSyOeUPH0bV4fY3e7NKH9vW+JdIeYbAAzCEpiA="; }; installPhase = '' From 819d304a39b027a02da37bbf8956f18a0ca2483e Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Wed, 2 Jul 2025 11:43:13 +0000 Subject: [PATCH 30/42] test-driver: Use futures for OCR parallelization --- .../src/test_driver/machine/ocr.py | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/nixos/lib/test-driver/src/test_driver/machine/ocr.py b/nixos/lib/test-driver/src/test_driver/machine/ocr.py index b4a0eeee4722..f47c2413e950 100644 --- a/nixos/lib/test-driver/src/test_driver/machine/ocr.py +++ b/nixos/lib/test-driver/src/test_driver/machine/ocr.py @@ -1,7 +1,7 @@ -import multiprocessing import os import shutil import subprocess +from concurrent.futures import Future, ThreadPoolExecutor from pathlib import Path from test_driver.errors import MachineError @@ -33,17 +33,19 @@ def perform_ocr_variants_on_screenshot( # Docs suggest to run it with OMP_THREAD_LIMIT=1 for hundreds of parallel # runs. Our average test run is somewhere inbetween. # https://github.com/tesseract-ocr/tesseract/issues/3109 - processes = max(1, int(os.process_cpu_count() / 4)) - with multiprocessing.Pool(processes=processes) as pool: - image_paths: list[Path] = [screenshot_path] + workers = max(1, int(os.process_cpu_count() / 4)) + with ThreadPoolExecutor(max_workers=workers) as e: + # The idea here is to let the first tesseract call run on the raw image + # while the other two are preprocessed + tesseracted in parallel + future_results: list[Future] = [e.submit(_run_tesseract, screenshot_path)] if variants: - image_paths.extend( - pool.starmap( - _preprocess_screenshot, - [(screenshot_path, False), (screenshot_path, True)], - ) - ) - return pool.map(_run_tesseract, image_paths) + + def tesseract_processed(inverted: bool) -> str: + return _run_tesseract(_preprocess_screenshot(screenshot_path, inverted)) + + future_results.append(e.submit(tesseract_processed, False)) + future_results.append(e.submit(tesseract_processed, True)) + return [future.result() for future in future_results] def _run_tesseract(image: Path) -> str: From c0b6b1ef77a470b6c54344eedb8b38c62c1b9dad Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 2 Jul 2025 12:21:12 +0000 Subject: [PATCH 31/42] snort: 3.8.1.0 -> 3.9.1.0 --- pkgs/by-name/sn/snort/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/sn/snort/package.nix b/pkgs/by-name/sn/snort/package.nix index ed050c8fe092..8ea13297dd28 100644 --- a/pkgs/by-name/sn/snort/package.nix +++ b/pkgs/by-name/sn/snort/package.nix @@ -19,13 +19,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "snort"; - version = "3.8.1.0"; + version = "3.9.1.0"; src = fetchFromGitHub { owner = "snort3"; repo = "snort3"; tag = finalAttrs.version; - hash = "sha256-+59e6rLMvLQ+LNxwRRG6nLXqjMsbn3bdykfMpwPgSpA="; + hash = "sha256-Ciseo0mYmgyfZB44zeudEst98XnM8E2vTG5J6snA3q0="; }; nativeBuildInputs = [ From 9ff35e25b57bdfb92bdf461610c925a2929d7460 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 2 Jul 2025 12:45:28 +0000 Subject: [PATCH 32/42] bdf2psf: 1.237 -> 1.239 --- pkgs/by-name/bd/bdf2psf/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/bd/bdf2psf/package.nix b/pkgs/by-name/bd/bdf2psf/package.nix index 1518904c7e58..fe4ceed3098e 100644 --- a/pkgs/by-name/bd/bdf2psf/package.nix +++ b/pkgs/by-name/bd/bdf2psf/package.nix @@ -8,11 +8,11 @@ stdenv.mkDerivation rec { pname = "bdf2psf"; - version = "1.237"; + version = "1.239"; src = fetchurl { url = "mirror://debian/pool/main/c/console-setup/bdf2psf_${version}_all.deb"; - sha256 = "sha256-TdEIXD4COatzgtPm8EGMxQFqqgy/5gkgnZKrze4U2sM="; + sha256 = "sha256-O0hV2OGj5+laVJ+a8rHGPRvThRWoiEUS5g7E3Wam7XY="; }; nativeBuildInputs = [ dpkg ]; From 36bfc51173c6b33e2a1c1041a192d29c394fe66c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 2 Jul 2025 13:02:09 +0000 Subject: [PATCH 33/42] intel-gmmlib: 22.7.2 -> 22.7.3 --- pkgs/by-name/in/intel-gmmlib/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/in/intel-gmmlib/package.nix b/pkgs/by-name/in/intel-gmmlib/package.nix index ab6f950cdfdd..0197c3273edd 100644 --- a/pkgs/by-name/in/intel-gmmlib/package.nix +++ b/pkgs/by-name/in/intel-gmmlib/package.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation rec { pname = "intel-gmmlib"; - version = "22.7.2"; + version = "22.7.3"; src = fetchFromGitHub { owner = "intel"; repo = "gmmlib"; tag = "intel-gmmlib-${version}"; - hash = "sha256-TVravPYbOaZBtS5BepRc316m4uIPm5M1YbDWMV5lW0Y="; + hash = "sha256-3KGDKdhy4jtBVdZYY6fhEEBQYmfYzXoTR7yPAuFqBvI="; }; nativeBuildInputs = [ cmake ]; From 59b4d0de90d4f91025178c8a09399defffd895d6 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 5 Jun 2025 14:00:09 +0200 Subject: [PATCH 34/42] nixos/lib/test-driver: try using XDG_RUNTIME_DIR if available At work we have the use-case that several people connect to a large Linux box to run tests and debug those interactively. All tests write their state into a global `/tmp` -- e.g. the vde1 socket and the VMs' state. This leads to conflicts when multiple people are doing this. This change tries to use XDG_RUNTIME_DIR before using Python's detection of a global temp directory: when connecting, this requires a working user session, but then we get working directories per user. This is preferable over doing something like `mktemp -d` per run since that would break use-cases where you want to keep the VMs' state across multiple sessions (`--keep-vm-state`). --- nixos/lib/test-driver/src/test_driver/driver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/lib/test-driver/src/test_driver/driver.py b/nixos/lib/test-driver/src/test_driver/driver.py index bf3dda06a617..28fce1b300a5 100644 --- a/nixos/lib/test-driver/src/test_driver/driver.py +++ b/nixos/lib/test-driver/src/test_driver/driver.py @@ -39,15 +39,15 @@ def get_tmp_dir() -> Path: Raises an exception in case the retrieved temporary directory is not writeable See https://docs.python.org/3/library/tempfile.html#tempfile.gettempdir """ - tmp_dir = Path(tempfile.gettempdir()) + tmp_dir = Path(os.environ.get("XDG_RUNTIME_DIR", tempfile.gettempdir())) tmp_dir.mkdir(mode=0o700, exist_ok=True) if not tmp_dir.is_dir(): raise NotADirectoryError( - f"The directory defined by TMPDIR, TEMP, TMP or CWD: {tmp_dir} is not a directory" + f"The directory defined by XDG_RUNTIME_DIR, TMPDIR, TEMP, TMP or CWD: {tmp_dir} is not a directory" ) if not os.access(tmp_dir, os.W_OK): raise PermissionError( - f"The directory defined by TMPDIR, TEMP, TMP, or CWD: {tmp_dir} is not writeable" + f"The directory defined by XDG_RUNTIME_DIR, TMPDIR, TEMP, TMP, or CWD: {tmp_dir} is not writeable" ) return tmp_dir From 3a67a7b9f04153915d8221160e99c786e7c7f67a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 2 Jul 2025 13:58:33 +0000 Subject: [PATCH 35/42] eask-cli: 0.11.6 -> 0.11.7 --- pkgs/by-name/ea/eask-cli/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ea/eask-cli/package.nix b/pkgs/by-name/ea/eask-cli/package.nix index ab057ace9d84..92995ff07077 100644 --- a/pkgs/by-name/ea/eask-cli/package.nix +++ b/pkgs/by-name/ea/eask-cli/package.nix @@ -6,16 +6,16 @@ buildNpmPackage rec { pname = "eask-cli"; - version = "0.11.6"; + version = "0.11.7"; src = fetchFromGitHub { owner = "emacs-eask"; repo = "cli"; rev = version; - hash = "sha256-nEqzdjVdlROFkrUa/+TTI/RxVv2F11kr0THeIHEgtog="; + hash = "sha256-k+toSvi7v3ABNR9rJMv2adQ9yMyCrEDl8WLdjpNt/vo="; }; - npmDepsHash = "sha256-/6WSGHSg60MZWhdm3xIG6rIDKrJ1MJb4tlwLTqm6YFM="; + npmDepsHash = "sha256-d3YzVZFwlKN4OabSO4Reu+zxb59lA0zaYKDTsdpYguI="; dontBuild = true; From 26bcb57f3c95701a3891a54e5bda731cbfbba9cf Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Wed, 2 Jul 2025 13:59:15 +0000 Subject: [PATCH 36/42] test-driver: fix number of cores --- nixos/lib/test-driver/src/test_driver/machine/ocr.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/lib/test-driver/src/test_driver/machine/ocr.py b/nixos/lib/test-driver/src/test_driver/machine/ocr.py index f47c2413e950..e601e7af0666 100644 --- a/nixos/lib/test-driver/src/test_driver/machine/ocr.py +++ b/nixos/lib/test-driver/src/test_driver/machine/ocr.py @@ -33,7 +33,10 @@ def perform_ocr_variants_on_screenshot( # Docs suggest to run it with OMP_THREAD_LIMIT=1 for hundreds of parallel # runs. Our average test run is somewhere inbetween. # https://github.com/tesseract-ocr/tesseract/issues/3109 - workers = max(1, int(os.process_cpu_count() / 4)) + nix_cores: str | None = os.environ.get("NIX_BUILD_CORES") + cores: int = os.cpu_count() or 1 if nix_cores is None else int(nix_cores) + workers: int = max(1, int(cores / 4)) + with ThreadPoolExecutor(max_workers=workers) as e: # The idea here is to let the first tesseract call run on the raw image # while the other two are preprocessed + tesseracted in parallel From 546ec2e6211a2fb75189c826cbd7157a1e3579b1 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 2 Jul 2025 15:15:27 +0000 Subject: [PATCH 37/42] distroshelf: 1.0.8 -> 1.0.12 --- pkgs/by-name/di/distroshelf/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/di/distroshelf/package.nix b/pkgs/by-name/di/distroshelf/package.nix index d83c2c58931a..95febb64eadb 100644 --- a/pkgs/by-name/di/distroshelf/package.nix +++ b/pkgs/by-name/di/distroshelf/package.nix @@ -17,13 +17,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "distroshelf"; - version = "1.0.8"; + version = "1.0.12"; src = fetchFromGitHub { owner = "ranfdev"; repo = "DistroShelf"; tag = "v${finalAttrs.version}"; - hash = "sha256-UZP/VohgYUe6Ly89oD9WlYyiAfQmTK1lXnf5TipoiNI="; + hash = "sha256-pNGIwmw75c7Q+lXZBSZnAnIqJqYOPIA9cpAlzv/HjJU="; }; cargoDeps = rustPlatform.fetchCargoVendor { From 9b35decc0384b039dbd0dab40c00014c2f91623d Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Mon, 30 Jun 2025 17:49:45 -0700 Subject: [PATCH 38/42] linux_latest-libre: run hooks in the phases --- pkgs/os-specific/linux/kernel/linux-libre.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-libre.nix b/pkgs/os-specific/linux/kernel/linux-libre.nix index 7f9a48adb1b7..546812e417a4 100644 --- a/pkgs/os-specific/linux/kernel/linux-libre.nix +++ b/pkgs/os-specific/linux/kernel/linux-libre.nix @@ -30,16 +30,30 @@ linux.override { src = stdenv.mkDerivation { name = "${linux.name}-libre-src"; src = linux.src; + buildPhase = '' + runHook preBuild + # --force flag to skip empty files after deblobbing - ${scripts}/${majorMinor}/deblob-${majorMinor} --force \ - ${major} ${minor} ${patch} + ${scripts}/${majorMinor}/deblob-${majorMinor} --force ${major} ${minor} ${patch} + + runHook postBuild ''; + checkPhase = '' + runHook preCheck + ${scripts}/deblob-check + + runHook postCheck ''; + installPhase = '' + runHook preInstall + cp -r . "$out" + + runHook postInstall ''; }; From 6aeeff937ad98633fc0ee654c941dbc830613fa4 Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Mon, 30 Jun 2025 17:50:19 -0700 Subject: [PATCH 39/42] linux_latest-libre: refactor update script to use SRI hashes --- pkgs/os-specific/linux/kernel/update-libre.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/update-libre.sh b/pkgs/os-specific/linux/kernel/update-libre.sh index aea12df55cc5..c1b98ee0d7b6 100755 --- a/pkgs/os-specific/linux/kernel/update-libre.sh +++ b/pkgs/os-specific/linux/kernel/update-libre.sh @@ -6,7 +6,6 @@ nixpkgs="$(git rev-parse --show-toplevel)" path="$nixpkgs/pkgs/os-specific/linux/kernel/linux-libre.nix" old_rev="$(grep -o 'rev = ".*"' "$path" | awk -F'"' '{print $2}')" -old_sha256="$(grep -o 'sha256 = ".*"' "$path" | awk -F'"' '{print $2}')" svn_url=https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/branches/ rev="$(curl -s "$svn_url" | grep -Em 1 -o 'Revision [0-9]+' | awk '{print $2}')" @@ -16,15 +15,16 @@ if [ "$old_rev" = "$rev" ]; then exit 0 fi +old_hash="$(grep -o 'hash = ".*"' "$path" | awk -F'"' '{print $2}')" sha256="$(QUIET=1 nix-prefetch-svn "$svn_url" "$rev" | tail -1)" +new_hash="$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 "$sha256")" -if [ "$old_sha256" = "$sha256" ]; then +if [ "$old_hash" = "$new_hash" ]; then echo "No updates for linux-libre" exit 0 fi -sed -i -e "s/rev = \".*\"/rev = \"$rev\"/" \ - -e "s/sha256 = \".*\"/sha256 = \"$sha256\"/" "$path" +sed -i -e "s,rev = \".*\",rev = \"$rev\",; s,hash = \".*\",hash = \"$new_hash\"," "$path" if [ -n "${COMMIT-}" ]; then git commit -qm "linux_latest-libre: $old_rev -> $rev" "$path" \ From 4cb34ef9dfad0e29d71dd7fcf22d82a996d8ba83 Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Mon, 30 Jun 2025 17:51:00 -0700 Subject: [PATCH 40/42] linux_latest-libre: 19812 -> 19835 --- pkgs/os-specific/linux/kernel/linux-libre.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-libre.nix b/pkgs/os-specific/linux/kernel/linux-libre.nix index 546812e417a4..a087f288e860 100644 --- a/pkgs/os-specific/linux/kernel/linux-libre.nix +++ b/pkgs/os-specific/linux/kernel/linux-libre.nix @@ -5,8 +5,8 @@ linux, scripts ? fetchsvn { url = "https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/branches/"; - rev = "19812"; - sha256 = "1bhkc0r5p3d4mmmi26k5lsk56jgbc8hi46bfih313hxmrnsd07dy"; + rev = "19835"; + hash = "sha256-5usyLmlTr5nlM+/uWPQepzhhNSLi3Hol1BfnWb9CFws="; }, ... }@args: From 4eec50db91c0e20d64231351003fa8a4a28aa05e Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 2 Jul 2025 17:43:08 +0200 Subject: [PATCH 41/42] typstyle: 0.13.11 -> 0.13.13 Diff: https://github.com/Enter-tainer/typstyle/compare/refs/tags/v0.13.11...refs/tags/v0.13.13 Changelog: https://github.com/Enter-tainer/typstyle/blob/v0.13.13/CHANGELOG.md --- pkgs/by-name/ty/typstyle/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ty/typstyle/package.nix b/pkgs/by-name/ty/typstyle/package.nix index a2a335e970e3..92813caad98d 100644 --- a/pkgs/by-name/ty/typstyle/package.nix +++ b/pkgs/by-name/ty/typstyle/package.nix @@ -8,17 +8,17 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "typstyle"; - version = "0.13.11"; + version = "0.13.13"; src = fetchFromGitHub { owner = "Enter-tainer"; repo = "typstyle"; tag = "v${finalAttrs.version}"; - hash = "sha256-fp6UcWD56wWyrk3ZTS1YksydNw0e40NV7dY7Mams3ww="; + hash = "sha256-IAKCwKekeFekHBjfdC4pi74SXJzCDFoby3n1Z0Pu5q4="; }; useFetchCargoVendor = true; - cargoHash = "sha256-BkS/xfVuU3FLjEkE1KEq0K5dNoUSP4XoDkpXLa8Z5Wo="; + cargoHash = "sha256-7TkL/bYcTFAPvr4gu5XPxcJdIuwpTyZ6aOEj/YB9F4I="; # Disabling tests requiring network access checkFlags = [ From 589257bf13b0f2405ac0c75138c73f880fff4e0c Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Wed, 2 Jul 2025 19:40:23 +0800 Subject: [PATCH 42/42] lact: 0.7.4 -> 0.8.0 commits: https://github.com/ilya-zlobintsev/LACT/compare/v0.7.4...v0.8.0 release notes: https://github.com/ilya-zlobintsev/LACT/releases/tag/v0.8.0 --- pkgs/by-name/la/lact/package.nix | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/la/lact/package.nix b/pkgs/by-name/la/lact/package.nix index 77a26fa4073f..9025e5247f61 100644 --- a/pkgs/by-name/la/lact/package.nix +++ b/pkgs/by-name/la/lact/package.nix @@ -18,21 +18,22 @@ hwdata, fuse3, autoAddDriverRunpath, + fetchpatch, }: rustPlatform.buildRustPackage (finalAttrs: { pname = "lact"; - version = "0.7.4"; + version = "0.8.0"; src = fetchFromGitHub { owner = "ilya-zlobintsev"; repo = "LACT"; tag = "v${finalAttrs.version}"; - hash = "sha256-zOvFWl78INlpCcEHiB3qZdxPNHXfUeKxfHyrO+wVNN0="; + hash = "sha256-HsDVz9Wd1WoGWIB4Cs/GsvC7RDyHAeXfFGXZDWEmo/c="; }; useFetchCargoVendor = true; - cargoHash = "sha256-10FdXUpLL+8xN818toShccgB5NfpzrOLfEeDAX5oMFw="; + cargoHash = "sha256-fgF7gOXxB9sQqA5H1hw6A0Fb5tTBPySAbSxVhcKVhcM="; nativeBuildInputs = [ pkg-config @@ -68,14 +69,20 @@ rustPlatform.buildRustPackage (finalAttrs: { ] ); + patches = [ + (fetchpatch { + name = "fix-tests::snapshot_everything-due-to-outdated-hwdata-649.patch"; + url = "https://github.com/ilya-zlobintsev/LACT/commit/c9a59e48a36d590d7522c22bd15a8f9208bef0ee.patch"; + hash = "sha256-Ehq8vRosqyqpRPeabkdpBHBF6ONqSJHOeq3AXw8PXPU="; + }) + ]; + postPatch = '' - substituteInPlace lact-daemon/src/server/system.rs \ - --replace-fail 'Command::new("uname")' 'Command::new("${coreutils}/bin/uname")' - substituteInPlace lact-daemon/src/server/profiles.rs \ + substituteInPlace lact-daemon/src/system.rs \ --replace-fail 'Command::new("uname")' 'Command::new("${coreutils}/bin/uname")' substituteInPlace lact-daemon/src/server/handler.rs \ - --replace-fail 'Command::new("journalctl")' 'Command::new("${systemdMinimal}/bin/journalctl")' + --replace-fail 'run_command("journalctl",' 'run_command("${systemdMinimal}/bin/journalctl",' substituteInPlace lact-daemon/src/server/vulkan.rs \ --replace-fail 'Command::new("vulkaninfo")' 'Command::new("${vulkan-tools}/bin/vulkaninfo")'