depot/third_party/nixpkgs/pkgs/servers/owncast/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

50 lines
1 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, nixosTests
, bash
, which
, ffmpeg
, makeBinaryWrapper
}:
let
version = "0.1.2";
in buildGoModule {
pname = "owncast";
inherit version;
src = fetchFromGitHub {
owner = "owncast";
repo = "owncast";
rev = "v${version}";
hash = "sha256-pPBY2PcXe3k9G6kjj/vF5VB6DEmiwKDUrK4VGR4xNzU=";
};
vendorHash = "sha256-7HxiZh5X5AZVMiZT6B8DfOy6stJ3+dFEixwJYv5X0dY=";
propagatedBuildInputs = [ ffmpeg ];
nativeBuildInputs = [ makeBinaryWrapper ];
postInstall = ''
wrapProgram $out/bin/owncast \
--prefix PATH : ${lib.makeBinPath [ bash which ffmpeg ]}
'';
installCheckPhase = ''
runHook preCheck
$out/bin/owncast --help
runHook postCheck
'';
passthru.tests.owncast = nixosTests.owncast;
meta = with lib; {
description = "self-hosted video live streaming solution";
homepage = "https://owncast.online";
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [ MayNiklas ];
mainProgram = "owncast";
};
}