2015-11-16 15:16:06 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, makeWrapper, docker, coreutils, procps, gnused, findutils, gnugrep }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "docker-gc-${rev}";
|
|
|
|
rev = "b0cc52aa3da2e2ac0080794e0be6e674b1f063fc";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
inherit rev;
|
|
|
|
owner = "spotify";
|
|
|
|
repo = "docker-gc";
|
|
|
|
sha256 = "07wf9yn0f771xkm3x12946x5rp83hxjkd70xgfgy35zvj27wskzm";
|
|
|
|
};
|
|
|
|
|
2021-02-07 10:17:39 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2015-11-16 15:16:06 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp docker-gc $out/bin
|
|
|
|
chmod +x $out/bin/docker-gc
|
|
|
|
wrapProgram $out/bin/docker-gc \
|
2021-01-15 06:42:41 +01:00
|
|
|
--prefix PATH : "${lib.makeBinPath [ docker coreutils procps gnused findutils gnugrep ]}"
|
2015-11-16 15:16:06 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Docker garbage collection of containers and images";
|
|
|
|
license = licenses.asl20;
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/spotify/docker-gc";
|
2015-11-16 15:16:06 +01:00
|
|
|
maintainers = with maintainers; [offline];
|
|
|
|
platforms = docker.meta.platforms;
|
|
|
|
};
|
|
|
|
}
|