From e08bdac8d83f14e39cc93c5ec5e7ec720948e513 Mon Sep 17 00:00:00 2001 From: dbeley <6568955+dbeley@users.noreply.github.com> Date: Wed, 29 Apr 2026 20:07:29 +0200 Subject: [PATCH] nix: add files to help build on NixOS --- README.md | 8 +++++--- build.sh | 2 +- shell.nix | 18 ++++++++++++++++++ 3 files changed, 24 insertions(+), 4 deletions(-) mode change 100644 => 100755 build.sh create mode 100644 shell.nix diff --git a/README.md b/README.md index 3ca44d6..000d1ea 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,8 @@ bash build.sh This creates `Sonance3.wgt` (~200KB) which you can install via Jellyfin2Samsung. +If you are using Nix, you can make use of the provided `shell.nix` with `nix-shell` to have a shell environment with the needed dependencies. + ## Setup 1. Launch Sonance on your TV @@ -66,7 +68,7 @@ This creates `Sonance3.wgt` (~200KB) which you can install via Jellyfin2Samsung. 3. Enter your username and password 4. You're in — start browsing and playing -Sonance communicates with your server via the Subsonic REST API. +Sonance communicates with your server via the Subsonic REST API. ## Remote Controls @@ -123,7 +125,7 @@ python3 -m http.server 8080 # Open http://localhost:8080 in your browser ``` -The app runs in any modern browser for development. AVPlay features (hardware decoding, media keys) only work on the TV — the browser uses HTML5 Audio as a fallback. +The app runs in any modern browser for development. AVPlay features (hardware decoding, media keys) only work on the TV — the browser uses HTML5 Audio as a fallback. ### Project structure @@ -175,7 +177,7 @@ This app targets Samsung TVs from 2019, which run Chromium 63. Key limitations t ## Licence -GNU GPL v3. You are free to use this however you want as long as it stays free and open-source. You cannot commercialise this or close source any version of it. +GNU GPL v3. You are free to use this however you want as long as it stays free and open-source. You cannot commercialise this or close source any version of it. You cannot use this to train AI. ## Acknowledgements diff --git a/build.sh b/build.sh old mode 100644 new mode 100755 index 6eb93db..fe0224d --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Sonance — Build Script # Packages the app into Sonance3.wgt for Samsung Tizen TV deployment. # diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..27330ad --- /dev/null +++ b/shell.nix @@ -0,0 +1,18 @@ +{ pkgs ? import {} }: + +pkgs.mkShell { + buildInputs = with pkgs; [ + nodejs # provides node, npm, npx + zip + unzip + gawk + gnugrep + coreutils # wc, du, etc. + ]; + + shellHook = '' + echo "Sonance3 dev shell ready." + echo "Run: ./build.sh # build production .wgt" + echo " ./build.sh --dev # restore dev mode" + ''; +}