Files
nixpkgs/pkgs/by-name/di/dinit/package.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

56 lines
1.3 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
m4,
installShellFiles,
util-linux,
}:
stdenv.mkDerivation rec {
pname = "dinit";
version = "0.19.4";
src = fetchFromGitHub {
owner = "davmac314";
repo = "dinit";
rev = "v${version}";
# fix for case-insensitive filesystems
postFetch = ''
[ -f "$out/BUILD" ] && rm "$out/BUILD"
'';
hash = "sha256-IKT4k2eXCOCXtiypGbsIpN0OHS+WKqXvr4Mb61fbl0M=";
};
postPatch = ''
substituteInPlace src/shutdown.cc \
--replace-fail '"/bin/umount"' '"${util-linux}/bin/umount"' \
--replace-fail '"/sbin/swapoff"' '"${util-linux}/bin/swapoff"'
'';
nativeBuildInputs = [
m4
installShellFiles
];
configureFlags = [
"--prefix=${placeholder "out"}"
"--sbindir=${placeholder "out"}/bin"
];
postInstall = ''
installShellCompletion --cmd dinitctl \
--bash contrib/shell-completion/bash/dinitctl \
--fish contrib/shell-completion/fish/dinitctl.fish \
--zsh contrib/shell-completion/zsh/_dinit
'';
meta = {
description = "Service manager / supervision system, which can (on Linux) also function as a system manager and init";
homepage = "https://davmac.org/projects/dinit";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ aanderse ];
platforms = lib.platforms.unix;
};
}