nixpkgs/pkgs/development/libraries/lame/default.nix

64 lines
2.3 KiB
Nix
Raw Normal View History

2015-02-14 22:41:15 +01:00
{ stdenv, fetchurl
, nasmSupport ? true, nasm ? null # Assembly optimizations
, cpmlSupport ? true # Compaq's fast math library
#, efenceSupport ? false, libefence ? null # Use ElectricFence for malloc debugging
, sndfileFileIOSupport ? false, libsndfile ? null # Use libsndfile, instead of lame's internal routines
, analyzerHooksSupport ? true # Use analyzer hooks
, decoderSupport ? true # mpg123 decoder
, frontendSupport ? true # Build the lame executable
#, mp3xSupport ? false, gtk1 ? null # Build GTK frame analyzer
, mp3rtpSupport ? false # Build mp3rtp
, debugSupport ? false # Debugging (disables optimizations)
}:
2015-02-14 22:41:15 +01:00
assert nasmSupport -> (nasm != null);
#assert efenceSupport -> (libefence != null);
assert sndfileFileIOSupport -> (libsndfile != null);
#assert mp3xSupport -> (analyzerHooksSupport && (gtk1 != null));
let
2015-05-22 22:33:08 +02:00
sndfileFileIO = if sndfileFileIOSupport then "sndfile" else "lame";
2015-02-14 22:41:15 +01:00
in
with stdenv.lib;
stdenv.mkDerivation rec {
2015-02-14 22:41:15 +01:00
name = "lame-${version}";
version = "3.99.5";
src = fetchurl {
url = "mirror://sourceforge/lame/${name}.tar.gz";
2013-03-30 18:10:15 +01:00
sha256 = "1zr3kadv35ii6liia0bpfgxpag27xcivp571ybckpbz4b10nnd14";
};
2015-02-14 22:41:15 +01:00
nativeBuildInputs = [ ]
++ optional nasmSupport nasm;
2015-02-14 22:41:15 +01:00
buildInputs = [ ]
#++ optional efenceSupport libefence
#++ optional mp3xSupport gtk1
++ optional sndfileFileIOSupport libsndfile;
2015-02-14 22:41:15 +01:00
configureFlags = [
2015-05-22 22:33:08 +02:00
(mkEnable nasmSupport "nasm" null)
(mkEnable cpmlSupport "cpml" null)
#(mkEnable efenceSupport "efence" null)
(mkWith true "fileio" sndfileFileIO)
(mkEnable analyzerHooksSupport "analyzer-hooks" null)
(mkEnable decoderSupport "decoder" null)
(mkEnable frontendSupport "frontend" null)
(mkEnable frontendSupport "dynamic-frontends" null)
#(mkEnable mp3xSupport "mp3x" null)
(mkEnable mp3rtpSupport "mp3rtp" null)
] ++ optional debugSupport [
(mkEnable true "debug" "alot")
2015-02-14 22:41:15 +01:00
];
meta = {
description = "A high quality MPEG Audio Layer III (MP3) encoder";
2015-02-14 22:41:15 +01:00
homepage = http://lame.sourceforge.net;
2015-02-15 01:06:38 +01:00
license = licenses.lgpl2;
2015-02-14 22:41:15 +01:00
maintainers = with maintainers; [ codyopel ];
platforms = platforms.all;
};
}