nixpkgs/pkgs/servers/owncast/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1005 B
Nix
Raw Normal View History

2023-07-16 21:57:16 +00:00
{ lib
, buildGoModule
, fetchFromGitHub
, nixosTests
, ffmpeg
, makeBinaryWrapper
}:
let
version = "0.1.1";
in buildGoModule {
2021-09-22 22:46:17 +00:00
pname = "owncast";
2023-07-16 21:57:16 +00:00
inherit version;
2021-09-22 22:46:17 +00:00
src = fetchFromGitHub {
owner = "owncast";
repo = "owncast";
rev = "v${version}";
2023-07-16 21:57:16 +00:00
hash = "sha256-nBTuvVVnFlC75p8bRCN+lNl9fExBZrsLEesvXWwNlAQ=";
2021-09-22 22:46:17 +00:00
};
2023-07-16 21:57:16 +00:00
vendorHash = "sha256-yjy5bDJjWk7UotBVqvVFiGx8mpfhpqMTxoQm/eWHcw4=";
2021-09-22 22:46:17 +00:00
propagatedBuildInputs = [ ffmpeg ];
2023-07-16 21:57:16 +00:00
nativeBuildInputs = [ makeBinaryWrapper ];
2021-09-22 22:46:17 +00:00
2023-07-16 21:57:16 +00:00
postInstall = ''
2021-09-22 22:46:17 +00:00
wrapProgram $out/bin/owncast \
2023-07-16 21:57:16 +00:00
--prefix PATH : ${lib.makeBinPath [ ffmpeg ]}
2021-09-22 22:46:17 +00:00
'';
installCheckPhase = ''
runHook preCheck
$out/bin/owncast --help
runHook postCheck
'';
passthru.tests.owncast = nixosTests.testOwncast;
meta = with lib; {
description = "self-hosted video live streaming solution";
homepage = "https://owncast.online";
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [ MayNiklas ];
};
}