Skip to content

Commit 3518436

Browse files
f4814jtojnar
authored andcommitted
bpm-tools: Specify dependencies and wrap executables
1 parent 99ab954 commit 3518436

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

pkgs/tools/audio/bpm-tools/default.nix

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
{
22
stdenv,
33
fetchurl,
4+
gnuplot,
5+
sox,
6+
flac,
7+
id3v2,
8+
vorbis-tools,
9+
makeWrapper
410
}:
511

12+
let
13+
path = stdenv.lib.makeBinPath [ gnuplot sox flac id3v2 vorbis-tools ];
14+
in
615
stdenv.mkDerivation rec {
716
pname = "bpm-tools";
817
version = "0.3";
@@ -12,15 +21,17 @@ stdenv.mkDerivation rec {
1221
sha256 = "151vfbs8h3cibs7kbdps5pqrsxhpjv16y2iyfqbxzsclylgfivrp";
1322
};
1423

15-
patchPhase = ''
16-
patchShebangs bpm-tag
17-
patchShebangs bpm-graph
18-
'';
24+
nativeBuildInputs = [ makeWrapper ];
1925

2026
installFlags = [
2127
"PREFIX=${placeholder "out"}"
2228
];
2329

30+
postFixup = ''
31+
wrapProgram $out/bin/bpm-tag --prefix PATH : "${path}"
32+
wrapProgram $out/bin/bpm-graph --prefix PATH : "${path}"
33+
'';
34+
2435
meta = with stdenv.lib; {
2536
homepage = "http://www.pogo.org.uk/~mark/bpm-tools/";
2637
description = "Automatically calculate BPM (tempo) of music files";

0 commit comments

Comments
 (0)