From 943351e368caf91e7cc548cd53429cf6425c202d Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Wed, 30 Jul 2025 09:08:53 +0200 Subject: [PATCH 1/2] redo-apenwarr: Use substituteInPlace with --replace-fail Previously used --replace is deprecated. --- pkgs/by-name/re/redo-apenwarr/package.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/re/redo-apenwarr/package.nix b/pkgs/by-name/re/redo-apenwarr/package.nix index 45ea6d9c2d768..4453f3805ce7e 100644 --- a/pkgs/by-name/re/redo-apenwarr/package.nix +++ b/pkgs/by-name/re/redo-apenwarr/package.nix @@ -31,19 +31,19 @@ stdenv.mkDerivation rec { unset CC CXX substituteInPlace minimal/do.test \ - --replace "/bin/pwd" "${coreutils}/bin/pwd" + --replace-fail "/bin/pwd" "${coreutils}/bin/pwd" substituteInPlace t/105-sympath/all.do \ - --replace "/bin/pwd" "${coreutils}/bin/pwd" + --replace-fail "/bin/pwd" "${coreutils}/bin/pwd" substituteInPlace t/all.do \ - --replace "/bin/ls" "ls" + --replace-fail "/bin/ls" "ls" substituteInPlace t/110-compile/hello.o.do \ - --replace "/usr/include" "${lib.getDev stdenv.cc.libc}/include" + --replace-fail "/usr/include" "${lib.getDev stdenv.cc.libc}/include" substituteInPlace t/200-shell/nonshelltest.do \ - --replace "/usr/bin/env perl" "${perl}/bin/perl" + --replace-fail "/usr/bin/env perl" "${perl}/bin/perl" ''; From 24491685b48f8b07a214839b10c232dc903c283c Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Wed, 30 Jul 2025 09:11:59 +0200 Subject: [PATCH 2/2] redo-apenwarr: Fix failure with bash-5.3 The failure manifests as: minimal/do: line 358: cd: null directory In bash 5.3, command "cd ''" fails, while in the previous bash version it succeeds and no directory is changed. In the fix, we replace empty "$dodir" with ".". Context: - https://github.com/apenwarr/redo/pull/47 - https://cgit.git.savannah.gnu.org/cgit/bash.git/tree/CHANGES?h=bash-5.3#n119. - https://lists.gnu.org/archive/html/bug-bash/2025-07/msg00152.html --- pkgs/by-name/re/redo-apenwarr/package.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/by-name/re/redo-apenwarr/package.nix b/pkgs/by-name/re/redo-apenwarr/package.nix index 4453f3805ce7e..cffdff90ba646 100644 --- a/pkgs/by-name/re/redo-apenwarr/package.nix +++ b/pkgs/by-name/re/redo-apenwarr/package.nix @@ -45,6 +45,9 @@ stdenv.mkDerivation rec { substituteInPlace t/200-shell/nonshelltest.do \ --replace-fail "/usr/bin/env perl" "${perl}/bin/perl" + # See https://github.com/apenwarr/redo/pull/47 + substituteInPlace minimal/do \ + --replace-fail 'cd "$dodir"' 'cd "''${dodir:-.}"' ''; inherit doCheck;