6d4aeb4377
GitOrigin-RevId: 0f213d0fee84280d8c3a97f7469b988d6fe5fcdf
35 lines
873 B
Nix
35 lines
873 B
Nix
{ lib, stdenv, fetchFromGitHub, glibc }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "dumb-init";
|
|
version = "1.2.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Yelp";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-aRh0xfmp+ToXIYjYaducTpZUHndZ5HlFZpFhzJ3yKgs=";
|
|
};
|
|
|
|
postPatch = lib.optionalString (!stdenv.hostPlatform.isStatic) ''
|
|
substituteInPlace Makefile --replace "-static" ""
|
|
'';
|
|
|
|
buildInputs = lib.optional (stdenv.hostPlatform.isGnu && stdenv.hostPlatform.isStatic) glibc.static;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -Dm755 -t $out/bin dumb-init
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A minimal init system for Linux containers";
|
|
homepage = "https://github.com/Yelp/dumb-init";
|
|
license = licenses.mit;
|
|
maintainers = [ maintainers.marsam ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|