about summary refs log tree commit diff
path: root/nixpkgs/pkgs/build-support/docker/nix-prefetch-docker.nix
blob: 61e917461ed9b8d30ef8b4bc8b0579b8567615a7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{ lib, stdenv, makeWrapper, nix, skopeo, jq }:

stdenv.mkDerivation {
  name = "nix-prefetch-docker";

  nativeBuildInputs = [ makeWrapper ];

  dontUnpack = true;

  installPhase = ''
    install -vD ${./nix-prefetch-docker} $out/bin/$name;
    wrapProgram $out/bin/$name \
      --prefix PATH : ${lib.makeBinPath [ nix skopeo jq ]} \
      --set HOME /homeless-shelter
  '';

  preferLocalBuild = true;

  meta = with lib; {
    description = "Script used to obtain source hashes for dockerTools.pullImage";
    maintainers = with maintainers; [ offline ];
    platforms = platforms.unix;
  };
}