1{ stdenv, autoreconfHook, fetchgit, bison, flex, bluez, pkgconfig, gtk }:
2
3stdenv.mkDerivation rec {
4 name = "cwiid-2010-02-21-git";
5 src = fetchgit {
6 url = https://github.com/abstrakraft/cwiid;
7 sha256 = "6f5355d036dab017da713c49d3042011fa24fb732ed0d5ee338ab6f5ff400f06";
8 rev = "fadf11e89b579bcc0336a0692ac15c93785f3f82";
9 };
10 configureFlags = "--without-python";
11 prePatch = ''
12 sed -i -e '/$(LDCONFIG)/d' common/include/lib.mak.in
13 '';
14 buildInputs = [ autoreconfHook bison flex bluez pkgconfig gtk ];
15 postInstall = ''
16 # Some programs (for example, cabal-install) have problems with the double 0
17 sed -i -e "s/0.6.00/0.6.0/" $out/lib/pkgconfig/cwiid.pc
18 '';
19 meta = {
20 description = "Linux Nintendo Wiimote interface";
21 homepage = http://cwiid.org;
22 license = stdenv.lib.licenses.gpl2Plus;
23 maintainers = [ stdenv.lib.maintainers.bennofs ];
24 platforms = stdenv.lib.platforms.linux;
25 };
26}