Revert "packages.chn-bsub: use fixed bash"

This reverts commit 9595bed7c0.
This commit is contained in:
2026-01-03 16:58:50 +08:00
parent 9595bed7c0
commit 0416427642
2 changed files with 4 additions and 7 deletions

View File

@@ -1,10 +1,10 @@
{ stdenv, cmake, pkg-config, ftxui, biu, bsubConfig ? null, lib, bash }: stdenv.mkDerivation
{ stdenv, cmake, pkg-config, ftxui, biu, bsubConfig ? null, lib }: stdenv.mkDerivation
{
name = "chn-bsub";
src = ./.;
buildInputs = [ ftxui biu ];
nativeBuildInputs = [ cmake pkg-config ];
postInstall = "ln -s chn-bsub $out/bin/chn_bsub";
cmakeFlags = [ "-DBSUB_SH=${bash}/bin/sh" ] ++ lib.optionals (bsubConfig != null) [ "-DBSUB_CONFIG=${bsubConfig}" ];
cmakeFlags = lib.optional (bsubConfig != null) [ "-DBSUB_CONFIG=${bsubConfig}" ];
passthru = { inherit bsubConfig; };
}

View File

@@ -8,9 +8,6 @@
# ifndef BSUB_CONFIG
# define BSUB_CONFIG "./bsub.yaml"
# endif
# ifndef BSUB_SH
# define BSUB_SH "/bin/sh"
# endif
using namespace biu::literals;
@@ -169,8 +166,8 @@ int main()
// 提交任务
log.debug("submit command: {}"_f(State.SubmitCommand));
// -c 对 \\n 的处理与通常情况下不同,我们需要用 -s 然后将命令通过标准输入传入
biu::exec<{.Stdin = biu::IoType::String}>
({.Program = BSUB_SH, .Args = { "-s"}, .Stdin = State.SubmitCommand});
biu::exec<{.SearchPath = true, .Stdin = biu::IoType::String}>
({.Program = "sh", .Args = { "-s"}, .Stdin = State.SubmitCommand});
break;
}
else if (!State.UserCommand) return EXIT_FAILURE;