ersatztv: init at 25.8.0

This commit is contained in:
James Hollowell
2025-11-16 22:06:52 -05:00
parent f5a7c679db
commit b39f8cb0a1
3 changed files with 2161 additions and 0 deletions
File diff suppressed because it is too large Load Diff
+53
View File
@@ -0,0 +1,53 @@
{
lib,
fetchFromGitHub,
dotnetCorePackages,
buildDotnetModule,
ffmpeg,
which,
}:
buildDotnetModule rec {
pname = "ersatztv";
version = "25.8.0";
src = fetchFromGitHub {
owner = "ErsatzTV";
repo = "ErsatzTV";
rev = "v${version}";
sha256 = "sha256-FuuX/SxhzzUn7ELJDXJuILkl3ubR3V+5hQwILvZZrFg=";
};
buildInputs = [ ffmpeg ];
projectFile = "ErsatzTV/ErsatzTV.csproj";
executables = [
"ErsatzTV"
"ErsatzTV.Scanner"
];
nugetDeps = ./nuget-deps.json;
dotnet-sdk = dotnetCorePackages.sdk_9_0;
dotnet-runtime = dotnetCorePackages.aspnetcore_9_0;
# ETV uses `which` to find `ffmpeg` and `ffprobe`
makeWrapperArgs = [
"--suffix"
"PATH"
":"
"${lib.makeBinPath [
ffmpeg
which
]}"
];
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "Stream custom live channels using your own media";
homepage = "https://ersatztv.org/";
license = licenses.zlib;
maintainers = with maintainers; [ allout58 ];
mainProgram = "ErsatzTV";
platforms = dotnet-runtime.meta.platforms;
};
}
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=./. -i bash -p curl jq common-updater-scripts gnused nix coreutils
set -euo pipefail
latestVersion="$(curl -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} "https://api.github.com/repos/ersatztv/ersatztv/releases?per_page=1" | jq -r ".[0].tag_name" | sed 's/^v//')"
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; ersatztv.version or (lib.getVersion ersatztv)" | tr -d '"')
if [[ "$currentVersion" == "$latestVersion" ]]; then
echo "ersatztv is up-to-date: $currentVersion"
exit 0
fi
update-source-version ersatztv "$latestVersion"
$(nix-build . -A ersatztv.fetch-deps --no-out-link)