diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/misc/audio')
4 files changed, 138 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/misc/audio/sox/default.nix b/nixpkgs/pkgs/applications/misc/audio/sox/default.nix new file mode 100644 index 000000000000..a598ec1caca1 --- /dev/null +++ b/nixpkgs/pkgs/applications/misc/audio/sox/default.nix @@ -0,0 +1,45 @@ +{ config, lib, stdenv, fetchurl, CoreAudio +, enableAlsa ? true, alsaLib ? null +, enableLibao ? true, libao ? null +, enableLame ? config.sox.enableLame or false, lame ? null +, enableLibmad ? true, libmad ? null +, enableLibogg ? true, libogg ? null, libvorbis ? null +, enableFLAC ? true, flac ? null +, enablePNG ? true, libpng ? null +, enableLibsndfile ? true, libsndfile ? null +# amrnb and amrwb are unfree, disabled by default +, enableAMR ? false, amrnb ? null, amrwb ? null +, enableLibpulseaudio ? true, libpulseaudio ? null +}: + +with stdenv.lib; + +stdenv.mkDerivation rec { + name = "sox-14.4.2"; + + src = fetchurl { + url = "mirror://sourceforge/sox/${name}.tar.gz"; + sha256 = "0v2znlxkxxcd3f48hf3dx9pq7i6fdhb62kgj7wv8xggz8f35jpxl"; + }; + + buildInputs = + optional (enableAlsa && stdenv.isLinux) alsaLib ++ + optional enableLibao libao ++ + optional enableLame lame ++ + optional enableLibmad libmad ++ + optionals enableLibogg [ libogg libvorbis ] ++ + optional enableFLAC flac ++ + optional enablePNG libpng ++ + optional enableLibsndfile libsndfile ++ + optionals enableAMR [ amrnb amrwb ] ++ + optional enableLibpulseaudio libpulseaudio ++ + optional (stdenv.isDarwin) CoreAudio; + + meta = { + description = "Sample Rate Converter for audio"; + homepage = http://sox.sourceforge.net/; + maintainers = [ lib.maintainers.marcweber ]; + license = if enableAMR then lib.licenses.unfree else lib.licenses.gpl2Plus; + platforms = lib.platforms.linux ++ lib.platforms.darwin; + }; +} diff --git a/nixpkgs/pkgs/applications/misc/audio/soxr/default.nix b/nixpkgs/pkgs/applications/misc/audio/soxr/default.nix new file mode 100644 index 000000000000..7c4e6ff8c3d7 --- /dev/null +++ b/nixpkgs/pkgs/applications/misc/audio/soxr/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchurl, cmake }: + +stdenv.mkDerivation rec { + name = "soxr-0.1.3"; + + src = fetchurl { + url = "mirror://sourceforge/soxr/${name}-Source.tar.xz"; + sha256 = "12aql6svkplxq5fjycar18863hcq84c5kx8g6f4rj0lcvigw24di"; + }; + + outputs = [ "out" "doc" ]; # headers are just two and very small + + preConfigure = if stdenv.isDarwin then '' + export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:"`pwd`/build/src + '' else '' + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:"`pwd`/build/src + ''; + + nativeBuildInputs = [ cmake ]; + + meta = { + description = "An audio resampling library"; + homepage = http://soxr.sourceforge.net; + license = stdenv.lib.licenses.lgpl21Plus; + platforms = stdenv.lib.platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/applications/misc/audio/wavesurfer/default.nix b/nixpkgs/pkgs/applications/misc/audio/wavesurfer/default.nix new file mode 100644 index 000000000000..0add5ed78cc5 --- /dev/null +++ b/nixpkgs/pkgs/applications/misc/audio/wavesurfer/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchurl, snack, tcl, tk, makeWrapper }: + +stdenv.mkDerivation { + name = "wavesurfer-1.8.5"; + + src = fetchurl { + url = https://www.speech.kth.se/wavesurfer/wavesurfer-1.8.5.tar.gz; + sha256 = "1yx9s1j47cq0v40cwq2gn7bdizpw46l95ba4zl9z4gg31mfvm807"; + }; + + buildInputs = [ snack tcl tk makeWrapper ]; + + installPhase = '' + mkdir -p $out/{bin,nix-support,share/wavesurfer/} + mv doc $out/share/wavesurfer + mv * $out/nix-support + ln -s $out/{nix-support,bin}/wavesurfer.tcl + wrapProgram "$out/nix-support/wavesurfer.tcl" \ + --set TCLLIBPATH "${snack}/lib" \ + --prefix PATH : "${stdenv.lib.makeBinPath [ tcl tk ]}" + ''; + + meta = { + description = "Tool for recording, playing, editing, viewing and labeling of audio"; + homepage = http://www.speech.kth.se/wavesurfer/; + license = "BSD"; + }; +} diff --git a/nixpkgs/pkgs/applications/misc/audio/wavrsocvt/default.nix b/nixpkgs/pkgs/applications/misc/audio/wavrsocvt/default.nix new file mode 100644 index 000000000000..09b75e27d46a --- /dev/null +++ b/nixpkgs/pkgs/applications/misc/audio/wavrsocvt/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation { + name = "wavrsocvt-1.0.2.0"; + + src = fetchurl { + url = "http://bricxcc.sourceforge.net/wavrsocvt.tgz"; + sha256 = "15qlvdfwbiclljj7075ycm78yzqahzrgl4ky8pymix5179acm05h"; + }; + + phases = [ "unpackPhase" "installPhase" ]; + + unpackPhase = '' + tar -zxf $src + ''; + + installPhase = '' + mkdir -p $out/bin + cp wavrsocvt $out/bin + ''; + + meta = with stdenv.lib; { + description = "Convert .wav files into sound files for Lego NXT brick"; + longDescription = '' + wavrsocvt is a command-line utility which can be used from a + terminal window or script to convert .wav files into sound + files for the NXT brick (.rso files). It can also convert the + other direction (i.e., .rso -> .wav). It can produce RSO files + with a sample rate between 2000 and 16000 (the min/max range of + supported sample rates in the standard NXT firmware). + You can then upload these with e.g. nxt-python. + ''; + homepage = http://bricxcc.sourceforge.net/; + license = licenses.mpl11; + maintainers = with maintainers; [ leenaars ]; + platforms = with platforms; linux; + }; +} |