Skip to content
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

amazon-ecs-cli: init at 1.12.1 #52605

Merged
merged 1 commit into from Jan 2, 2019
Merged

Conversation

Scriptkiddi
Copy link
Contributor

Motivation for this change

SInce we needed this for the deployment process I figured I push it upstream

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

sha256 = "100iv4cchnxl1s02higga5v3hvawi4c7sqva97x34qigr4r7fxwm";
};

unpackCmd = "mkdir bin; cp $src ./bin/ecs-cli";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to me that unpackCmd and installPhase can be replaced with

install -D $src $out/bin/ecs-cli

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not found a way to disable the unpack phase, could you point me in the right direction?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A simple way to disable specific phases is to set them to ":", as in

{
   unpackPhase = ":";
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Using install would shorten it further, as noted above. Even simpler would be

runCommand "foo" { src = fetchurl { /* ... */ }; } ''install -D $src $out/bin/foo''

There may even be a suitable canned builder that captures this pattern entirely. That said I think what you have is acceptable as is ...

@joachifm joachifm merged commit 7db5406 into NixOS:master Jan 2, 2019
@Scriptkiddi Scriptkiddi deleted the amazon-ecs-cli branch January 3, 2019 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants