13 pname = "dependabot-cli";
16 # vv Also update this vv
17 tag = "nixpkgs-dependabot-cli-${version}";
18 updateJobProxy = dockerTools.pullImage {
19 imageName = "ghcr.io/github/dependabot-update-job-proxy/dependabot-update-job-proxy";
20 # Get these hashes from
21 # nix run nixpkgs#nix-prefetch-docker -- --image-name ghcr.io/github/dependabot-update-job-proxy/dependabot-update-job-proxy --image-tag latest --final-image-name dependabot-update-job-proxy --final-image-tag ${tag}
22 imageDigest = "sha256:cc4a9b7db8ddf3924b6c25cc8a74d9937bf803e64733035809862a1c0a6df984";
23 sha256 = "0wkr0rac7dp1080s4zik5yzi5967gkfylly2148ipgw50sp0sq8s";
25 # Don't update this, it's used to refer to the imported image later
26 finalImageName = "dependabot-update-job-proxy";
29 updaterGitHubActions = dockerTools.pullImage {
30 imageName = "ghcr.io/dependabot/dependabot-updater-github-actions";
31 # Get these hashes from
32 # nix run nixpkgs#nix-prefetch-docker -- --image-name ghcr.io/dependabot/dependabot-updater-github-actions --image-tag latest --final-image-name dependabot-updater-github-actions --final-image-tag ${tag}
33 imageDigest = "sha256:6665b3e26ef97577e83f2dfd0007a73c02b003126e72c0b4b196fe570088ed93";
34 sha256 = "0q7w3yp49wb70gkjjl2syvs75hm1jkva2qslzckwxh73z0kq2z0q";
36 # Don't update this, it's used to refer to the imported image later
37 finalImageName = "dependabot-updater-github-actions";
42 inherit pname version;
44 src = fetchFromGitHub {
48 hash = "sha256-ZT1fwDT19uUjp5iG0NLSrc/6PLW/sukAd0w66mLdFVg=";
51 vendorHash = "sha256-jSINiETadd0ixzFBilgphi1vJNsRYeDkbaVNk5stTp4=";
56 "-X github.com/dependabot/cli/cmd/dependabot/internal/cmd.version=v${version}"
65 installShellCompletion --cmd dependabot \
66 --bash <($out/bin/dependabot completion bash) \
67 --fish <($out/bin/dependabot completion fish) \
68 --zsh <($out/bin/dependabot completion zsh)
72 "-skip=TestDependabot"
75 doInstallCheck = true;
76 installCheckPhase = ''
77 $out/bin/dependabot --help
80 passthru.withDockerImages = symlinkJoin {
81 name = "dependabot-cli-with-docker-images";
82 paths = [ dependabot-cli ];
83 buildInputs = [ makeWrapper ];
85 # Create a wrapper that pins the docker images that are depended upon
86 wrapProgram $out/bin/dependabot \
87 --run "docker load --input ${updateJobProxy} >&2" \
88 --add-flags "--proxy-image=dependabot-update-job-proxy:${tag}" \
89 --run "docker load --input ${updaterGitHubActions} >&2" \
90 --add-flags "--updater-image=dependabot-updater-github-actions:${tag}"
94 passthru.tests.version = testers.testVersion {
95 package = dependabot-cli;
96 command = "dependabot --version";
97 version = "v${version}";
101 changelog = "https://github.com/dependabot/cli/releases/tag/v${version}";
102 description = "Tool for testing and debugging Dependabot update jobs";
103 mainProgram = "dependabot";
104 homepage = "https://github.com/dependabot/cli";
105 license = licenses.mit;
106 maintainers = with maintainers; [