diff options
author | Profpatsch <mail@profpatsch.de> | 2021-03-25T21·50+0100 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2021-03-26T11·01+0000 |
commit | 4a33ce1dc141c0e377dbebff8708afd494c24f04 (patch) | |
tree | 61b418d81c358dafb8474b56b0c34c7a92e05766 /users | |
parent | 45f5eb97a64c6c56c431a805b4facb2935f5a9f0 (diff) |
fix(users/Profpatsch/writers): use s6-portable-utils r/2335
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. Change-Id: If34ab692120e5e299575bf8044aa5802145ab494 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2658 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
Diffstat (limited to 'users')
-rw-r--r-- | users/Profpatsch/writers/default.nix | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/users/Profpatsch/writers/default.nix b/users/Profpatsch/writers/default.nix index 4f7478bc2fe5..ee3ac7bda782 100644 --- a/users/Profpatsch/writers/default.nix +++ b/users/Profpatsch/writers/default.nix @@ -1,6 +1,7 @@ { depot, pkgs, lib, ... }: let - bins = depot.nix.getBins pkgs.coreutils ["printf" "mkdir" "cat" "ln" "ls" "touch" ]; + bins = depot.nix.getBins pkgs.s6-portable-utils ["s6-mkdir" "s6-cat" "s6-ln" "s6-ls" "s6-touch" ] + // depot.nix.getBins pkgs.coreutils ["printf" ]; inherit (depot.nix.yants) defun struct restrict attrs list string drv any; @@ -41,7 +42,7 @@ let python3Lib = { name, libraries ? (_: []) }: moduleString: let srcTree = depot.nix.runExecline.local name { stdin = moduleString; } [ "importas" "out" "out" - "if" [ bins.mkdir "-p" "\${out}/${name}" ] + "if" [ bins.s6-mkdir "-p" "\${out}/${name}" ] "if" [ "redirfd" "-w" "1" "\${out}/setup.py" bins.printf '' @@ -56,7 +57,7 @@ let "if" [ # redirect stdin to the init py "redirfd" "-w" "1" "\${out}/${name}/__init__.py" - bins.cat + bins.s6-cat ] ]; in pkgs.python3Packages.buildPythonPackage { @@ -71,7 +72,7 @@ let linkTo = name: path: depot.nix.runExecline.local name {} [ "importas" "out" "out" - bins.ln "-sT" path "$out" + bins.s6-ln "-s" path "$out" ]; rustSimpleBin = { @@ -129,12 +130,12 @@ let tests = depot.nix.runExecline.local "${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); |