summaryrefslogtreecommitdiff
path: root/custom/uucp-mediaserver/scripts.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2018-04-05 22:05:05 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2018-04-05 22:05:05 +0200
commitaf359b71b000651812e1ee70638b480502eba0ec (patch)
tree8f246fa120b54c29f3bdf64e8e3b389ec5311851 /custom/uucp-mediaserver/scripts.nix
parentfbc53fdb0e012524b1a22083d19a6928cc87870e (diff)
downloadnixos-af359b71b000651812e1ee70638b480502eba0ec.tar
nixos-af359b71b000651812e1ee70638b480502eba0ec.tar.gz
nixos-af359b71b000651812e1ee70638b480502eba0ec.tar.bz2
nixos-af359b71b000651812e1ee70638b480502eba0ec.tar.xz
nixos-af359b71b000651812e1ee70638b480502eba0ec.zip
media-server on odin
Diffstat (limited to 'custom/uucp-mediaserver/scripts.nix')
-rw-r--r--custom/uucp-mediaserver/scripts.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/custom/uucp-mediaserver/scripts.nix b/custom/uucp-mediaserver/scripts.nix
new file mode 100644
index 00000000..21eab6de
--- /dev/null
+++ b/custom/uucp-mediaserver/scripts.nix
@@ -0,0 +1,32 @@
1{ stdenv, zsh, config }:
2
3let
4 mkSymlinks = name: ''
5 ln -s $out/libexec/mediaspace $out/bin/mediaspace.${name}
6 ln -s $out/libexec/queue $out/bin/queue.${name}
7 ln -s $out/libexec/queuesize $out/bin/queuesize.${name}
8 ln -s $out/libexec/queuestatus $out/bin/queuestatus.${name}
9 ln -s $out/libexec/update-queuesize $out/bin/update-queuesize.${name}
10 '';
11in stdenv.mkDerivation {
12 name = "uucp-mediaserver";
13 src = ./scripts;
14
15 phases = [ "installPhase" ];
16
17 inherit (config) queueDir;
18
19 installPhase = ''
20 mkdir -p $out/libexec
21
22 substituteFile $src/mediaspace $out/libexec/mediaspace
23 substituteFile $src/queue $out/libexec/queue
24 substituteFile $src/queuesize $out/libexec/queuesize
25 substituteFile $src/queuestatus $out/libexec/queuestatus
26 substituteFile $src/update-queuesize $out/libexec/update-queuesize
27
28 mkdir -p $out/bin
29
30 ${concatStringsSep "\n" (map mkSymlinks config.remoteNodes)}
31 '';
32}