1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-16 18:03:22 +00:00
nixpkgs/pkgs/tools/audio/liquidsoap/full.nix

75 lines
2.3 KiB
Nix
Raw Normal View History

{ lib, stdenv, makeWrapper, fetchurl, which, pkg-config
2017-09-22 08:20:08 +01:00
, ocamlPackages
, libao, portaudio, alsaLib, libpulseaudio, libjack2
2014-08-24 16:29:49 +01:00
, libsamplerate, libmad, taglib, lame, libogg
2020-09-06 17:52:52 +01:00
, libvorbis, speex, libtheora, libopus
2014-08-24 16:29:49 +01:00
, faad2, flac, ladspaH, ffmpeg, frei0r, dssi
2018-10-04 01:26:00 +01:00
}:
2014-08-24 16:29:49 +01:00
let
2018-10-04 01:26:00 +01:00
pname = "liquidsoap";
2020-09-06 17:52:52 +01:00
version = "1.4.2";
ocaml-ffmpeg = fetchurl {
url = "https://github.com/savonet/ocaml-ffmpeg/releases/download/v0.4.2/ocaml-ffmpeg-0.4.2.tar.gz";
sha256 = "1lx5s1avds9fsh77828ifn71r2g89rxakhs8pp995a675phm9viw";
};
2014-08-24 16:29:49 +01:00
packageFilters = map (p: "-e '/ocaml-${p}/d'" )
[ "gstreamer" "shine" "aacplus" "schroedinger"
"voaacenc" "soundtouch" "gavl" "lo"
];
in
stdenv.mkDerivation {
2018-10-04 01:26:00 +01:00
name = "${pname}-full-${version}";
2014-08-24 16:29:49 +01:00
src = fetchurl {
2020-09-06 17:52:52 +01:00
url = "https://github.com/savonet/${pname}/releases/download/v${version}/${pname}-${version}-full.tar.gz";
sha256 = "0wkwnzj1a0vizv7sr1blwk5gzm2qi0n02ndijnq1i50cwrgxs1a4";
2014-08-24 16:29:49 +01:00
};
2020-09-06 17:52:52 +01:00
# Use ocaml-srt and ocaml-fdkaac from nixpkgs
# Use ocaml-ffmpeg at 0.4.2 for compatibility with ffmpeg 4.3
prePatch = ''
rm -rf ocaml-srt*/ ocaml-fdkaac*/ ocaml-ffmpeg*/
tar xzf ${ocaml-ffmpeg}
'';
2018-10-04 01:26:00 +01:00
preConfigure = /* we prefer system-wide libs */ ''
sed -i "s|gsed|sed|" Makefile
make bootstrap
# autoreconf -vi # use system libraries
sed ${toString packageFilters} PACKAGES.default > PACKAGES
'';
postFixup = ''
wrapProgram $out/bin/liquidsoap --set LIQ_LADSPA_PATH /run/current-system/sw/lib/ladspa
'';
2014-08-24 16:29:49 +01:00
configureFlags = [ "--localstatedir=/var" ];
nativeBuildInputs = [ makeWrapper pkg-config ];
2014-08-24 16:29:49 +01:00
buildInputs =
[ which ocamlPackages.ocaml ocamlPackages.findlib
libao portaudio alsaLib libpulseaudio libjack2
2014-08-24 16:29:49 +01:00
libsamplerate libmad taglib lame libogg
2020-09-06 17:52:52 +01:00
libvorbis speex libtheora libopus
2014-08-24 16:29:49 +01:00
faad2 flac ladspaH ffmpeg frei0r dssi
ocamlPackages.xmlm ocamlPackages.ocaml_pcre
ocamlPackages.camomile
2020-09-06 17:52:52 +01:00
ocamlPackages.fdkaac
ocamlPackages.srt ocamlPackages.sedlex_2 ocamlPackages.menhir
2014-08-24 16:29:49 +01:00
];
2018-10-04 01:26:00 +01:00
hardeningDisable = [ "format" "fortify" ];
meta = with lib; {
2014-08-24 16:29:49 +01:00
description = "Swiss-army knife for multimedia streaming";
homepage = "https://www.liquidsoap.info/";
maintainers = with maintainers; [ ehmry ];
2014-08-24 16:29:49 +01:00
license = licenses.gpl2;
2017-09-22 08:20:08 +01:00
platforms = ocamlPackages.ocaml.meta.platforms or [];
2014-08-24 16:29:49 +01:00
};
}