oddjob: move oddjobd.service SystemD service to lib/systemd/system

This commit is contained in:
Anthony Roussel 2024-04-07 00:30:21 +02:00
parent e3cd9db792
commit f42230b64c
No known key found for this signature in database
GPG Key ID: 9DC4987B1A55E75E

View File

@ -1,4 +1,5 @@
{ lib { lib
, fetchpatch
, fetchurl , fetchurl
, stdenv , stdenv
, autoreconfHook , autoreconfHook
@ -19,6 +20,14 @@ stdenv.mkDerivation rec {
hash = "sha256-SUOsMH55HtEsk5rX0CXK0apDObTj738FGOaL5xZRnIM="; hash = "sha256-SUOsMH55HtEsk5rX0CXK0apDObTj738FGOaL5xZRnIM=";
}; };
patches = [
# Define SystemD service location using `with-systemdsystemunitdir` configure flag
(fetchpatch {
url = "https://pagure.io/oddjob/c/f63287a35107385dcb6e04a4c742077c9d1eab86.patch";
hash = "sha256-2mmw4pJhrIk4/47FM8zKH0dTQJWnntHPNmq8VAUWqJI=";
})
];
nativeBuildInputs = [ nativeBuildInputs = [
autoreconfHook autoreconfHook
pkg-config pkg-config
@ -31,18 +40,12 @@ stdenv.mkDerivation rec {
systemd systemd
]; ];
postPatch = ''
substituteInPlace configure.ac \
--replace 'SYSTEMDSYSTEMUNITDIR=`pkg-config --variable=systemdsystemunitdir systemd 2> /dev/null`' "SYSTEMDSYSTEMUNITDIR=${placeholder "out"}" \
--replace 'SYSTEMDSYSTEMUNITDIR=`pkg-config --variable=systemdsystemunitdir systemd`' "SYSTEMDSYSTEMUNITDIR=${placeholder "out"}"
'';
configureFlags = [ configureFlags = [
"--prefix=${placeholder "out"}" "--prefix=${placeholder "out"}"
"--sysconfdir=${placeholder "out"}/etc" "--sysconfdir=${placeholder "out"}/etc"
"--with-selinux-acls=no" "--with-selinux-acls=no"
"--with-selinux-labels=no" "--with-selinux-labels=no"
"--disable-systemd" "--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
]; ];
postConfigure = '' postConfigure = ''