nixpkgs/pkgs/servers/owncast/default.nix

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

50 lines
1 KiB
Nix
Raw Normal View History

2023-07-16 23:57:16 +02:00
{ lib
, buildGoModule
, fetchFromGitHub
, nixosTests
, bash
, which
2023-07-16 23:57:16 +02:00
, ffmpeg
, makeBinaryWrapper
}:
let
version = "0.1.1";
in buildGoModule {
2021-09-23 00:46:17 +02:00
pname = "owncast";
2023-07-16 23:57:16 +02:00
inherit version;
2021-09-23 00:46:17 +02:00
src = fetchFromGitHub {
owner = "owncast";
repo = "owncast";
rev = "v${version}";
2023-07-16 23:57:16 +02:00
hash = "sha256-nBTuvVVnFlC75p8bRCN+lNl9fExBZrsLEesvXWwNlAQ=";
2021-09-23 00:46:17 +02:00
};
2023-07-16 23:57:16 +02:00
vendorHash = "sha256-yjy5bDJjWk7UotBVqvVFiGx8mpfhpqMTxoQm/eWHcw4=";
2021-09-23 00:46:17 +02:00
propagatedBuildInputs = [ ffmpeg ];
2023-07-16 23:57:16 +02:00
nativeBuildInputs = [ makeBinaryWrapper ];
2021-09-23 00:46:17 +02:00
2023-07-16 23:57:16 +02:00
postInstall = ''
2021-09-23 00:46:17 +02:00
wrapProgram $out/bin/owncast \
--prefix PATH : ${lib.makeBinPath [ bash which ffmpeg ]}
2021-09-23 00:46:17 +02: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 ];
};
}