Commit 5caefc695f3b

Vincent Demeester <vincent@sbr.pm>
2026-01-08 11:59:27
fix(nixpkgs): Address pre-commit hook issues in consolidation tool
- Remove unused lambda patterns from package definition - Fix shellcheck SC2155 warnings by separating variable declarations Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 557a793
Changed files (2)
tools
tools/nixpkgs-consolidate/default.nix
@@ -1,11 +1,4 @@
-{
-  lib,
-  stdenv,
-  bash,
-  git,
-  curl,
-  coreutils,
-}:
+{ lib, stdenv }:
 
 stdenv.mkDerivation {
   pname = "nixpkgs-consolidate";
tools/nixpkgs-consolidate/nixpkgs-consolidate.sh
@@ -232,13 +232,15 @@ consolidate_branches() {
     fi
 
     # Count commits
-    local branch_commit_count=$(echo "$COMMITS" | wc -l)
+    local branch_commit_count
+    branch_commit_count=$(echo "$COMMITS" | wc -l)
     log "Found $branch_commit_count commit(s) to cherry-pick"
 
     # Cherry-pick each commit
     for commit in $COMMITS; do
       FAILED_COMMIT="$commit"
-      local commit_msg=$(git log -1 --pretty=format:%s "$commit")
+      local commit_msg
+      commit_msg=$(git log -1 --pretty=format:%s "$commit")
       log "Cherry-picking $commit: $commit_msg"
 
       if ! git cherry-pick "$commit" 2>&1 | tee -a "$LOG_FILE"; then
@@ -325,7 +327,8 @@ main() {
   fi
 
   # Success notification
-  local branches_str=$(IFS=$'\n'; echo "${COMPLETED_BRANCHES[*]}")
+  local branches_str
+  branches_str=$(IFS=$'\n'; echo "${COMPLETED_BRANCHES[*]}")
   local success_msg="Consolidated ${#COMPLETED_BRANCHES[@]} branch(es) into $NIXPKGS_CONSOLIDATED_BRANCH
 
 Base: $BASE_BRANCH