1{ stdenv
2, fetchurl
3, bison
4, pkgconfig
5, python27 # >= 2.6
6, swig2 # 2.0
7, multipleOutputs ? false #Uses incomplete features of nix!
8}:
9
10stdenv.mkDerivation (rec {
11 name = "sphinxbase-5prealpha";
12
13 src = fetchurl {
14 url = "mirror://sourceforge/cmusphinx/${name}.tar.gz";
15 sha256 = "0vr4k8pv5a8nvq9yja7kl13b5lh0f9vha8fc8znqnm8bwmcxnazp";
16 };
17
18 nativeBuildInputs = [ pkgconfig ];
19 buildInputs = [ swig2 python27 bison ];
20
21 meta = {
22 description = "Support Library for Pocketsphinx";
23 homepage = http://cmusphinx.sourceforge.net;
24 license = stdenv.lib.licenses.bsd2;
25 platforms = stdenv.lib.platforms.unix;
26 maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
27 };
28
29} // (stdenv.lib.optionalAttrs multipleOutputs {
30 outputs = [ "out" "lib" "headers" ];
31
32 postInstall = ''
33 mkdir -p $lib
34 cp -av $out/lib* $lib
35
36 mkdir -p $headers
37 cp -av $out/include $headers
38 '';
39}))