Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 28 additions & 8 deletions pkgs/os-specific/linux/kmscon/default.nix
Original file line number Diff line number Diff line change
@@ -1,46 +1,66 @@
{ lib, stdenv
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, fetchpatch
, meson
, libtsm
, systemd
, libxkbcommon
, libdrm
, libGLU, libGL
, libGLU
, libGL
, pango
, pixman
, pkg-config
, docbook_xsl
, libxslt
, mesa
, ninja
}:

stdenv.mkDerivation rec {
pname = "kmscon";
version = "unstable-2018-09-07";
version = "9.0.0";

src = fetchFromGitHub {
owner = "Aetf";
repo = "kmscon";
rev = "01dd0a231e2125a40ceba5f59fd945ff29bf2cdc";
sha256 = "0q62kjsvy2iwy8adfiygx2bfwlh83rphgxbis95ycspqidg9py87";
rev = "v${version}";
sha256 = "sha256-8owyyzCrZVbWXcCR+RA+m0MOrdzW+efI+rIMWEVEZ1o=";
};

buildInputs = [
libGLU libGL
libGLU
libGL
libdrm
libtsm
libxkbcommon
libxslt
pango
pixman
systemd
mesa
];

nativeBuildInputs = [
autoreconfHook
meson
ninja
docbook_xsl
pkg-config
];

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, downstream packagers should never compile with Werror, since it can break on compiler updates. That's ubdesirable since a compiler update (generally) won't make the source code less safe in any way. And the compiler shouldn't be assumed anyway since different distros may use different compilers.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So my suggestion is to add a blanket -Wno-error (or set a flag that does that)


configureFlags = [
"--enable-multi-seat"
"--disable-debug"
Expand Down