diff options
author | Rafael Fernández López <ereslibre@ereslibre.es> | 2023-03-07 22:39:05 +0100 |
---|---|---|
committer | Cole Helbling <cole.e.helbling@outlook.com> | 2023-03-09 12:01:41 -0800 |
commit | 737e372a78fbbc4f9dd8bdb9c7eeefe4d1e233f8 (patch) | |
tree | 0c74baa169a4db856fec26bb2c1b037a5fccdb62 /pkgs/misc/fastly | |
parent | 8d8f5ede919dc60a86ac37311a63092411c72e90 (diff) |
fastly: use viceroy from nix
Diffstat (limited to 'pkgs/misc/fastly')
-rw-r--r-- | pkgs/misc/fastly/default.nix | 18 |
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 \ |