2021-08-07 00:51:16 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, libdrm
|
|
|
|
, fmt
|
|
|
|
, libevdev
|
|
|
|
, withPython ? false
|
|
|
|
, python3Packages
|
|
|
|
}:
|
2017-10-06 20:17:14 +00:00
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2017-11-09 11:26:09 +00:00
|
|
|
pname = "kmsxx";
|
2021-08-07 00:51:16 +00:00
|
|
|
version = "2021-07-26";
|
2017-10-06 20:17:14 +00:00
|
|
|
|
2017-10-12 15:01:37 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tomba";
|
|
|
|
repo = "kmsxx";
|
2017-10-06 20:17:14 +00:00
|
|
|
fetchSubmodules = true;
|
2021-08-07 00:51:16 +00:00
|
|
|
rev = "54f591ec0de61dd192baf781c9b2ec87d5b461f7";
|
|
|
|
sha256 = "sha256-j+20WY4a2iTKZnYjXhxbNnZZ53K3dHpDMTp+ZulS+7c=";
|
2017-10-06 20:17:14 +00:00
|
|
|
};
|
|
|
|
|
2021-08-07 00:51:16 +00:00
|
|
|
# Didn't detect pybind11 without cmake
|
|
|
|
nativeBuildInputs = [ meson ninja pkg-config ] ++ lib.optionals withPython [ cmake ];
|
|
|
|
buildInputs = [ libdrm fmt libevdev ]
|
|
|
|
++ lib.optionals withPython (with python3Packages; [ python pybind11 ]);
|
2019-10-26 09:40:13 +00:00
|
|
|
|
2021-08-07 00:51:16 +00:00
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
|
|
|
mesonFlags = lib.optional (!withPython) "-Dpykms=disabled";
|
2017-10-08 11:47:25 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2017-10-06 20:17:14 +00:00
|
|
|
description = "C++11 library, utilities and python bindings for Linux kernel mode setting";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/tomba/kmsxx";
|
2017-10-06 20:17:14 +00:00
|
|
|
license = licenses.mpl20;
|
2021-04-29 05:21:13 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2017-10-06 20:17:14 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|