lol
1{ lib, stdenv, fetchFromGitHub, autoreconfHook, bison, flex, bluez, pkg-config, gtk2 }:
2
3stdenv.mkDerivation rec {
4 pname = "cwiid";
5 version = "unstable-2010-02-21";
6
7 src = fetchFromGitHub {
8 owner = "abstrakraft";
9 repo = "cwiid";
10 rev = "fadf11e89b579bcc0336a0692ac15c93785f3f82";
11 sha256 = "0qdb0x757k76nfj32xc2nrrdqd9jlwgg63vfn02l2iznnzahxp0h";
12 };
13
14 hardeningDisable = [ "format" ];
15
16 configureFlags = [ "--without-python" ];
17
18 prePatch = ''
19 sed -i -e '/$(LDCONFIG)/d' common/include/lib.mak.in
20 '';
21
22 buildInputs = [ bison flex bluez gtk2 ];
23
24 nativeBuildInputs = [ autoreconfHook pkg-config ];
25
26 NIX_LDFLAGS = "-lbluetooth";
27
28 postInstall = ''
29 # Some programs (for example, cabal-install) have problems with the double 0
30 sed -i -e "s/0.6.00/0.6.0/" $out/lib/pkgconfig/cwiid.pc
31 '';
32
33 meta = with lib; {
34 description = "Linux Nintendo Wiimote interface";
35 homepage = "http://cwiid.org";
36 license = licenses.gpl2Plus;
37 maintainers = with maintainers; [ bennofs ];
38 platforms = platforms.linux;
39 };
40}