From 0bb003b121330ff57cdcf41909085eb6c1f2396b Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Fri, 26 Mar 2021 11:59:48 +0100 Subject: pkgs/profpatsch/write-rust: use s6-portable-utils MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We had a bunch of instances of https://github.com/NixOS/nix/issues/2176, where nix would exit with a “killed by signal 9” error. According to Eelco in that issue, this is perfectly normal behaviour of course, and appears if the last command in a loop closes `stdout` or `stdin`, then the builder will SIGKILL it immediately. This is of course also a perfectly fine error message for that case. It turns out that mainly GNU coreutils exhibit this behaviour … Let’s see if using a more sane tool suite fixes that. --- pkgs/profpatsch/write-rust.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pkgs/profpatsch/write-rust.nix') diff --git a/pkgs/profpatsch/write-rust.nix b/pkgs/profpatsch/write-rust.nix index adb10950..bb114117 100644 --- a/pkgs/profpatsch/write-rust.nix +++ b/pkgs/profpatsch/write-rust.nix @@ -1,13 +1,13 @@ { pkgs, runExeclineLocal, getBins, drvSeqL }: let - bins = getBins pkgs.coreutils [ "ln" "ls" "touch" ]; + bins = getBins pkgs.s6-portable-utils [ "s6-ln" "s6-ls" "s6-touch" ]; writeRustSimple = name: args: srcFile: linkTo name "${writeRustSimpleBin name args srcFile}/bin/${name}"; linkTo = name: path: runExeclineLocal name {} [ "importas" "out" "out" - bins.ln "-sT" path "$out" + "if" [ bins.s6-ln "-sT" path "$out" ] ]; writeRustSimpleBin = name: { dependencies ? [], ... }@args: srcFile: pkgs.buildRustCrate ({ @@ -51,12 +51,12 @@ let tests = runExeclineLocal "${rustDrv.name}-tests-run" {} [ "importas" "out" "out" "if" [ - "pipeline" [ bins.ls "${crate true}/tests" ] + "pipeline" [ bins.s6-ls "${crate true}/tests" ] "forstdin" "-o0" "test" "importas" "test" "test" "${crate true}/tests/$test" ] - bins.touch "$out" + bins.s6-touch "$out" ]; in drvSeqL [ tests ] (crate false); -- cgit 1.4.1