Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 stdenv, 3 fetchurl, 4 zstd, 5 lib, 6}: 7stdenv.mkDerivation (finalAttrs: { 8 pname = "docker-init"; 9 version = "1.4.0"; 10 11 tag = "175267"; 12 13 src = fetchurl { 14 url = "https://desktop.docker.com/linux/main/amd64/${finalAttrs.tag}/docker-desktop-x86_64.pkg.tar.zst"; 15 hash = "sha256-pxxlSN2sQqlPUzUPufcK8T+pvdr0cK+9hWTYzwMJv5I="; 16 }; 17 18 nativeBuildInputs = [ 19 zstd 20 ]; 21 22 unpackPhase = '' 23 runHook preUnpack 24 tar --zstd -xvf $src 25 runHook postUnpack 26 ''; 27 28 installPhase = '' 29 runHook preInstall 30 mkdir -p $out/{bin,libexec/docker/cli-plugins} 31 32 cp usr/lib/docker/cli-plugins/docker-init $out/libexec/docker/cli-plugins 33 ln -s $out/libexec/docker/cli-plugins/docker-init $out/bin/docker-init 34 runHook postInstall 35 ''; 36 37 meta = { 38 description = "Creates Docker-related starter files for your project"; 39 homepage = "https://docs.docker.com/reference/cli/docker/init"; 40 downloadPage = "https://docs.docker.com/desktop/release-notes"; 41 mainProgram = "docker-init"; 42 license = lib.licenses.unfree; 43 platforms = [ "x86_64-linux" ]; 44 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 45 maintainers = with lib.maintainers; [ BastianAsmussen ]; 46 }; 47})