mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 21:13:40 +00:00
52 lines
1.6 KiB
Nix
52 lines
1.6 KiB
Nix
|
{ stdenv
|
||
|
, fetchurl
|
||
|
, ffmpeg-headless
|
||
|
, lib
|
||
|
, stateDirectory ? "/var/lib/castopod"
|
||
|
}:
|
||
|
stdenv.mkDerivation {
|
||
|
pname = "castopod";
|
||
|
version = "1.6.4";
|
||
|
|
||
|
src = fetchurl {
|
||
|
url = "https://code.castopod.org/adaures/castopod/uploads/ce56d4f149242f12bedd20f9a2b0916d/castopod-1.6.4.tar.gz";
|
||
|
sha256 = "080jj91yxbn3xsbs0sywzwa2f5in9bp9qi2zwqcfqpaxlq9ga62v";
|
||
|
};
|
||
|
|
||
|
dontBuild = true;
|
||
|
dontFixup = true;
|
||
|
|
||
|
postPatch = ''
|
||
|
# not configurable at runtime unfortunately:
|
||
|
substituteInPlace app/Config/Paths.php \
|
||
|
--replace "__DIR__ . '/../../writable'" "'${stateDirectory}/writable'"
|
||
|
|
||
|
# configuration file must be writable, place it to ${stateDirectory}
|
||
|
substituteInPlace modules/Install/Controllers/InstallController.php \
|
||
|
--replace "ROOTPATH" "'${stateDirectory}/'"
|
||
|
substituteInPlace public/index.php spark \
|
||
|
--replace "DotEnv(ROOTPATH)" "DotEnv('${stateDirectory}')"
|
||
|
|
||
|
# ffmpeg is required for Video Clips feature
|
||
|
substituteInPlace modules/MediaClipper/VideoClipper.php \
|
||
|
--replace "ffmpeg" "${ffmpeg-headless}/bin/ffmpeg"
|
||
|
substituteInPlace modules/Admin/Controllers/VideoClipsController.php \
|
||
|
--replace "which ffmpeg" "echo ${ffmpeg-headless}/bin/ffmpeg"
|
||
|
'';
|
||
|
|
||
|
installPhase = ''
|
||
|
mkdir -p $out/share/castopod
|
||
|
cp -r . $out/share/castopod
|
||
|
'';
|
||
|
|
||
|
passthru.updateScript = ./update.sh;
|
||
|
|
||
|
meta = with lib; {
|
||
|
description = "An open-source hosting platform made for podcasters who want to engage and interact with their audience";
|
||
|
homepage = "https://castopod.org";
|
||
|
license = licenses.agpl3Only;
|
||
|
maintainers = with maintainers; [ alexoundos misuzu ];
|
||
|
platforms = platforms.all;
|
||
|
};
|
||
|
}
|