diff --git a/pkgs/by-name/de/dependabot-cli/package.nix b/pkgs/by-name/de/dependabot-cli/package.nix index f7d225bd8004..04b67bf130d1 100644 --- a/pkgs/by-name/de/dependabot-cli/package.nix +++ b/pkgs/by-name/de/dependabot-cli/package.nix @@ -11,34 +11,20 @@ }: let pname = "dependabot-cli"; - version = "1.64.0"; + version = "1.65.0"; - # vv Also update this vv + # `tag` is what `dependabot` uses to find the relevant docker images. tag = "nixpkgs-dependabot-cli-${version}"; - updateJobProxy = dockerTools.pullImage { - imageName = "ghcr.io/github/dependabot-update-job-proxy/dependabot-update-job-proxy"; - # Get these hashes from - # 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} - imageDigest = "sha256:3030ba5ff8f556e47016fca94d81c677b5c6abde99fef228341e1537588e503a"; - hash = "sha256-RiXUae5ONScoDu85L6BEf3T4JodBYha6v+d9kWl8oWc="; + # Get these hashes from + # 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} + updateJobProxy.imageDigest = "sha256:ef245bd38aaa3cf89cafcffe0630d3ad3cff840488a2051a48517454e7f42368"; + updateJobProxy.hash = "sha256-yndoGLpyV2MiIs0QXbF/W0xJ6jtmnw/ezL54VM80/CI="; - # Don't update this, it's used to refer to the imported image later - finalImageName = "dependabot-update-job-proxy"; - finalImageTag = tag; - }; - - updaterGitHubActions = dockerTools.pullImage { - imageName = "ghcr.io/dependabot/dependabot-updater-github-actions"; - # Get these hashes from - # 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} - imageDigest = "sha256:a356576adbec11bc34b142b6ef69a5856a09dc3654bdc9f9b046c08ee2d73ff8"; - hash = "sha256-zqydb2v39xiSBT5ayWEacD0NIH6LoFX8lkRcCKppH08="; - - # Don't update this, it's used to refer to the imported image later - finalImageName = "dependabot-updater-github-actions"; - finalImageTag = tag; - }; + # Get these hashes from + # 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} + updaterGitHubActions.imageDigest = "sha256:adeaa00b4ae49e942adccec76d4487a393eebd0dec27cd75a3cdf6cc46d801d7"; + updaterGitHubActions.hash = "sha256-ni9rSEpeo0gIdYy2CIIpnIWg0kttoTnvRwbZ71QwmIg="; in buildGoModule { inherit pname version; @@ -47,7 +33,7 @@ buildGoModule { owner = "dependabot"; repo = "cli"; rev = "v${version}"; - hash = "sha256-NcmDYCXdhMY1KFz3if0XlX4EisQFr0YhJItllXnOfaA="; + hash = "sha256-A7CPn0YDeyr+d1OUde2TGfSt3eCfrK4k3S7NWsvCGx0="; }; vendorHash = "sha256-pnB1SkuEGm0KfkDfjnoff5fZRsAgD5w2H4UwsD3Jlbo="; @@ -85,14 +71,30 @@ buildGoModule { name = "dependabot-cli-with-docker-images"; paths = [ dependabot-cli ]; buildInputs = [ makeWrapper ]; - postBuild = '' - # Create a wrapper that pins the docker images that are depended upon - wrapProgram $out/bin/dependabot \ - --run "docker load --input ${updateJobProxy} >&2" \ - --add-flags "--proxy-image=dependabot-update-job-proxy:${tag}" \ - --run "docker load --input ${updaterGitHubActions} >&2" \ - --add-flags "--updater-image=dependabot-updater-github-actions:${tag}" - ''; + postBuild = + let + updateJobProxyImage = dockerTools.pullImage { + imageName = "ghcr.io/github/dependabot-update-job-proxy/dependabot-update-job-proxy"; + finalImageName = "dependabot-update-job-proxy"; + finalImageTag = tag; + inherit (updateJobProxy) imageDigest hash; + }; + + updaterGitHubActionsImage = dockerTools.pullImage { + imageName = "ghcr.io/dependabot/dependabot-updater-github-actions"; + finalImageName = "dependabot-updater-github-actions"; + finalImageTag = tag; + inherit (updaterGitHubActions) imageDigest hash; + }; + in + '' + # Create a wrapper that pins the docker images that `dependabot` uses. + wrapProgram $out/bin/dependabot \ + --run "docker load --input ${updateJobProxyImage} >&2" \ + --add-flags "--proxy-image=dependabot-update-job-proxy:${tag}" \ + --run "docker load --input ${updaterGitHubActionsImage} >&2" \ + --add-flags "--updater-image=dependabot-updater-github-actions:${tag}" + ''; }; passthru.tests.version = testers.testVersion {