summary refs log tree commit diff
path: root/pkgs/applications/audio/vkeybd/default.nix
blob: 3f77a6574724f8ef60122ea46c5459077c2ba78d (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
{ stdenv, fetchurl, alsaLib, libX11, makeWrapper, tcl, tk }:

stdenv.mkDerivation  rec {
  pname = "vkeybd";
  version = "0.1.18d";

  src = fetchurl {
    url = "ftp://ftp.suse.com/pub/people/tiwai/vkeybd/${pname}-${version}.tar.bz2";
    sha256 = "0107b5j1gf7dwp7qb4w2snj4bqiyps53d66qzl2rwj4jfpakws5a";
  };

  buildInputs = [ alsaLib libX11 makeWrapper tcl tk ];

  configurePhase = ''
    mkdir -p $out/bin
    sed -e "s@/usr/local@$out@" -i Makefile
  '';

  makeFlags = [ "TKLIB=-l${tk.libPrefix}" "TCLLIB=-l${tcl.libPrefix}" ];

  postInstall = ''
    wrapProgram $out/bin/vkeybd --set TK_LIBRARY "${tk}/lib/${tk.libPrefix}"
  '';

  meta = with stdenv.lib; {
    description = "Virtual MIDI keyboard";
    homepage = https://www.alsa-project.org/~tiwai/alsa.html;
    license = licenses.gpl2Plus;
    platforms = platforms.linux;
    maintainers = [ maintainers.goibhniu ];
  };
}