summary refs log tree commit diff
diff options
context:
space:
mode:
authorYarny0 <41838844+Yarny0@users.noreply.github.com>2021-05-08 21:34:09 +0200
committerYarny0 <41838844+Yarny0@users.noreply.github.com>2021-05-14 05:42:18 +0200
commit4415846d5cbb0e1128f2042288037b85b231219e (patch)
tree3bef52e662792dcf51ad7942b2028c31a4c40160
parent89df33f882473f714162ead43288455d6192a35a (diff)
downloadnixpkgs-4415846d5cbb0e1128f2042288037b85b231219e.tar
nixpkgs-4415846d5cbb0e1128f2042288037b85b231219e.tar.gz
nixpkgs-4415846d5cbb0e1128f2042288037b85b231219e.tar.bz2
nixpkgs-4415846d5cbb0e1128f2042288037b85b231219e.tar.lz
nixpkgs-4415846d5cbb0e1128f2042288037b85b231219e.tar.xz
nixpkgs-4415846d5cbb0e1128f2042288037b85b231219e.tar.zst
nixpkgs-4415846d5cbb0e1128f2042288037b85b231219e.zip
nixos/hylafax: use `runtimeShell` where possible
According to
https://github.com/NixOS/nixpkgs/pull/84556
this effort helps with cross-compilation.

This commit also renames a substituted variable `hylafax`
to `hylafaxplus` to permit substitution with `inherit`.
-rwxr-xr-xnixos/modules/services/networking/hylafax/faxq-wait.sh2
-rwxr-xr-xnixos/modules/services/networking/hylafax/spool.sh6
-rw-r--r--nixos/modules/services/networking/hylafax/systemd.nix5
3 files changed, 6 insertions, 7 deletions
diff --git a/nixos/modules/services/networking/hylafax/faxq-wait.sh b/nixos/modules/services/networking/hylafax/faxq-wait.sh
index 8c39e9d20c1..1826aa30e62 100755
--- a/nixos/modules/services/networking/hylafax/faxq-wait.sh
+++ b/nixos/modules/services/networking/hylafax/faxq-wait.sh
@@ -1,4 +1,4 @@
-#! @shell@ -e
+#! @runtimeShell@ -e
 
 # skip this if there are no modems at all
 if ! stat -t "@spoolAreaPath@"/etc/config.* >/dev/null 2>&1
diff --git a/nixos/modules/services/networking/hylafax/spool.sh b/nixos/modules/services/networking/hylafax/spool.sh
index 31e930e8c59..8b723df77df 100755
--- a/nixos/modules/services/networking/hylafax/spool.sh
+++ b/nixos/modules/services/networking/hylafax/spool.sh
@@ -1,4 +1,4 @@
-#! @shell@ -e
+#! @runtimeShell@ -e
 
 # The following lines create/update the HylaFAX spool directory:
 # Subdirectories/files with persistent data are kept,
@@ -80,7 +80,7 @@ touch clientlog faxcron.lastrun xferfaxlog
 chown @faxuser@:@faxgroup@ clientlog faxcron.lastrun xferfaxlog
 
 # create symlinks for frozen directories/files
-lnsym --target-directory=. "@hylafax@"/spool/{COPYRIGHT,bin,config}
+lnsym --target-directory=. "@hylafaxplus@"/spool/{COPYRIGHT,bin,config}
 
 # create empty temporary directories
 update --mode=0700 -d client dev status
@@ -93,7 +93,7 @@ install -d "@spoolAreaPath@/etc"
 cd "@spoolAreaPath@/etc"
 
 # create symlinks to all files in template's etc
-lnsym --target-directory=. "@hylafax@/spool/etc"/*
+lnsym --target-directory=. "@hylafaxplus@/spool/etc"/*
 
 # set LOCKDIR in setup.cache
 sed --regexp-extended 's|^(UUCP_LOCKDIR=).*$|\1'"'@lockPath@'|g" --in-place setup.cache
diff --git a/nixos/modules/services/networking/hylafax/systemd.nix b/nixos/modules/services/networking/hylafax/systemd.nix
index 137698ef83d..251a6f6457f 100644
--- a/nixos/modules/services/networking/hylafax/systemd.nix
+++ b/nixos/modules/services/networking/hylafax/systemd.nix
@@ -47,13 +47,12 @@ let
     name = "hylafax-setup-spool.sh";
     src = ./spool.sh;
     isExecutable = true;
-    inherit (pkgs.stdenv) shell;
-    hylafax = pkgs.hylafaxplus;
     faxuser = "uucp";
     faxgroup = "uucp";
     lockPath = "/var/lock";
     inherit globalConfigPath modemConfigPath;
     inherit (cfg) sendmailPath spoolAreaPath userAccessFile;
+    inherit (pkgs) hylafaxplus runtimeShell;
   };
 
   waitFaxqScript = pkgs.substituteAll {
@@ -63,8 +62,8 @@ let
     src = ./faxq-wait.sh;
     isExecutable = true;
     timeoutSec = toString 10;
-    inherit (pkgs.stdenv) shell;
     inherit (cfg) spoolAreaPath;
+    inherit (pkgs) runtimeShell;
   };
 
   sockets.hylafax-hfaxd = {