diff --git a/pkgs/development/libraries/kmsxx/default.nix b/pkgs/development/libraries/kmsxx/default.nix index 222747b4d734..a07bc73a64ce 100644 --- a/pkgs/development/libraries/kmsxx/default.nix +++ b/pkgs/development/libraries/kmsxx/default.nix @@ -1,22 +1,37 @@ -{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libdrm -, withPython ? false, python ? null }: +{ lib +, stdenv +, fetchFromGitHub +, meson +, ninja +, cmake +, pkg-config +, libdrm +, fmt +, libevdev +, withPython ? false +, python3Packages +}: stdenv.mkDerivation { pname = "kmsxx"; - version = "2020-08-04"; + version = "2021-07-26"; src = fetchFromGitHub { owner = "tomba"; repo = "kmsxx"; fetchSubmodules = true; - rev = "38bee3092f2d477f1baebfcae464f888d3d04bbe"; - sha256 = "0xz4m9bk0naawxwpx5cy1j3cm6c8c9m5y551csk88y88x1g0z0xh"; + rev = "54f591ec0de61dd192baf781c9b2ec87d5b461f7"; + sha256 = "sha256-j+20WY4a2iTKZnYjXhxbNnZZ53K3dHpDMTp+ZulS+7c="; }; - cmakeFlags = lib.optional (!withPython) "-DKMSXX_ENABLE_PYTHON=OFF"; + # 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 ]); - nativeBuildInputs = [ cmake pkg-config ]; - buildInputs = [ libdrm ] ++ lib.optionals withPython [ python ]; + dontUseCmakeConfigure = true; + + mesonFlags = lib.optional (!withPython) "-Dpykms=disabled"; meta = with lib; { description = "C++11 library, utilities and python bindings for Linux kernel mode setting"; @@ -24,6 +39,5 @@ stdenv.mkDerivation { license = licenses.mpl20; maintainers = with maintainers; [ ]; platforms = platforms.linux; - broken = true; # marked broken 2021-03-26 }; } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 569159cfcdd6..147f55fca001 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3944,10 +3944,9 @@ in { kmapper = callPackage ../development/python-modules/kmapper { }; - kmsxx = toPythonModule ((callPackage ../development/libraries/kmsxx { - inherit (pkgs.kmsxx) stdenv; + kmsxx = toPythonModule (pkgs.kmsxx.override { withPython = true; - }).overrideAttrs (oldAttrs: { name = "${python.libPrefix}-${pkgs.kmsxx.name}"; })); + }); knack = callPackage ../development/python-modules/knack { };