Skip to content

Commit

Permalink
pkgs/ksmcon: bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
hustlerone committed Feb 20, 2025
1 parent 5cf107a commit 71aecd7
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 30 deletions.
43 changes: 13 additions & 30 deletions pkgs/by-name/km/kmscon/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
fetchpatch,
meson,
libtsm,
systemd,
systemdLibs,
libxkbcommon,
libdrm,
libGLU,
Expand All @@ -17,18 +17,18 @@
libxslt,
libgbm,
ninja,
check,
buildPackages,
}:

stdenv.mkDerivation rec {
pname = "kmscon";
version = "9.0.0";
version = "9.0.0-unstable-2025-01-09";

src = fetchFromGitHub {
owner = "Aetf";
repo = "kmscon";
rev = "v${version}";
sha256 = "sha256-8owyyzCrZVbWXcCR+RA+m0MOrdzW+efI+rIMWEVEZ1o=";
rev = "a81941f4464e6f9cee75bfb8a1db88c253ede33d";
sha256 = "sha256-l7Prt7CsYi4VCnp9xktvqqNT+4djSdO2GvP1JdxhNSI=";
};

strictDeps = true;
Expand All @@ -45,8 +45,9 @@ stdenv.mkDerivation rec {
libxkbcommon
pango
pixman
systemd
systemdLibs
libgbm
check
];

nativeBuildInputs = [
Expand All @@ -57,34 +58,16 @@ stdenv.mkDerivation rec {
libxslt # xsltproc
];

# Remove the patches attrlist once the package is bumped to something newer than both of these patches
patches = [
(fetchpatch {
name = "0001-tests-fix-warnings.patch";
url = "https://github.com/Aetf/kmscon/commit/b65f4269b03de580923ab390bde795e7956b633f.patch";
sha256 = "sha256-ngflPwmNMM/2JzhV+hHiH3efQyoSULfqEywzWox9iAQ=";
})
(fetchpatch {
# https://github.com/Aetf/kmscon/pull/96
name = "0002-runtime-fix-logout.patch";
url = "https://github.com/Aetf/kmscon/commit/a81941f4464e6f9cee75bfb8a1db88c253ede33d.patch";
sha256 = "sha256-geWu8MVsHKs8VHauh5Tf9eWJrdA5+0bPFAQ32T6Xsqg=";
})
];

# _FORTIFY_SOURCE requires compiling with optimization (-O)
env.NIX_CFLAGS_COMPILE =
lib.optionalString stdenv.cc.isGNU "-O" + " -Wno-error=maybe-uninitialized"; # https://github.com/Aetf/kmscon/issues/49

configureFlags = [
"--enable-multi-seat"
"--disable-debug"
"--enable-optimizations"
"--with-renderers=bbulk,gltex,pixman"
];
lib.optionalString stdenv.cc.isGNU "-O "
+ "-Wno-error=maybe-uninitialized -Wno-error=unused-result -Wno-error=implicit-function-declaration";

enableParallelBuilding = true;

patches = [
./sandbox.patch # Generate system units where they should be (nix store) instead of /etc/systemd/system
];

meta = with lib; {
description = "KMS/DRM based System Console";
mainProgram = "kmscon";
Expand Down
25 changes: 25 additions & 0 deletions pkgs/by-name/km/kmscon/sandbox.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From d51e35a7ab936983b2a544992adae66093c6028f Mon Sep 17 00:00:00 2001
From: hustlerone <[email protected]>
Date: Thu, 20 Feb 2025 11:05:56 +0100
Subject: [PATCH] Patch for nixpkgs

---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 964b44b..4415084 100644
--- a/meson.build
+++ b/meson.build
@@ -39,7 +39,7 @@ mandir = get_option('mandir')
moduledir = get_option('libdir') / meson.project_name()

systemd_deps = dependency('systemd', required: false)
-systemdsystemunitdir = systemd_deps.get_variable('systemdsystemunitdir', default_value: get_option('libdir') / 'systemd/system')
+systemdsystemunitdir = get_option('libdir') / 'systemd'

#
# Required dependencies
--
2.47.2

0 comments on commit 71aecd7

Please sign in to comment.