Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, buildGoModule, fetchFromGitHub }: 2 3buildGoModule rec { 4 pname = "docker-compose"; 5 version = "2.18.1"; 6 7 src = fetchFromGitHub { 8 owner = "docker"; 9 repo = "compose"; 10 rev = "v${version}"; 11 sha256 = "sha256-Zx6yN3hQ3o2yvzNEJ65Q4dtnOvTg/tNa8MJvTZuwick="; 12 }; 13 14 postPatch = '' 15 # entirely separate package that breaks the build 16 rm -rf e2e/ 17 ''; 18 19 vendorHash = "sha256-RXxuHfNzJe+qLw4A+3jZQTJQgro5sXau4+Ff6OG0GtU="; 20 21 ldflags = [ "-X github.com/docker/compose/v2/internal.Version=${version}" "-s" "-w" ]; 22 23 doCheck = false; 24 installPhase = '' 25 runHook preInstall 26 install -D $GOPATH/bin/cmd $out/libexec/docker/cli-plugins/docker-compose 27 28 mkdir -p $out/bin 29 ln -s $out/libexec/docker/cli-plugins/docker-compose $out/bin/docker-compose 30 runHook postInstall 31 ''; 32 33 meta = with lib; { 34 description = "Docker CLI plugin to define and run multi-container applications with Docker"; 35 homepage = "https://github.com/docker/compose"; 36 license = licenses.asl20; 37 maintainers = with maintainers; [ babariviere SuperSandro2000 ]; 38 }; 39}