mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-09 22:45:08 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
44 lines
1.0 KiB
Nix
44 lines
1.0 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, meson
|
|
, ninja
|
|
, cmake
|
|
, pkg-config
|
|
, libdrm
|
|
, fmt
|
|
, libevdev
|
|
, withPython ? false
|
|
, python3Packages
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "kmsxx";
|
|
version = "2021-07-26";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "tomba";
|
|
repo = "kmsxx";
|
|
fetchSubmodules = true;
|
|
rev = "54f591ec0de61dd192baf781c9b2ec87d5b461f7";
|
|
hash = "sha256-j+20WY4a2iTKZnYjXhxbNnZZ53K3dHpDMTp+ZulS+7c=";
|
|
};
|
|
|
|
# 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 ]);
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
mesonFlags = lib.optional (!withPython) "-Dpykms=disabled";
|
|
|
|
meta = with lib; {
|
|
description = "C++11 library, utilities and python bindings for Linux kernel mode setting";
|
|
homepage = "https://github.com/tomba/kmsxx";
|
|
license = licenses.mpl20;
|
|
maintainers = [ ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|