2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, glibc }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dumb-init";
|
2021-02-05 17:12:51 +00:00
|
|
|
version = "1.2.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Yelp";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-02-05 17:12:51 +00:00
|
|
|
sha256 = "sha256-aRh0xfmp+ToXIYjYaducTpZUHndZ5HlFZpFhzJ3yKgs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
postPatch = lib.optionalString (!stdenv.hostPlatform.isStatic) ''
|
|
|
|
substituteInPlace Makefile --replace "-static" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = lib.optional (stdenv.hostPlatform.isGnu && stdenv.hostPlatform.isStatic) glibc.static;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -Dm755 -t $out/bin dumb-init
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A minimal init system for Linux containers";
|
|
|
|
homepage = "https://github.com/Yelp/dumb-init";
|
|
|
|
license = licenses.mit;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = [ ];
|
|
|
|
platforms = platforms.unix;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "dumb-init";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|