From a530361ef2b70186ea6dec789790ac57de1f58f4 Mon Sep 17 00:00:00 2001 From: Katsumi Takeuchi Date: Sat, 27 Jun 2026 18:19:08 +0900 Subject: [PATCH] blesh: patch build helper shebangs Assisted-by: Codex CLI with gpt-5.5 default (OpenAI) --- pkgs/by-name/bl/blesh/package.nix | 8 ++++---- pkgs/by-name/bl/blesh/skip-readonly-runtime-dir.patch | 10 ---------- 2 files changed, 4 insertions(+), 14 deletions(-) delete mode 100644 pkgs/by-name/bl/blesh/skip-readonly-runtime-dir.patch diff --git a/pkgs/by-name/bl/blesh/package.nix b/pkgs/by-name/bl/blesh/package.nix index 38f0304d1509..74fba950d70b 100644 --- a/pkgs/by-name/bl/blesh/package.nix +++ b/pkgs/by-name/bl/blesh/package.nix @@ -28,10 +28,6 @@ stdenvNoCC.mkDerivation (finalAttrs: { # Fix the cache invalidation not working; see # https://github.com/NixOS/nixpkgs/pull/521218#issuecomment-4641313131 ./fix-cache-invalidation.patch - # ble.sh reaches a runtime-dir fallback under the install base when the - # others are unusable (always on WSL); see - # https://github.com/NixOS/nixpkgs/pull/521218#issuecomment-4686973408 - ./skip-readonly-runtime-dir.patch ]; # ble.sh embeds the commit id, normally read from .git, which fetchFromGitHub omits. @@ -41,6 +37,10 @@ stdenvNoCC.mkDerivation (finalAttrs: { "BLE_GIT_BRANCH=master" ]; + postPatch = '' + patchShebangs --build make_command.sh make + ''; + doCheck = true; # auto-detection runs `make -n check` without makeFlags, which fails without BLE_GIT_COMMIT_ID checkTarget = "check"; diff --git a/pkgs/by-name/bl/blesh/skip-readonly-runtime-dir.patch b/pkgs/by-name/bl/blesh/skip-readonly-runtime-dir.patch deleted file mode 100644 index e03f56fc2646..000000000000 --- a/pkgs/by-name/bl/blesh/skip-readonly-runtime-dir.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/ble.pp -+++ b/ble.pp -@@ -1934,6 +1934,7 @@ - function ble/base/initialize-runtime-directory/.base { - local tmp_dir=$_ble_base/run - if [[ ! -d $tmp_dir ]]; then -+ [[ -w $_ble_base ]] || return 1 - ble/bin/mkdir -p "$tmp_dir" || return 1 - ble/bin/chmod a+rwxt "$tmp_dir" || return 1 - fi