mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-18 03:34:58 +00:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
37 lines
882 B
Nix
37 lines
882 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 = "Minimal init system for Linux containers";
|
|
homepage = "https://github.com/Yelp/dumb-init";
|
|
license = licenses.mit;
|
|
maintainers = [ ];
|
|
platforms = platforms.unix;
|
|
mainProgram = "dumb-init";
|
|
};
|
|
}
|