This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

services.radio: override htgen package

+18 -1
+18 -1
2configs/services/radio/default.nix
··· 11 11 12 12 music_dir = "/var/music"; 13 13 14 + # dash 0.5.13 has a regression where `read` builtin discards input when stdin is a socket 15 + # This breaks htgen which uses tcpserver. Pin htgen's dash to 0.5.12 until upstream fixes it. 16 + # See: https://git.kernel.org/pub/scm/utils/dash/dash.git/commit/?id=1d072e9c3292281a7eee54c41fec117ff22723e5 17 + dash-0_5_12 = pkgs.dash.overrideAttrs (old: rec { 18 + version = "0.5.12"; 19 + src = pkgs.fetchurl { 20 + url = "http://gondor.apana.org.au/~herbert/dash/files/dash-${version}.tar.gz"; 21 + hash = "sha256-akdKxG6LCzKRbExg32lMggWNMpfYs4W3RQgDDKSo8oo="; 22 + }; 23 + }); 24 + 25 + htgen-fixed = pkgs.htgen.override { 26 + pkgs = pkgs // { dash = dash-0_5_12; }; 27 + }; 28 + 14 29 skip_track = pkgs.writers.writeBashBin "skip_track" '' 15 30 set -eu 16 31 ··· 185 200 ]; 186 201 187 202 krebs.htgen.radio = { 203 + package = htgen-fixed; 188 204 port = 8001; 189 205 user = { 190 206 name = "radio"; 191 207 }; 192 208 scriptFile = pkgs.writeDash "radio" '' 193 - case "$Method $Request_URI" in 209 + set -x 210 + case "''${Method:-} ''${Request_URI:-}" in 194 211 "POST /skip") 195 212 printf 'HTTP/1.1 200 OK\r\n' 196 213 printf 'Connection: close\r\n'