aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/libraries/kmsxx/default.nix
blob: 740248a7ae8f00fd7eb1e0a1aa1bb135299c91d7 (plain)
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
{ stdenv, fetchFromGitHub, cmake, pkgconfig, libdrm
, withPython ? false, python }:

stdenv.mkDerivation {
  pname = "kmsxx";
  version = "2020-02-14";

  src = fetchFromGitHub {
    owner = "tomba";
    repo = "kmsxx";
    fetchSubmodules = true;
    rev = "7c5e645112a899ad018219365c3898b0e896353f";
    sha256 = "1hj4gk4gwlvpjprjbrmrbrzqjhdgszsndrb1i4f9z7mjvdv8gij2";
  };

  enableParallelBuilding = true;

  cmakeFlags = stdenv.lib.optional (!withPython) "-DKMSXX_ENABLE_PYTHON=OFF";

  nativeBuildInputs = [ cmake pkgconfig ];
  buildInputs = [ libdrm python ];

  meta = with stdenv.lib; {
    description = "C++11 library, utilities and python bindings for Linux kernel mode setting";
    homepage = "https://github.com/tomba/kmsxx";
    license = licenses.mpl20;
    maintainers = with maintainers; [ gnidorah ];
    platforms = platforms.linux;
  };
}