aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/tools/audio/bpm-tools/default.nix
blob: 6207cbeb9fe6c3b36dff70ee4283f1c662b3456e (plain)
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
33
34
35
36
37
38
39
40
41
42
43
{
  stdenv,
  fetchurl,
  gnuplot,
  sox,
  flac,
  id3v2,
  vorbis-tools,
  makeWrapper
}:

let
  path = stdenv.lib.makeBinPath [ gnuplot sox flac id3v2 vorbis-tools ];
in
stdenv.mkDerivation rec {
  pname = "bpm-tools";
  version = "0.3";

  src = fetchurl {
    url = "http://www.pogo.org.uk/~mark/bpm-tools/releases/bpm-tools-${version}.tar.gz";
    sha256 = "151vfbs8h3cibs7kbdps5pqrsxhpjv16y2iyfqbxzsclylgfivrp";
  };

  nativeBuildInputs = [ makeWrapper ];

  installFlags = [
    "PREFIX=${placeholder "out"}"
  ];

  postFixup = ''
    wrapProgram $out/bin/bpm-tag --prefix PATH : "${path}"
    wrapProgram $out/bin/bpm-graph --prefix PATH : "${path}"
  '';

  meta = with stdenv.lib; {
    homepage = "http://www.pogo.org.uk/~mark/bpm-tools/";
    description = "Automatically calculate BPM (tempo) of music files";
    license = licenses.gpl2;
    platforms = platforms.all;
    maintainers = with maintainers; [ doronbehar ];
  };
}