2024-06-06 12:31:17 -06:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchurl,
|
|
|
|
}:
|
|
|
|
let
|
2024-09-03 12:23:14 -06:00
|
|
|
version = "v1.19.1";
|
2024-06-06 12:31:17 -06:00
|
|
|
|
|
|
|
sources = {
|
|
|
|
x86_64-linux = {
|
|
|
|
url = "https://github.com/GoogleContainerTools/container-structure-test/releases/download/${version}/container-structure-test-linux-amd64";
|
2024-09-03 12:23:14 -06:00
|
|
|
hash = "sha256-7KScpej6Km4fuv6XJez4frLwXUm91lII2RLLT71YRrs=";
|
2024-06-06 12:31:17 -06:00
|
|
|
};
|
|
|
|
aarch64-linux = {
|
|
|
|
url = "https://github.com/GoogleContainerTools/container-structure-test/releases/download/${version}/container-structure-test-linux-arm64";
|
2024-09-03 12:23:14 -06:00
|
|
|
hash = "sha256-5MyjOzbDPrV5R3ldJCINipJPOILCzx8+xBVO4bxq9ic=";
|
2024-06-06 12:31:17 -06:00
|
|
|
};
|
|
|
|
x86_64-darwin = {
|
|
|
|
url = "https://github.com/GoogleContainerTools/container-structure-test/releases/download/${version}/container-structure-test-darwin-amd64";
|
2024-09-03 12:23:14 -06:00
|
|
|
hash = "sha256-2QwyKvgzOdGOEuZVwntCpBGBk0JnOLpYOoEYp48qB/I=";
|
2024-06-06 12:31:17 -06:00
|
|
|
};
|
|
|
|
aarch64-darwin = {
|
|
|
|
url = "https://github.com/GoogleContainerTools/container-structure-test/releases/download/${version}/container-structure-test-darwin-arm64";
|
2024-09-03 12:23:14 -06:00
|
|
|
hash = "sha256-x3RmVdDFmHoGOqX49OWeAab/6m1U0jq/g/30rNjj5aI=";
|
2024-06-06 12:31:17 -06:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit version;
|
|
|
|
pname = "container-structure-test";
|
|
|
|
src = fetchurl { inherit (sources.${stdenv.system}) url hash; };
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
install -Dm755 $src $out/bin/container-structure-test
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/GoogleContainerTools/container-structure-test";
|
|
|
|
description = "The Container Structure Tests provide a powerful framework to validate the structure of a container image.";
|
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = with lib.maintainers; [ rubenhoenle ];
|
|
|
|
platforms = builtins.attrNames sources;
|
|
|
|
mainProgram = "container-structure-test";
|
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
|
|
|
};
|
|
|
|
}
|