From b03ded550fadadf23cd1fa06f101cd4fdd7aa071 Mon Sep 17 00:00:00 2001 From: codyopel Date: Sat, 14 Feb 2015 19:06:38 -0500 Subject: lame: move to libraries & fix license --- pkgs/applications/audio/lame/default.nix | 62 ----------------------------- pkgs/development/libraries/lame/default.nix | 62 +++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 63 insertions(+), 63 deletions(-) delete mode 100644 pkgs/applications/audio/lame/default.nix create mode 100644 pkgs/development/libraries/lame/default.nix diff --git a/pkgs/applications/audio/lame/default.nix b/pkgs/applications/audio/lame/default.nix deleted file mode 100644 index 6e27f3aa9547..000000000000 --- a/pkgs/applications/audio/lame/default.nix +++ /dev/null @@ -1,62 +0,0 @@ -{ 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.99.5"; - - src = fetchurl { - url = "mirror://sourceforge/lame/${name}.tar.gz"; - sha256 = "1zr3kadv35ii6liia0bpfgxpag27xcivp571ybckpbz4b10nnd14"; - }; - - 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 "") - ]; - - meta = { - description = "LAME is a high quality MPEG Audio Layer III (MP3) encoder"; - homepage = http://lame.sourceforge.net; - license = licenses.lgpl; - maintainers = with maintainers; [ codyopel ]; - platforms = platforms.all; - }; -} diff --git a/pkgs/development/libraries/lame/default.nix b/pkgs/development/libraries/lame/default.nix new file mode 100644 index 000000000000..abf05f4c1385 --- /dev/null +++ b/pkgs/development/libraries/lame/default.nix @@ -0,0 +1,62 @@ +{ 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.99.5"; + + src = fetchurl { + url = "mirror://sourceforge/lame/${name}.tar.gz"; + sha256 = "1zr3kadv35ii6liia0bpfgxpag27xcivp571ybckpbz4b10nnd14"; + }; + + 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 "") + ]; + + meta = { + description = "LAME is a high quality MPEG Audio Layer III (MP3) encoder"; + homepage = http://lame.sourceforge.net; + license = licenses.lgpl2; + maintainers = with maintainers; [ codyopel ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2e1f2be94c33..6b7c1bce5941 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10581,7 +10581,7 @@ let kubernetes = callPackage ../applications/networking/cluster/kubernetes { }; - lame = callPackage ../applications/audio/lame { }; + lame = callPackage ../development/libraries/lame { }; larswm = callPackage ../applications/window-managers/larswm { }; -- cgit 1.4.1