sessiond: update and patch utilities

This commit is contained in:
Gabriel Arazas 2024-01-21 19:11:12 +08:00
parent ee2a3853eb
commit 50e3f6f6f9
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
2 changed files with 63 additions and 6 deletions

View File

@ -0,0 +1,41 @@
From 43e2977af8b89ff713b3043ee2d7f0c8ad11b50e Mon Sep 17 00:00:00 2001
From: Gabriel Arazas <foodogsquared@foodogsquared.one>
Date: Sun, 21 Jan 2024 17:04:11 +0800
Subject: [PATCH 2/2] meson: Add python-sessiond installation
---
meson.build | 1 +
python-sessiond/meson.build | 12 ++++++++++++
2 files changed, 13 insertions(+)
create mode 100644 python-sessiond/meson.build
diff --git a/meson.build b/meson.build
index 20dd185..36ac465 100644
--- a/meson.build
+++ b/meson.build
@@ -131,3 +131,4 @@ foreach name, section : manpages
endforeach
subdir('test')
+subdir('python-sessiond')
diff --git a/python-sessiond/meson.build b/python-sessiond/meson.build
new file mode 100644
index 0000000..bbf071f
--- /dev/null
+++ b/python-sessiond/meson.build
@@ -0,0 +1,12 @@
+python = import('python')
+
+python_sessiond_srcs = [
+ 'sessiond.py'
+]
+
+py_installation = python.find_installation('python3', required: true)
+if not py_installation.found()
+ error('No python installation found')
+endif
+
+py_installation.install_sources(python_sessiond_srcs)
--
2.42.0

View File

@ -1,21 +1,24 @@
{ stdenv { lib
, lib
, fetchFromGitHub , fetchFromGitHub
, fetchpatch , fetchpatch
, meson , meson
, ninja , ninja
, pkg-config , pkg-config
, coreutils
, glib , glib
, gobject-introspection
, xorg , xorg
, udev , udev
, wireplumber , wireplumber
, pipewire , pipewire
, perl , perl
, python3Packages
}: }:
stdenv.mkDerivation rec { python3Packages.buildPythonPackage rec {
pname = "sessiond"; pname = "sessiond";
version = "0.6.1"; version = "0.6.1";
format = "other";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "jcrd"; owner = "jcrd";
@ -26,28 +29,41 @@ stdenv.mkDerivation rec {
patches = [ patches = [
(fetchpatch { (fetchpatch {
url = "https://github.com/jcrd/sessiond/pull/8.patch"; url = "https://github.com/jcrd/sessiond/commit/217ed63e2033c46c637e0564ef44ceaedff3e102.patch";
hash = "sha256-/GFPwJ4OBskavUJYhR5LGpt+HZABDOCpx6cVYDCYTNE="; hash = "sha256-/GFPwJ4OBskavUJYhR5LGpt+HZABDOCpx6cVYDCYTNE=";
}) })
./0002-meson-Add-python-sessiond-installation.patch
]; ];
nativeBuildInputs = [ nativeBuildInputs = [
meson meson
ninja ninja
pkg-config pkg-config
glib
gobject-introspection
perl
]; ];
buildInputs = [ buildInputs = [
glib
udev udev
xorg.libXi xorg.libXi
xorg.libX11 xorg.libX11
xorg.libXext xorg.libXext
wireplumber wireplumber
pipewire pipewire
perl
]; ];
propagatedBuildInputs = with python3Packages; [
dbus-python
];
postPatch = ''
substituteInPlace ./systemd/sessiond.service \
--replace '/usr/bin/kill' '${lib.getExe' coreutils "kill"}' \
--replace '/usr/bin' "${placeholder "out"}/bin"
'';
meta = with lib; { meta = with lib; {
homepage = "https://github.com/jcrd/sessiond"; homepage = "https://github.com/jcrd/sessiond";
description = "Standalone session manager for X11 window managers"; description = "Standalone session manager for X11 window managers";