about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsternenseemann <sternenseemann@systemli.org>2023-04-10 14:42:16 +0200
committersternenseemann <sternenseemann@systemli.org>2023-04-10 14:42:16 +0200
commitb1fcde65e2b1adaaa3e9069d7722ee2b70c5a38f (patch)
tree0c958e3093cff20da48ebdd71378deedd531cc18
parent3b0a1c8f61b941df0abe9baf4e673d0846a6ce0f (diff)
treewide: s6-test is dead, long live eltest! s6-test-removed
Recent versions of s6-portable-utils no longer include s6-test
which was deprecated in favor of eltest which supposedly has the
same interface.

I've not tested this commit very thoroughly, but my system now builds
again with recent nixpkgs commits (I think I dependended on s6-test
via the rust writer via nman).

cc @Profpatsch
-rw-r--r--modules/user/profpatsch/programs/weechat.nix5
-rw-r--r--pkgs/profpatsch/default.nix3
-rw-r--r--pkgs/profpatsch/execline/e.nix2
-rw-r--r--pkgs/profpatsch/execline/run-execline-tests.nix2
-rw-r--r--pkgs/profpatsch/execline/symlink.nix3
-rw-r--r--pkgs/profpatsch/xdg-open/default.nix8
6 files changed, 12 insertions, 11 deletions
diff --git a/modules/user/profpatsch/programs/weechat.nix b/modules/user/profpatsch/programs/weechat.nix
index 2373598f..5870d078 100644
--- a/modules/user/profpatsch/programs/weechat.nix
+++ b/modules/user/profpatsch/programs/weechat.nix
@@ -27,8 +27,9 @@ let
   bins = getBins pkgs.tmux [ "tmux" ]
     // getBins weechat-with-scripts [ "weechat" ]
     // getBins pkgs.dash [ "dash" ]
-    // getBins pkgs.s6-portable-utils [ "s6-sleep" "s6-test" ]
+    // getBins pkgs.s6-portable-utils [ "s6-sleep" ]
     // getBins pkgs.mosh [ "mosh-server" ]
+    // getBins pkgs.execline [ "eltest" ]
     ;
 
 
@@ -60,7 +61,7 @@ let
   attachWeechatTmuxSession = writeExecline "attach-weechat-tmux-session" {} [
     "importas" "-u" "-D" "" "what" "SSH_ORIGINAL_COMMAND"
     # if the user passes "ssh" as argv, it will call tmux directly
-    "ifelse" [ bins.s6-test "$what" "=" "ssh" ]
+    "ifelse" [ bins.eltest "$what" "=" "ssh" ]
     [ bins.tmux "attach-session" "-t" sessionName ]
     # if not, it uses the mosh-server (default)
     bins.mosh-server "--"
diff --git a/pkgs/profpatsch/default.nix b/pkgs/profpatsch/default.nix
index 3ed7c38f..2e0e9932 100644
--- a/pkgs/profpatsch/default.nix
+++ b/pkgs/profpatsch/default.nix
@@ -87,11 +87,12 @@ let
         inherit stdenv;
         bin = (getBins pkgs.execline [
                  "execlineb"
+                 "eltest"
                  { use = "if"; as = "execlineIf"; }
                  "redirfd" "importas"
                ])
            // (getBins pkgs.s6-portable-utils
-                [ "s6-cat" "s6-grep" "s6-touch" "s6-test" "s6-chmod" ]);
+                [ "s6-cat" "s6-grep" "s6-touch" "s6-chmod" ]);
        };
     in {
       runExecline = it;
diff --git a/pkgs/profpatsch/execline/e.nix b/pkgs/profpatsch/execline/e.nix
index 4c569bcd..5f8ac16a 100644
--- a/pkgs/profpatsch/execline/e.nix
+++ b/pkgs/profpatsch/execline/e.nix
@@ -2,7 +2,7 @@
 let
 
   bins = getBins pkgs.rlwrap [ "rlwrap" ]
-    // getBins pkgs.s6-portable-utils [ { use = "s6-cat"; as = "cat"; } "s6-test" ]
+    // getBins pkgs.s6-portable-utils [ { use = "s6-cat"; as = "cat"; } ]
     // getBins pkgs.execline [ "execlineb" ];
 
   # minimal execline shell
diff --git a/pkgs/profpatsch/execline/run-execline-tests.nix b/pkgs/profpatsch/execline/run-execline-tests.nix
index c3f534cc..5482a643 100644
--- a/pkgs/profpatsch/execline/run-execline-tests.nix
+++ b/pkgs/profpatsch/execline/run-execline-tests.nix
@@ -81,7 +81,7 @@ let
     };
   } [
     "importas" "-ui" "v" "myvar"
-    "if" [ bin.s6-test "myvalue" "=" "$v" ]
+    "if" [ bin.eltest "myvalue" "=" "$v" ]
       "importas" "out" "out"
       bin.s6-touch "$out"
   ];
