diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/libraries/lame | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/lame')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/lame/default.nix | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/lame/default.nix b/nixpkgs/pkgs/development/libraries/lame/default.nix new file mode 100644 index 000000000000..2f713cb59775 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/lame/default.nix @@ -0,0 +1,71 @@ +{ 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) +}: + +assert nasmSupport -> (nasm != null); +#assert efenceSupport -> (libefence != null); +assert sndfileFileIOSupport -> (libsndfile != null); +#assert mp3xSupport -> (analyzerHooksSupport && (gtk1 != null)); + +let + mkFlag = optSet: flag: if optSet then "--enable-${flag}" else "--disable-${flag}"; +in + +with stdenv.lib; +stdenv.mkDerivation rec { + name = "lame-${version}"; + version = "3.100"; + + src = fetchurl { + url = "mirror://sourceforge/lame/${name}.tar.gz"; + sha256 = "07nsn5sy3a8xbmw1bidxnsj5fj6kg9ai04icmqw40ybkp353dznx"; + }; + + outputs = [ "out" "lib" "doc" ]; # a small single header + outputMan = "out"; + + nativeBuildInputs = [ ] + ++ optional nasmSupport nasm; + + buildInputs = [ ] + #++ optional efenceSupport libefence + #++ optional mp3xSupport gtk1 + ++ optional sndfileFileIOSupport libsndfile; + + configureFlags = [ + (mkFlag nasmSupport "nasm") + (mkFlag cpmlSupport "cpml") + #(mkFlag efenceSupport "efence") + (if sndfileFileIOSupport then "--with-fileio=sndfile" else "--with-fileio=lame") + (mkFlag analyzerHooksSupport "analyzer-hooks") + (mkFlag decoderSupport "decoder") + (mkFlag frontendSupport "frontend") + (mkFlag frontendSupport "dynamic-frontends") + #(mkFlag mp3xSupport "mp3x") + (mkFlag mp3rtpSupport "mp3rtp") + (if debugSupport then "--enable-debug=alot" else "") + ]; + + preConfigure = '' + # Prevent a build failure for 3.100 due to using outdated symbol list + # https://hydrogenaud.io/index.php/topic,114777.msg946373.html#msg946373 + sed -i '/lame_init_old/d' include/libmp3lame.sym + ''; + + meta = { + description = "A high quality MPEG Audio Layer III (MP3) encoder"; + homepage = http://lame.sourceforge.net; + license = licenses.lgpl2; + maintainers = with maintainers; [ codyopel fpletz ]; + platforms = platforms.all; + }; +} |