From af359b71b000651812e1ee70638b480502eba0ec Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 5 Apr 2018 22:05:05 +0200 Subject: media-server on odin --- custom/uucp-mediaserver/scripts.nix | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 custom/uucp-mediaserver/scripts.nix (limited to 'custom/uucp-mediaserver/scripts.nix') 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 @@ +{ stdenv, zsh, config }: + +let + mkSymlinks = name: '' + ln -s $out/libexec/mediaspace $out/bin/mediaspace.${name} + ln -s $out/libexec/queue $out/bin/queue.${name} + ln -s $out/libexec/queuesize $out/bin/queuesize.${name} + ln -s $out/libexec/queuestatus $out/bin/queuestatus.${name} + ln -s $out/libexec/update-queuesize $out/bin/update-queuesize.${name} + ''; +in stdenv.mkDerivation { + name = "uucp-mediaserver"; + src = ./scripts; + + phases = [ "installPhase" ]; + + inherit (config) queueDir; + + installPhase = '' + mkdir -p $out/libexec + + substituteFile $src/mediaspace $out/libexec/mediaspace + substituteFile $src/queue $out/libexec/queue + substituteFile $src/queuesize $out/libexec/queuesize + substituteFile $src/queuestatus $out/libexec/queuestatus + substituteFile $src/update-queuesize $out/libexec/update-queuesize + + mkdir -p $out/bin + + ${concatStringsSep "\n" (map mkSymlinks config.remoteNodes)} + ''; +} -- cgit v1.2.3