mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 01:55:22 +08:00
Revert "packages.chn-bsub: use fixed bash"
This reverts commit 9595bed7c0.
This commit is contained in:
@@ -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";
|
name = "chn-bsub";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
buildInputs = [ ftxui biu ];
|
buildInputs = [ ftxui biu ];
|
||||||
nativeBuildInputs = [ cmake pkg-config ];
|
nativeBuildInputs = [ cmake pkg-config ];
|
||||||
postInstall = "ln -s chn-bsub $out/bin/chn_bsub";
|
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; };
|
passthru = { inherit bsubConfig; };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,9 +8,6 @@
|
|||||||
# ifndef BSUB_CONFIG
|
# ifndef BSUB_CONFIG
|
||||||
# define BSUB_CONFIG "./bsub.yaml"
|
# define BSUB_CONFIG "./bsub.yaml"
|
||||||
# endif
|
# endif
|
||||||
# ifndef BSUB_SH
|
|
||||||
# define BSUB_SH "/bin/sh"
|
|
||||||
# endif
|
|
||||||
|
|
||||||
using namespace biu::literals;
|
using namespace biu::literals;
|
||||||
|
|
||||||
@@ -169,8 +166,8 @@ int main()
|
|||||||
// 提交任务
|
// 提交任务
|
||||||
log.debug("submit command: {}"_f(State.SubmitCommand));
|
log.debug("submit command: {}"_f(State.SubmitCommand));
|
||||||
// -c 对 \\n 的处理与通常情况下不同,我们需要用 -s 然后将命令通过标准输入传入
|
// -c 对 \\n 的处理与通常情况下不同,我们需要用 -s 然后将命令通过标准输入传入
|
||||||
biu::exec<{.Stdin = biu::IoType::String}>
|
biu::exec<{.SearchPath = true, .Stdin = biu::IoType::String}>
|
||||||
({.Program = BSUB_SH, .Args = { "-s"}, .Stdin = State.SubmitCommand});
|
({.Program = "sh", .Args = { "-s"}, .Stdin = State.SubmitCommand});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (!State.UserCommand) return EXIT_FAILURE;
|
else if (!State.UserCommand) return EXIT_FAILURE;
|
||||||
|
|||||||
Reference in New Issue
Block a user