nixpkgs/pkgs/servers/owncast/default.nix

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

51 lines
1.0 KiB
Nix
Raw Normal View History

2023-07-16 21:57:16 +00:00
{ lib
, buildGoModule
, fetchFromGitHub
, nixosTests
, bash
, which
2023-07-16 21:57:16 +00:00
, ffmpeg
, makeBinaryWrapper
}:
let
2023-11-26 18:58:38 +00:00
version = "0.1.2";
2023-07-16 21:57:16 +00:00
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-11-26 18:58:38 +00:00
hash = "sha256-pPBY2PcXe3k9G6kjj/vF5VB6DEmiwKDUrK4VGR4xNzU=";
2021-09-22 22:46:17 +00:00
};
2023-11-26 18:58:38 +00:00
vendorHash = "sha256-7HxiZh5X5AZVMiZT6B8DfOy6stJ3+dFEixwJYv5X0dY=";
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 \
--prefix PATH : ${lib.makeBinPath [ bash which ffmpeg ]}
2021-09-22 22:46:17 +00:00
'';
installCheckPhase = ''
runHook preCheck
$out/bin/owncast --help
runHook postCheck
'';
passthru.tests.owncast = nixosTests.owncast;
2021-09-22 22:46:17 +00:00
meta = with lib; {
description = "self-hosted video live streaming solution";
homepage = "https://owncast.online";
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [ MayNiklas ];
2023-11-23 21:09:35 +00:00
mainProgram = "owncast";
2021-09-22 22:46:17 +00:00
};
}