about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/ois/default.nix
blob: 0a384b03bb2abd50c6e6e538748c024d3bc9986a (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
{ stdenv, lib, fetchFromGitHub, cmake, libX11, Cocoa, IOKit, Kernel }:

stdenv.mkDerivation rec {
  pname = "ois";
  version = "1.5.1";

  src = fetchFromGitHub {
    owner = "wgois";
    repo = "OIS";
    rev = "v${version}";
    sha256 = "sha256-ir6p+Tzf8L5VOW/rsG4yelsth7INbhABO2T7pfMHcFo=";
  };

  nativeBuildInputs = [ cmake ];

  buildInputs = lib.optionals stdenv.isLinux [ libX11 ]
    ++ lib.optionals stdenv.isDarwin [ Cocoa IOKit Kernel ];

  cmakeFlags = [
    "-DCMAKE_INSTALL_LIBDIR=lib"
  ];

  meta = with lib; {
    description = "Object-oriented C++ input system";
    maintainers = [ maintainers.raskin ];
    platforms = platforms.unix;
    license = licenses.zlib;
  };
}