Files
nixpkgs/pkgs/by-name/ow/owncast/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

66 lines
1.4 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
nixosTests,
bash,
which,
ffmpeg-full,
makeBinaryWrapper,
}:
let
version = "0.2.3";
in
buildGoModule {
pname = "owncast";
inherit version;
src = fetchFromGitHub {
owner = "owncast";
repo = "owncast";
rev = "v${version}";
hash = "sha256-JCIB4G3cOSkEEO/jcsj4mUP+HeQfgn0jX4OL8NX9/C0=";
};
vendorHash = "sha256-FuynEBoPS0p1bRgmaeCxn1RPqbYHcltZpQ9SE71xHEE=";
propagatedBuildInputs = [ ffmpeg-full ];
nativeBuildInputs = [ makeBinaryWrapper ];
# lefthook is included as a tool in go.mod for a pre-commit hook, but causes the build to fail
preBuild = ''
# Remove lefthook from tools section in go.mod
sed -i '/tool (/,/)/{ /[[:space:]]*github.com\/evilmartians\/lefthook[[:space:]]*$/d; }' go.mod
'';
postInstall = ''
wrapProgram $out/bin/owncast \
--prefix PATH : ${
lib.makeBinPath [
bash
which
ffmpeg-full
]
}
'';
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; [
flexiondotorg
MayNiklas
];
mainProgram = "owncast";
};
}