nixpkgs/pkgs/applications/virtualization/dumb-init/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
873 B
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, glibc }:
2019-10-18 02:00:00 +00:00
stdenv.mkDerivation rec {
pname = "dumb-init";
2021-01-19 12:17:33 +00:00
version = "1.2.5";
2019-10-18 02:00:00 +00:00
src = fetchFromGitHub {
owner = "Yelp";
repo = pname;
rev = "v${version}";
2021-01-19 12:17:33 +00:00
sha256 = "sha256-aRh0xfmp+ToXIYjYaducTpZUHndZ5HlFZpFhzJ3yKgs=";
2019-10-18 02:00:00 +00:00
};
postPatch = lib.optionalString (!stdenv.hostPlatform.isStatic) ''
substituteInPlace Makefile --replace "-static" ""
'';
buildInputs = lib.optional (stdenv.hostPlatform.isGnu && stdenv.hostPlatform.isStatic) glibc.static;
2019-10-18 02:00:00 +00:00
installPhase = ''
runHook preInstall
install -Dm755 -t $out/bin dumb-init
runHook postInstall
'';
meta = with lib; {
2019-10-18 02:00:00 +00:00
description = "A minimal init system for Linux containers";
homepage = "https://github.com/Yelp/dumb-init";
license = licenses.mit;
maintainers = [ maintainers.marsam ];
platforms = platforms.linux;
};
}