summary refs log tree commit diff
path: root/pkgs/development/libraries/libsamplerate/default.nix
blob: a30a2884c6a3024e48f30554735c1f2d97c9581d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
args: with args;
stdenv.mkDerivation {

  name = "libsamplerate-0.1.2";

  src = args.fetchurl {
    url = http://www.mega-nerd.com/SRC/libsamplerate-0.1.2.tar.gz;
    sha256 = "1m1iwzpcny42kcqv5as2nyb0ggrb56wzckpximqpp2y74dipdf4q";
  };


  buildInputs = ["pkgconfig"];
  # maybe interesting configure flags:
  #--disable-fftw          disable usage of FFTW
  #--disable-cpu-clip      disable tricky cpu specific clipper

  configurePhase = "
   export LIBSAMPLERATE_CFLAGS=\"-I \$libsamplerate/include\"
   export LIBSAMPLERATE_LIBS=\"-L \$libsamplerate/libs\"
   ./configure --prefix=\$out";

  meta = {
    description = "Sample Rate Converter for audio";
    homepage = http://www.mega-nerd.com/SRC/index.html;
    # you can choose one of the following licenses:
    license = [
      "GPL"
      # http://www.mega-nerd.com/SRC/libsamplerate-cul.pdf
      "libsamplerate Commercial Use License"
    ];
  };
}