@@ -1,41 +1,24 @@
1−{ stdenv, fetchurl, autoconf, automake, libtool, libX11, xorgproto
2−, libXi, libXaw, libXmu, libXt }:
3−
4−let
5− majorVersion = "1";
6− minorVersion = "3";
7−in
1+{ stdenv, lib, fetchFromGitHub, cmake, libX11, Cocoa, IOKit, Kernel }:
82
93stdenv.mkDerivation rec {
104 pname = "ois";
11− version = "${majorVersion}.${minorVersion}";
5+ version = "1.5";
126
13− src = fetchurl {
14− url = "mirror://sourceforge/project/wgois/Source%20Release/${version}/ois_v${majorVersion}-${minorVersion}.tar.gz";
15− sha256 = "18gs6xxhbqb91x2gm95hh1pmakimqim1k9c65h7ah6g14zc7dyjh";
7+ src = fetchFromGitHub {
8+ owner = "wgois";
9+ repo = "OIS";
10+ rev = "v${version}";
11+ sha256 = "0g8krgq5bdx2rw7ig0xva4kqv4x815672i7z6lljp3n8847wmypa";
1612 };
1713
18− patches = [
19− (fetchurl {
20− url = "http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-games/ois/files/ois-1.3-gcc47.patch";
21− sha256 = "026jw06n42bcrmg0sbdhzc4cqxsnf7fw30a2z9cigd9x282zhii8";
22− name = "gcc47.patch";
23− })
24− ];
25−
26− patchFlags = [ "-p0" ];
27−
28− buildInputs = [
29− autoconf automake libtool libX11 xorgproto libXi libXaw
30− libXmu libXt
31− ];
14+ nativeBuildInputs = [ cmake ];
3215
33− preConfigure = "sh bootstrap";
16+ buildInputs = [ libX11 ] ++ lib.optionals stdenv.isDarwin [ Cocoa IOKit Kernel ];
3417
3518 meta = with stdenv.lib; {
3619 description = "Object-oriented C++ input system";
3720 maintainers = [ maintainers.raskin ];
38− platforms = platforms.linux;
21+ platforms = platforms.unix;
3922 license = licenses.zlib;
4023 };
4124}