58f8944c92
GitOrigin-RevId: 5aba0fe9766a7201a336249fd6cb76e0d7ba2faf
31 lines
867 B
Nix
Executable file
31 lines
867 B
Nix
Executable file
#!/usr/bin/env -S nix-build --no-out-link
|
|
|
|
# Script to generate default streaming configurations for EPGStation. There's
|
|
# no need to run this script directly since generate.sh in the EPGStation
|
|
# package directory would run this script for you.
|
|
#
|
|
# Usage: ./generate | xargs cat > streaming.json
|
|
|
|
{ pkgs ? (import ../../../../.. {}) }:
|
|
|
|
let
|
|
sampleConfigPath = "${pkgs.epgstation.src}/config/config.sample.json";
|
|
sampleConfig = builtins.fromJSON (builtins.readFile sampleConfigPath);
|
|
streamingConfig = {
|
|
inherit (sampleConfig)
|
|
mpegTsStreaming
|
|
mpegTsViewer
|
|
liveHLS
|
|
liveMP4
|
|
liveWebM
|
|
recordedDownloader
|
|
recordedStreaming
|
|
recordedViewer
|
|
recordedHLS;
|
|
};
|
|
in
|
|
pkgs.runCommand "streaming.json" { nativeBuildInputs = [ pkgs.jq ]; } ''
|
|
jq . <<<'${builtins.toJSON streamingConfig}' > $out
|
|
''
|
|
|
|
# vim:set ft=nix:
|