summary refs log tree commit diff
path: root/pkgs/applications/misc/audio/wavesurfer/default.nix
blob: b7e738cfc125ff179df5c5babca530d87cc95493 (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
{ lib, stdenv, fetchurl, snack, tcl, tk, makeWrapper }:

stdenv.mkDerivation {
  name = "wavesurfer-1.8.5";

  src = fetchurl {
    url = "https://www.speech.kth.se/wavesurfer/wavesurfer-1.8.5.tar.gz";
    sha256 = "1yx9s1j47cq0v40cwq2gn7bdizpw46l95ba4zl9z4gg31mfvm807";
  };

  nativeBuildInputs = [ makeWrapper ];
  buildInputs = [ snack tcl tk ];

  installPhase = ''
    mkdir -p $out/{bin,nix-support,share/wavesurfer/}
    mv doc $out/share/wavesurfer
    mv * $out/nix-support
    ln -s $out/{nix-support,bin}/wavesurfer.tcl
    wrapProgram "$out/nix-support/wavesurfer.tcl"  \
                 --set TCLLIBPATH "${snack}/lib" \
                 --prefix PATH : "${lib.makeBinPath [ tcl tk ]}"
  '';

  meta = {
    description = "Tool for recording, playing, editing, viewing and labeling of audio";
    homepage = "http://www.speech.kth.se/wavesurfer/";
    license = lib.licenses.bsd0;
  };
}