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

osm-cli: init at 0.1.0 #94748

Closed
wants to merge 2 commits into from
Closed

osm-cli: init at 0.1.0 #94748

wants to merge 2 commits into from

Conversation

lucperkins
Copy link
Contributor

@lucperkins lucperkins commented Aug 5, 2020

Motivation for this change

Added a package for the Open Service Mesh CLI tool.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@lucperkins
Copy link
Contributor Author

@danieldk Excellent suggestions! I have made those updates. Thank you for your speedy and thorough review 💯

@danieldk
Copy link
Contributor

danieldk commented Aug 6, 2020

One more question, I saw that the derivation is added to pkgs/applications/networking/cluster/osm/cli rather than pkgs/applications/networking/cluster/osm or pkgs/applications/networking/cluster/osm-cli. Any particular reason?

@lucperkins
Copy link
Contributor Author

@danieldk I arranged it that way because I think there may ultimately be multiple subpackages under this project, such as the controller.

@danieldk
Copy link
Contributor

danieldk commented Aug 6, 2020

@danieldk I arranged it that way because I think there may ultimately be multiple subpackages under this project, such as the controller.

I see. Wouldn't it make more sense to have a single package osm that installs both the controller and CLI, since they are part of the same source package?

If not, I'd put this derivation in pkgs/applications/networking/cluster/osm/cli.nix and then later factor out the common parts into a generic.nix. Then the controller could be in controller.nix.

But it seems most logical to have just a single package with both, unless there are very good reasons against that.

Comment on lines +3 to +17
let
pname = "osm-cli";
version = "0.1.0";
sha256 = "0hc63xvww4p4bqsq2ihz5in5ia9x7ibfa7ixd6fkxvdb1rbwxrx6";
vendorSha256 = "03qy4gl9lii4amsfg2y4ib5xwg74gri601pkfa3c7jwc034xf5kf";
in buildGoModule {
inherit pname version vendorSha256;

src = fetchFromGitHub {
inherit sha256;

owner = "openservicemesh";
repo = "osm";
rev = "v${version}";
};
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
let
pname = "osm-cli";
version = "0.1.0";
sha256 = "0hc63xvww4p4bqsq2ihz5in5ia9x7ibfa7ixd6fkxvdb1rbwxrx6";
vendorSha256 = "03qy4gl9lii4amsfg2y4ib5xwg74gri601pkfa3c7jwc034xf5kf";
in buildGoModule {
inherit pname version vendorSha256;
src = fetchFromGitHub {
inherit sha256;
owner = "openservicemesh";
repo = "osm";
rev = "v${version}";
};
buildGoModule rec {
pname = "osm-cli";
version = "0.1.0";
src = fetchFromGitHub {
owner = "openservicemesh";
repo = "osm";
rev = "v${version}";
sha256 = "0hc63xvww4p4bqsq2ihz5in5ia9x7ibfa7ixd6fkxvdb1rbwxrx6";
};
vendorSha256 = "03qy4gl9lii4amsfg2y4ib5xwg74gri601pkfa3c7jwc034xf5kf";

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 94748 run on x86_64-linux 1

1 package built:
  • osm-cli

@stale
Copy link

stale bot commented Jun 3, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2021
@lucperkins lucperkins closed this Aug 27, 2022
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