docker-init: init at v1.30.0

This commit is contained in:
Bastian Asmussen
2024-12-03 01:15:15 +01:00
parent 41f5151102
commit 8acdab9b35
2 changed files with 51 additions and 3 deletions
@@ -8,12 +8,12 @@ rec {
, runcRev, runcHash
, containerdRev, containerdHash
, tiniRev, tiniHash
, buildxSupport ? true, composeSupport ? true, sbomSupport ? false
, buildxSupport ? true, composeSupport ? true, sbomSupport ? false, initSupport ? false
# package dependencies
, stdenv, fetchFromGitHub, fetchpatch, buildGoModule
, makeWrapper, installShellFiles, pkg-config, glibc
, go-md2man, go, containerd, runc, tini, libtool
, sqlite, iproute2, docker-buildx, docker-compose, docker-sbom
, sqlite, iproute2, docker-buildx, docker-compose, docker-sbom, docker-init
, iptables, e2fsprogs, xz, util-linux, xfsprogs, gitMinimal
, procps, rootlesskit, slirp4netns, fuse-overlayfs, nixosTests
, clientOnly ? !stdenv.hostPlatform.isLinux, symlinkJoin
@@ -179,7 +179,8 @@ rec {
plugins = lib.optional buildxSupport docker-buildx
++ lib.optional composeSupport docker-compose
++ lib.optional sbomSupport docker-sbom;
++ lib.optional sbomSupport docker-sbom
++ lib.optional initSupport docker-init;
pluginsRef = symlinkJoin { name = "docker-plugins"; paths = plugins; };
in
buildGoModule (lib.optionalAttrs (!clientOnly) {
+47
View File
@@ -0,0 +1,47 @@
{
stdenv,
fetchurl,
zstd,
lib,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "docker-init";
version = "v1.3.0";
tag = "157355";
src = fetchurl {
url = "https://desktop.docker.com/linux/main/amd64/${finalAttrs.tag}/docker-desktop-x86_64.pkg.tar.zst";
hash = "sha256-ysZorPBmoUvTJFFKDbZgQxPamONJKcXezmMrpZSVpwY=";
};
nativeBuildInputs = [
zstd
];
unpackPhase = ''
runHook preUnpack
tar --zstd -xvf $src
runHook postUnpack
'';
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,libexec/docker/cli-plugins}
cp usr/lib/docker/cli-plugins/docker-init $out/libexec/docker/cli-plugins
ln -s $out/libexec/docker/cli-plugins/docker-init $out/bin/docker-init
runHook postInstall
'';
meta = {
description = "Creates Docker-related starter files for your project";
homepage = "https://docs.docker.com/reference/cli/docker/init";
downloadPage = "https://docs.docker.com/desktop/release-notes/#4320";
mainProgram = "docker-init";
license = lib.licenses.unfree;
platforms = [ "x86_64-linux" ];
badPlatforms = lib.platforms.darwin;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
maintainers = with lib.maintainers; [ BastianAsmussen ];
};
})