dockerTools: add nix-prefetch-docker script

This commit is contained in:
Jaka Hudoklin
2019-04-06 14:16:40 +02:00
committed by Jaka Hudoklin
parent 373488e6f4
commit c1f0d19785
4 changed files with 230 additions and 12 deletions
@@ -0,0 +1,26 @@
{ stdenv, makeWrapper, nix, skopeo }:
with stdenv.lib;
stdenv.mkDerivation {
name = "nix-prefetch-docker";
nativeBuildInputs = [ makeWrapper ];
unpackPhase = ":";
installPhase = ''
install -vD ${./nix-prefetch-docker} $out/bin/$name;
wrapProgram $out/bin/$name \
--prefix PATH : ${makeBinPath [ nix skopeo ]} \
--set HOME /homeless-shelter
'';
preferLocalBuild = true;
meta = {
description = "Script used to obtain source hashes for dockerTools.pullImage";
maintainers = with maintainers; [ offline ];
platforms = platforms.unix;
};
}