2023-11-16 04:20:00 +00:00
|
|
|
{ lib, stdenv, makeWrapper, fetchFromGitHub, which, pkg-config
|
2022-06-16 17:23:12 +00:00
|
|
|
, libjpeg
|
2020-04-24 23:36:52 +00:00
|
|
|
, ocamlPackages
|
2023-11-16 04:20:00 +00:00
|
|
|
, awscli2, bubblewrap, curl, ffmpeg, yt-dlp
|
|
|
|
, runtimePackages ? [ awscli2 bubblewrap curl ffmpeg yt-dlp ]
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "liquidsoap";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "2.2.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2022-06-16 17:23:12 +00:00
|
|
|
inherit pname version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "savonet";
|
|
|
|
repo = "liquidsoap";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-o3P7oTizO2l2WkB4LormZ/Ses5jZOpgQ1r1zB1Y3Bjs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/lang/dune \
|
2024-06-05 15:53:02 +00:00
|
|
|
--replace-warn "(run git rev-parse --short HEAD)" "(run echo -n nixpkgs)"
|
2023-11-16 04:20:00 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
|
|
|
|
dune build
|
|
|
|
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
dune install --prefix "$out"
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
fixupPhase = ''
|
|
|
|
runHook preFixup
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
wrapProgram $out/bin/liquidsoap \
|
|
|
|
--set LIQ_LADSPA_PATH /run/current-system/sw/lib/ladspa \
|
|
|
|
--prefix PATH : ${lib.makeBinPath runtimePackages}
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
runHook postFixup
|
|
|
|
'';
|
2023-02-09 11:40:11 +00:00
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
pkg-config
|
|
|
|
which
|
|
|
|
ocamlPackages.ocaml
|
|
|
|
ocamlPackages.dune_3
|
|
|
|
ocamlPackages.findlib
|
|
|
|
ocamlPackages.menhir
|
|
|
|
];
|
2023-02-09 11:40:11 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
buildInputs = [
|
2023-02-09 11:40:11 +00:00
|
|
|
libjpeg
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
# Mandatory dependencies
|
|
|
|
ocamlPackages.dtools
|
|
|
|
ocamlPackages.duppy
|
|
|
|
ocamlPackages.mm
|
|
|
|
ocamlPackages.ocurl
|
2024-06-05 15:53:02 +00:00
|
|
|
ocamlPackages.ocaml_pcre
|
2023-11-16 04:20:00 +00:00
|
|
|
ocamlPackages.cry
|
|
|
|
ocamlPackages.camomile
|
2023-02-09 11:40:11 +00:00
|
|
|
ocamlPackages.uri
|
2023-11-16 04:20:00 +00:00
|
|
|
ocamlPackages.fileutils
|
2024-04-21 15:54:59 +00:00
|
|
|
ocamlPackages.magic-mime
|
2023-11-16 04:20:00 +00:00
|
|
|
ocamlPackages.menhir # liquidsoap-lang
|
|
|
|
ocamlPackages.menhirLib
|
|
|
|
ocamlPackages.metadata
|
|
|
|
ocamlPackages.dune-build-info
|
|
|
|
ocamlPackages.re
|
|
|
|
ocamlPackages.sedlex # liquidsoap-lang
|
|
|
|
ocamlPackages.ppx_string
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
# Recommended dependencies
|
|
|
|
ocamlPackages.ffmpeg
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
# Optional dependencies
|
|
|
|
ocamlPackages.alsa
|
|
|
|
ocamlPackages.ao
|
|
|
|
ocamlPackages.bjack
|
2023-11-16 04:20:00 +00:00
|
|
|
ocamlPackages.camlimages
|
2023-02-09 11:40:11 +00:00
|
|
|
ocamlPackages.dssi
|
|
|
|
ocamlPackages.faad
|
|
|
|
ocamlPackages.fdkaac
|
|
|
|
ocamlPackages.flac
|
|
|
|
ocamlPackages.frei0r
|
2024-06-05 15:53:02 +00:00
|
|
|
ocamlPackages.gd
|
2023-11-16 04:20:00 +00:00
|
|
|
ocamlPackages.graphics
|
2024-06-05 15:53:02 +00:00
|
|
|
# ocamlPackages.gstreamer # Broken but advertised feature
|
2023-11-16 04:20:00 +00:00
|
|
|
ocamlPackages.imagelib
|
2023-02-09 11:40:11 +00:00
|
|
|
ocamlPackages.inotify
|
|
|
|
ocamlPackages.ladspa
|
|
|
|
ocamlPackages.lame
|
|
|
|
ocamlPackages.lastfm
|
|
|
|
ocamlPackages.lilv
|
|
|
|
ocamlPackages.lo
|
|
|
|
ocamlPackages.mad
|
|
|
|
ocamlPackages.ogg
|
|
|
|
ocamlPackages.opus
|
|
|
|
ocamlPackages.portaudio
|
2023-11-16 04:20:00 +00:00
|
|
|
ocamlPackages.posix-time2
|
2023-02-09 11:40:11 +00:00
|
|
|
ocamlPackages.pulseaudio
|
|
|
|
ocamlPackages.samplerate
|
2023-11-16 04:20:00 +00:00
|
|
|
ocamlPackages.shine
|
2023-02-09 11:40:11 +00:00
|
|
|
ocamlPackages.soundtouch
|
|
|
|
ocamlPackages.speex
|
|
|
|
ocamlPackages.srt
|
|
|
|
ocamlPackages.ssl
|
|
|
|
ocamlPackages.taglib
|
|
|
|
ocamlPackages.theora
|
|
|
|
ocamlPackages.tsdl
|
|
|
|
ocamlPackages.tsdl-image
|
|
|
|
ocamlPackages.tsdl-ttf
|
2023-11-16 04:20:00 +00:00
|
|
|
ocamlPackages.vorbis
|
|
|
|
ocamlPackages.xmlplaylist
|
|
|
|
ocamlPackages.yaml
|
2023-02-09 11:40:11 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
meta = {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Swiss-army knife for multimedia streaming";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "liquidsoap";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.liquidsoap.info/";
|
2024-05-15 15:35:15 +00:00
|
|
|
changelog = "https://raw.githubusercontent.com/savonet/liquidsoap/main/CHANGES.md";
|
|
|
|
maintainers = with lib.maintainers; [ dandellion ehmry ];
|
|
|
|
license = lib.licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = ocamlPackages.ocaml.meta.platforms or [];
|
|
|
|
};
|
|
|
|
}
|