about summary refs log tree commit diff
path: root/pkgs/misc
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2023-03-10 01:50:42 +0100
committerMartin Weinelt <hexa@darmstadt.ccc.de>2023-03-10 01:50:42 +0100
commitda1a690688b0e6923ccb86ea7b7f59fa7df85db0 (patch)
tree0b05d9cae897082b181ee2d4ea8567fb1a91e092 /pkgs/misc
parent84655541f1b937e79f88c13aed1a66f1ce16da59 (diff)
parent3c935c73e03b27e45d99f127f83848b807e60d7b (diff)
Merge remote-tracking branch 'origin/master' into staging-next
Diffstat (limited to 'pkgs/misc')
-rw-r--r--pkgs/misc/fastly/default.nix18
1 files changed, 13 insertions, 5 deletions
diff --git a/pkgs/misc/fastly/default.nix b/pkgs/misc/fastly/default.nix
index e8db6a8eeccfe..743d8cd1c5f25 100644
--- a/pkgs/misc/fastly/default.nix
+++ b/pkgs/misc/fastly/default.nix
@@ -4,17 +4,19 @@
 , installShellFiles
 , buildGoModule
 , go
+, makeWrapper
+, viceroy
 }:
 
 buildGoModule rec {
   pname = "fastly";
-  version = "7.0.1";
+  version = "8.0.0";
 
   src = fetchFromGitHub {
     owner = "fastly";
     repo = "cli";
     rev = "refs/tags/v${version}";
-    hash = "sha256-6M1vdwtw+qjKldW642JN2sanaKV3u9J1qWAoLRNupzE=";
+    hash = "sha256-Bwof1Np0eSjmBXQ6dqFmw3TA/2u+VzzyIn/95m9eXVo=";
     # The git commit is part of the `fastly version` original output;
     # leave that output the same in nixpkgs. Use the `.git` directory
     # to retrieve the commit SHA, and remove the directory afterwards,
@@ -31,10 +33,11 @@ buildGoModule rec {
     "cmd/fastly"
   ];
 
-  vendorHash = "sha256-oQwlhlZHpUvGaOyozBpK5W9glzo8VKH7S3vih5c15OA=";
+  vendorHash = "sha256-/tdvIX839NkhUoj/bfJ/68K8RtPCidydNQZCdDvizzU=";
 
   nativeBuildInputs = [
     installShellFiles
+    makeWrapper
   ];
 
   # Flags as provided by the build automation of the project:
@@ -49,14 +52,19 @@ buildGoModule rec {
   ];
   preBuild = let
     cliConfigToml = fetchurl {
-      url = "https://web.archive.org/web/20230207211120/https://developer.fastly.com/api/internal/cli-config";
-      hash = "sha256-Vkl8V5AkiJMZLswSN0vTnz7S7/5lXftlWD5UZh//vUw=";
+      url = "https://web.archive.org/web/20230308181550/https://developer.fastly.com/api/internal/cli-config";
+      hash = "sha256-Y2KBTiUQlugKjfhOY+8W7/IUSjgeRVc2NgmL+nhb6aQ=";
     };
   in ''
     cp ${cliConfigToml} ./pkg/config/config.toml
     ldflags+=" -X github.com/fastly/cli/pkg/revision.GitCommit=$(cat COMMIT)"
   '';
 
+  preFixup = ''
+    wrapProgram $out/bin/fastly --prefix PATH : ${lib.makeBinPath [ viceroy ]} \
+      --set FASTLY_VICEROY_USE_PATH 1
+  '';
+
   postInstall = ''
     export HOME="$(mktemp -d)"
     installShellCompletion --cmd fastly \