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-17 00:57:16 +03:00
{ lib
, buildGoModule
, fetchFromGitHub
, nixosTests
, bash
, which
2023-07-17 00:57:16 +03:00
, ffmpeg
, makeBinaryWrapper
}:
let
2023-11-26 21:58:38 +03:00
version = "0.1.2";
2023-07-17 00:57:16 +03:00
in buildGoModule {
2021-09-23 01:46:17 +03:00
pname = "owncast";
2023-07-17 00:57:16 +03:00
inherit version;
2021-09-23 01:46:17 +03:00
src = fetchFromGitHub {
owner = "owncast";
repo = "owncast";
rev = "v${version}";
2023-11-26 21:58:38 +03:00
hash = "sha256-pPBY2PcXe3k9G6kjj/vF5VB6DEmiwKDUrK4VGR4xNzU=";
2021-09-23 01:46:17 +03:00
};
2023-11-26 21:58:38 +03:00
vendorHash = "sha256-7HxiZh5X5AZVMiZT6B8DfOy6stJ3+dFEixwJYv5X0dY=";
2021-09-23 01:46:17 +03:00
propagatedBuildInputs = [ ffmpeg ];
2023-07-17 00:57:16 +03:00
nativeBuildInputs = [ makeBinaryWrapper ];
2021-09-23 01:46:17 +03:00
2023-07-17 00:57:16 +03:00
postInstall = ''
2021-09-23 01:46:17 +03:00
wrapProgram $out/bin/owncast \
--prefix PATH : ${lib.makeBinPath [ bash which ffmpeg ]}
2021-09-23 01:46:17 +03:00
'';
installCheckPhase = ''
runHook preCheck
$out/bin/owncast --help
runHook postCheck
'';
passthru.tests.owncast = nixosTests.owncast;
2021-09-23 01:46:17 +03: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-24 00:09:35 +03:00
mainProgram = "owncast";
2021-09-23 01:46:17 +03:00
};
}