summary refs log tree commit diff
path: root/pkgs/tools/audio/liquidsoap
diff options
context:
space:
mode:
authorBart Brouns <bart@magnetophon.nl>2018-10-04 02:26:00 +0200
committerBart Brouns <bart@magnetophon.nl>2018-10-04 02:37:12 +0200
commit3b32efff7ed3c19ea636e627d1b24df4d2340603 (patch)
tree121e5d6b090b91393f02ff2e07c90d5c8a2d0453 /pkgs/tools/audio/liquidsoap
parent6a995e986ac565bfd039051b6ef64adbf2858a46 (diff)
downloadnixpkgs-3b32efff7ed3c19ea636e627d1b24df4d2340603.tar
nixpkgs-3b32efff7ed3c19ea636e627d1b24df4d2340603.tar.gz
nixpkgs-3b32efff7ed3c19ea636e627d1b24df4d2340603.tar.bz2
nixpkgs-3b32efff7ed3c19ea636e627d1b24df4d2340603.tar.lz
nixpkgs-3b32efff7ed3c19ea636e627d1b24df4d2340603.tar.xz
nixpkgs-3b32efff7ed3c19ea636e627d1b24df4d2340603.tar.zst
nixpkgs-3b32efff7ed3c19ea636e627d1b24df4d2340603.zip
WIP liquidsoap update
Diffstat (limited to 'pkgs/tools/audio/liquidsoap')
-rw-r--r--pkgs/tools/audio/liquidsoap/full.nix40
1 files changed, 34 insertions, 6 deletions
diff --git a/pkgs/tools/audio/liquidsoap/full.nix b/pkgs/tools/audio/liquidsoap/full.nix
index eb544fc693e..7d3b899048f 100644
--- a/pkgs/tools/audio/liquidsoap/full.nix
+++ b/pkgs/tools/audio/liquidsoap/full.nix
@@ -4,10 +4,12 @@
 , libsamplerate, libmad, taglib, lame, libogg
 , libvorbis, speex, libtheora, libopus, fdk_aac
 , faad2, flac, ladspaH, ffmpeg, frei0r, dssi
-, }:
+, autoconf, automake, libtool
+}:
 
 let
-  version = "1.1.1";
+  pname = "liquidsoap";
+  version = "1.3.4";
 
   packageFilters = map (p: "-e '/ocaml-${p}/d'" )
     [ "gstreamer" "shine" "aacplus" "schroedinger"
@@ -15,16 +17,39 @@ let
     ];
 in
 stdenv.mkDerivation {
-  name = "liquidsoap-full-${version}";
+  name = "${pname}-full-${version}";
 
   src = fetchurl {
-    url = "mirror://sourceforge/project/savonet/liquidsoap/${version}/liquidsoap-${version}-full.tar.gz";
-    sha256 = "1w1grgja5yibph90vsxj7ffkpz1sgzmr54jj52s8889dpy609wqa";
+    url = "https://github.com/savonet/${pname}/releases/download/${version}/${pname}-${version}-full.tar.bz2";
+    sha256 = "11l1h42sljfxcdhddc8klya4bk99j7a1pndwnzvscb04pvmfmlk0";
   };
 
-  preConfigure = "sed ${toString packageFilters} PACKAGES.default > PACKAGES";
+  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
+  '';
+
   configureFlags = [ "--localstatedir=/var" ];
 
+  # liquidsoap only looks for lame and ffmpeg at runtime, so we need to link them in manually
+  NIX_LDFLAGS = [
+  #   # LAME
+  #   # "-lmp3lame"
+  #   # ffmpeg
+  #   "-lavcodec"
+  #   "-lavdevice"
+  #   "-lavfilter"
+  #   "-lavformat"
+    "-lavresample"
+  #   "-lavutil"
+  #   "-lpostproc"
+  #   "-lswresample"
+    "-lswscale"
+  ];
+
   buildInputs =
     [ which ocamlPackages.ocaml ocamlPackages.findlib pkgconfig
       libao portaudio alsaLib libpulseaudio libjack2
@@ -33,8 +58,11 @@ stdenv.mkDerivation {
       faad2 flac ladspaH ffmpeg frei0r dssi
       ocamlPackages.xmlm ocamlPackages.ocaml_pcre
       ocamlPackages.camomile
+      # autoconf automake libtool
     ];
 
+  hardeningDisable = [ "format" "fortify" ];
+
   meta = with stdenv.lib; {
     description = "Swiss-army knife for multimedia streaming";
     homepage = http://liquidsoap.fm/;