diff --git a/pkgs/profpatsch/execline/symlink.nix b/pkgs/profpatsch/execline/symlink.nix
index 30c21ea4..8791c312 100644
--- a/pkgs/profpatsch/execline/symlink.nix
+++ b/pkgs/profpatsch/execline/symlink.nix
@@ -13,7 +13,6 @@ runExecline name {
         (toNetstring dest + (toNetstring orig)))
       links;
     passAsFile = [ "pathTuples" ];
-    # bah! coreutils just for cat :(
     PATH = lib.makeBinPath [ s6-portable-utils ];
   };
 } [
@@ -31,7 +30,7 @@ runExecline name {
       "s6-mkdir" "-p" "$d"
     ]
 
-    "ifthenelse" [ "s6-test" "-L" "$orig" ] [
+    "ifthenelse" [ "eltest" "-L" "$orig" ] [
       "backtick" "-n" "res" [ "s6-linkname" "-f" "$orig" ]
       "importas" "-ui" "res" "res"
       "s6-ln" "-fs" "$res" "$dest"
diff --git a/pkgs/profpatsch/xdg-open/default.nix b/pkgs/profpatsch/xdg-open/default.nix
index c23adeb9..f10e13a6 100644
--- a/pkgs/profpatsch/xdg-open/default.nix
+++ b/pkgs/profpatsch/xdg-open/default.nix
@@ -17,7 +17,7 @@ let
       // getBins pkgs.coreutils [ "printf" "ln" "echo" ]
       // getBins pkgs.fdtools [ "multitee" ]
       // getBins pkgs.s6 [ "s6-ioconnect" ]
-      // getBins pkgs.s6-portable-utils [ "s6-test" ]
+      // getBins pkgs.execline [ "eltest" ]
       // getBins pkgs.s6-networking [ "s6-tcpclient" ]
       // getBins pkgs.libressl.nc [ "nc" ]
       // getBins pkgs.dmenu [ "dmenu" "dmenu_path" ]
@@ -199,8 +199,8 @@ let
 
   http-request = writeExecline "http-request" { } [
     "importas" "-i" "protocol" "protocol"
-    "ifelse" [ bins.s6-test "$protocol" "=" "http" ] [ (http-https-request false) ]
-    "ifelse" [ bins.s6-test "$protocol" "=" "https" ] [ (http-https-request true) ]
+    "ifelse" [ bins.eltest "$protocol" "=" "http" ] [ (http-https-request false) ]
+    "ifelse" [ bins.eltest "$protocol" "=" "https" ] [ (http-https-request true) ]
     eprintf "protocol \${protocol} not supported"
   ];
 
@@ -274,7 +274,7 @@ let
       record-get [ "status" "status-text" "headers" ]
       "importas" "-ui" "status" "status"
       # TODO: a test util for netencode values
-      "ifelse" [ bins.s6-test "$status" "=" "n6:301," ]
+      "ifelse" [ bins.eltest "$status" "=" "n6:301," ]
       # retry the redirection location
       [ as-stdin "headers"
         record-get [ "Location" ]