From 111f133db422e5629e79aeda45c1166ebbfcaf04 Mon Sep 17 00:00:00 2001 From: Paul Meyer <49727155+katexochen@users.noreply.github.com> Date: Fri, 7 Jun 2024 22:36:28 +0200 Subject: [PATCH] aws-assume-role: migrate to buildGoModule Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> --- pkgs/tools/admin/aws-assume-role/default.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/admin/aws-assume-role/default.nix b/pkgs/tools/admin/aws-assume-role/default.nix index 29dcac28c1e2..1e160919af4a 100644 --- a/pkgs/tools/admin/aws-assume-role/default.nix +++ b/pkgs/tools/admin/aws-assume-role/default.nix @@ -1,16 +1,14 @@ { lib , fetchFromGitHub -, buildGoPackage +, buildGoModule }: -buildGoPackage rec { +buildGoModule rec { pname = "aws-assume-role"; version = "0.3.2"; outputs = [ "out" "doc" ]; - goPackagePath = "github.com/remind101/assume-role"; - src = fetchFromGitHub { owner = "remind101"; repo = "assume-role"; @@ -18,8 +16,14 @@ buildGoPackage rec { sha256 = "sha256-7+9qi9lYzv1YCFhUyla+5Gqs5nBUiiazhFwiqHzMFd4="; }; + vendorHash = null; + + postPatch = '' + go mod init github.com/remind101/assume-role + ''; + postInstall = '' - install -Dm444 -t $out/share/doc/$name ./go/src/${goPackagePath}/README.md + install -Dm444 -t $out/share/doc/aws-assume-role README.md ''; meta = with lib; {