Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
75 lines
1.4 KiB
Nix
75 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
autoreconfHook,
|
|
pkg-config,
|
|
libite,
|
|
libuev,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "finit";
|
|
version = "4.14";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "troglobit";
|
|
repo = "finit";
|
|
tag = finalAttrs.version;
|
|
hash = "sha256-v4QHc6pX50z4j4UBpw7J2k78Pqt7n503qiDRDWyrhOc=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace plugins/modprobe.c --replace-fail \
|
|
'"/lib/modules"' '"/run/booted-system/kernel-modules/lib/modules"'
|
|
'';
|
|
|
|
strictDeps = true;
|
|
|
|
nativeBuildInputs = [
|
|
autoreconfHook
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
libite
|
|
libuev
|
|
];
|
|
|
|
outputs = [
|
|
"out"
|
|
"dev"
|
|
"doc"
|
|
];
|
|
|
|
configureFlags = [
|
|
"--sysconfdir=/etc"
|
|
"--localstatedir=/var"
|
|
|
|
# tweak default plugin list
|
|
"--enable-modprobe-plugin=yes"
|
|
"--enable-modules-load-plugin=yes"
|
|
"--enable-hotplug-plugin=no"
|
|
|
|
# minimal replacement for systemd notification library
|
|
"--with-libsystemd"
|
|
|
|
# monitor kernel events, like ac power status
|
|
"--with-keventd"
|
|
];
|
|
|
|
env.NIX_CFLAGS_COMPILE = toString [
|
|
"-D_PATH_LOGIN=\"/run/current-system/sw/bin/login\""
|
|
"-DSYSCTL_PATH=\"/run/current-system/sw/bin/sysctl\""
|
|
];
|
|
|
|
meta = {
|
|
description = "Fast init for Linux";
|
|
mainProgram = "initctl";
|
|
homepage = "https://troglobit.com/projects/finit/";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ aanderse ];
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
})
|