New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
copilot-cli: init at 0.6.0 #103255
copilot-cli: init at 0.6.0 #103255
Conversation
subPackages = [ "cmd/copilot" ]; | ||
|
||
buildFlagsArray = [ | ||
"-ldflags=-s -w -X github.com/aws/copilot-cli/internal/pkg/version.Version=${src.rev} -X github.com/aws/copilot-cli/internal/pkg/cli.binaryS3BucketPath=https://ecs-cli-v2-release.s3.amazonaws.com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm worried about this binaryS3BucketPath, if it's changed upstream we may not notice that in a regular update. Can you try to make this work using make instead? See #103037 for inspiration on how to do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, that's a good idea. It ends up being a lot cleaner too. Just switched over to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just 1 nit :)
buildPhase = '' | ||
make VERSION=${src.rev} compile-local | ||
''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be done using makeFlags
as well.
buildPhase = '' | |
make VERSION=${src.rev} compile-local | |
''; | |
makeFlags = [ "VERSION=${src.rev}" "compile-local" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I tried this out, but I'm getting a strange error when building with nixpkgs-review:
error: pkgs/tools/admin/copilot-cli/default.nix: No such file or directory
This might not be related, but it got me thinking... is makeFlags
maybe only part of mkDerivation
, and not buildGoModule
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use preBuild to keep
buildPhase = '' | |
make VERSION=${src.rev} compile-local | |
''; | |
buildFlagsArray = [ "-ldflags=-s -w -X github.com/aws/copilot-cli/internal/pkg/version.Version=${version} -X github.com/aws/copilot-cli/internal/pkg/cli.binaryS3BucketPath=https://ecs-cli-v2-release.s3.amazonaws.com" ]; |
Result of 1 package built:
|
Result of 1 package built:
|
buildPhase = '' | ||
make VERSION=${src.rev} compile-local | ||
''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use preBuild to keep
buildPhase = '' | |
make VERSION=${src.rev} compile-local | |
''; | |
buildFlagsArray = [ "-ldflags=-s -w -X github.com/aws/copilot-cli/internal/pkg/version.Version=${version} -X github.com/aws/copilot-cli/internal/pkg/cli.binaryS3BucketPath=https://ecs-cli-v2-release.s3.amazonaws.com" ]; |
I marked this as stale due to inactivity. → More info |
🎉 Superseded by #180844 |
Motivation for this change
Wanted to add Amazon's new copilot-cli. Set the version to the most recent that was released today.
The
ldflags
are long, but I believebinaryS3BucketPath
is needed based on the Makefile. Looks like it's used in the buildspec template file, to be used when setting up a pipeline.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)