2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-08-20 17:08:02 +00:00
|
|
|
, fetchFromGitHub
|
2022-09-09 14:08:57 +00:00
|
|
|
, fetchpatch
|
|
|
|
, meson
|
2020-04-24 23:36:52 +00:00
|
|
|
, libtsm
|
|
|
|
, systemd
|
|
|
|
, libxkbcommon
|
|
|
|
, libdrm
|
2022-09-09 14:08:57 +00:00
|
|
|
, libGLU
|
|
|
|
, libGL
|
2020-04-24 23:36:52 +00:00
|
|
|
, pango
|
|
|
|
, pixman
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, docbook_xsl
|
|
|
|
, libxslt
|
2022-09-09 14:08:57 +00:00
|
|
|
, mesa
|
|
|
|
, ninja
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-08-20 17:08:02 +00:00
|
|
|
pname = "kmscon";
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "9.0.0";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Aetf";
|
|
|
|
repo = "kmscon";
|
2022-09-09 14:08:57 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-8owyyzCrZVbWXcCR+RA+m0MOrdzW+efI+rIMWEVEZ1o=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2022-09-09 14:08:57 +00:00
|
|
|
libGLU
|
|
|
|
libGL
|
2020-08-20 17:08:02 +00:00
|
|
|
libdrm
|
2020-04-24 23:36:52 +00:00
|
|
|
libtsm
|
|
|
|
libxkbcommon
|
2020-08-20 17:08:02 +00:00
|
|
|
libxslt
|
2020-04-24 23:36:52 +00:00
|
|
|
pango
|
|
|
|
pixman
|
2020-08-20 17:08:02 +00:00
|
|
|
systemd
|
2022-09-09 14:08:57 +00:00
|
|
|
mesa
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
nativeBuildInputs = [
|
2022-09-09 14:08:57 +00:00
|
|
|
meson
|
|
|
|
ninja
|
2020-08-20 17:08:02 +00:00
|
|
|
docbook_xsl
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-08-20 17:08:02 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "0001-tests-fix-warnings.patch";
|
|
|
|
url = "https://github.com/Aetf/kmscon/commit/b65f4269b03de580923ab390bde795e7956b633f.patch";
|
|
|
|
sha256 = "sha256-ngflPwmNMM/2JzhV+hHiH3efQyoSULfqEywzWox9iAQ=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
# _FORTIFY_SOURCE requires compiling with optimization (-O)
|
|
|
|
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-O"
|
|
|
|
+ " -Wno-error=maybe-uninitialized"; # https://github.com/Aetf/kmscon/issues/49
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-multi-seat"
|
|
|
|
"--disable-debug"
|
|
|
|
"--enable-optimizations"
|
|
|
|
"--with-renderers=bbulk,gltex,pixman"
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "KMS/DRM based System Console";
|
|
|
|
homepage = "http://www.freedesktop.org/wiki/Software/kmscon/";
|
2020-08-20 17:08:02 +00:00
|
|
|
license = licenses.mit;
|
2020-11-03 02:18:15 +00:00
|
|
|
maintainers = with maintainers; [ omasanori ];
|
2020-08-20 17:08:02 +00:00
|
|
|
platforms = platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|