about summary refs log tree commit diff
path: root/pkgs/tools/audio/bpm-tools/default.nix
blob: e791c838422aab2c075da44d63b12faaf1255464 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
{ stdenv
, lib
, fetchurl
, gnuplot
, sox
, flac
, id3v2
, vorbis-tools
, makeWrapper
}:

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

  src = fetchurl {
    url = "http://www.pogo.org.uk/~mark/bpm-tools/releases/bpm-tools-${finalAttrs.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 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 ];
  };
})