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

awsebcli: clean up derivation #35380

Merged
merged 2 commits into from Feb 28, 2018
Merged

awsebcli: clean up derivation #35380

merged 2 commits into from Feb 28, 2018

Conversation

eqyiel
Copy link
Contributor

@eqyiel eqyiel commented Feb 23, 2018

Motivation for this change

Follow up from comments on #35315: #35315 (review)

cc @dotlambda, thank you for for the helpful suggestions.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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/)
  • Fits CONTRIBUTING.md.

pname = "docker-py";
version = "1.7.2";
name = "${pname}-${version}";
Copy link
Member

Choose a reason for hiding this comment

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

You can only drop that if you remove name from the pythonPackages.docker expression.

Copy link
Member

Choose a reason for hiding this comment

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

However, it seems to me like the docker dependency and some others were completely removed from awsebcli's setup.py. Please have a look.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right that docker-py is no longer required. docker is now an optional dependency. Even though it's an optional dependency the script is a bit evil, it will try and install docker using pip if you run a command that requires it. I'm not sure how to resolve this though, because the docker in nixpkgs requires a version of requests that awsebcli is not satisified with. I'll remove it for now.

Copy link
Member

@dotlambda dotlambda Feb 26, 2018

Choose a reason for hiding this comment

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

Okay, then we should try to add it nevertheless. Is there maybe a patch to make awsebcli work with a newer version of requests?

packageOverrides = self: super: {
cement = super.cement.overridePythonAttrs (oldAttrs: {
src = oldAttrs.src.override {
version = "2.8.2";
Copy link
Member

Choose a reason for hiding this comment

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

inherit version;

@@ -2,70 +2,52 @@
let

localPython = python.override {
packageOverrides = self: super: rec {
cement = super.cement.overridePythonAttrs (oldAttrs: rec {
version = "2.8.2";
Copy link
Member

Choose a reason for hiding this comment

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

Don't leave that out, otherwise the derivation will have a wrong name.

sha256 = "0zsqrzlybf25xscgi7ja4s48y2abf9wvjkn47wh984qgs1fq2xy5";
};
});

semantic-version = super.semantic-version.overridePythonAttrs (oldAttrs: rec {
version = "2.5.0";
Copy link
Member

Choose a reason for hiding this comment

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

Same here for version

sha256 = "0p5n3d6blgkncxdz00yxqav0cis87fisdkirjm0ljjh7rdfx7aiv";
};
});

tabulate = super.tabulate.overridePythonAttrs (oldAttrs: rec {
version = "0.7.5";
Copy link
Member

Choose a reason for hiding this comment

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

Same here

@eqyiel
Copy link
Contributor Author

eqyiel commented Feb 25, 2018

@dotlambda thanks again for the feedback, please take another look if you can

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

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

Please include (cherry-pick) this commit in your PR: dotlambda@b053d46
Otherwise, you would also have to override the name for those python modules specifying a name .

inherit version;
colorama = super.colorama.overridePythonAttrs (oldAttrs: {
src = oldAttrs.src.override {
version = "0.3.7";
Copy link
Member

Choose a reason for hiding this comment

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

inherit version

@@ -81,7 +59,7 @@ in with localPython.pkgs; buildPythonApplication rec {
doCheck = false;

propagatedBuildInputs = [
blessed botocore cement colorama docker dockerpty docopt pathspec pyyaml
blessed botocore cement colorama dockerpty docopt pathspec pyyaml
Copy link
Member

Choose a reason for hiding this comment

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

Maybe you could add a comment

# FIXME: Add optional docker dependency, which requires requests >= 2.14.2.
# Otherwise, awsebcli will try to install it using pip.

@dotlambda
Copy link
Member

Found a mistake in above commit, use this one instead: dotlambda@073ef99

@eqyiel
Copy link
Contributor Author

eqyiel commented Feb 27, 2018

@dotlambda I applied those changes on top of your commit and rebased 👍

@dotlambda
Copy link
Member

@GrahamcOfBorg build awsebcli

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

Successfully installed awsebcli-3.12.3
/tmp/nix-build-awsebcli-3.12.3.drv-0/awsebcli-3.12.3
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/r2q0apj9vp6qmlnr9aw797yf2axvqmm3-awsebcli-3.12.3
strip is /nix/store/b0zlxla7dmy1iwc3g459rjznx59797xy-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/r2q0apj9vp6qmlnr9aw797yf2axvqmm3-awsebcli-3.12.3/lib  /nix/store/r2q0apj9vp6qmlnr9aw797yf2axvqmm3-awsebcli-3.12.3/bin 
patching script interpreter paths in /nix/store/r2q0apj9vp6qmlnr9aw797yf2axvqmm3-awsebcli-3.12.3
checking for references to /tmp/nix-build-awsebcli-3.12.3.drv-0 in /nix/store/r2q0apj9vp6qmlnr9aw797yf2axvqmm3-awsebcli-3.12.3...
wrapping `/nix/store/r2q0apj9vp6qmlnr9aw797yf2axvqmm3-awsebcli-3.12.3/bin/ebp'...
wrapping `/nix/store/r2q0apj9vp6qmlnr9aw797yf2axvqmm3-awsebcli-3.12.3/bin/eb'...

@dotlambda dotlambda merged commit d63835d into NixOS:master Feb 28, 2018
@eqyiel
Copy link
Contributor Author

eqyiel commented Feb 28, 2018

@dotlambda thanks!

@eqyiel eqyiel deleted the awsebcli-cleanup branch February 28, 2018 02:06
@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

/build/awsebcli-3.12.3
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/l98nd84061xi3vy7valw29631izm0jfj-awsebcli-3.12.3
strip is /nix/store/viv0il4zpdqj4p7yamwbmn2k9pb8dcnv-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/l98nd84061xi3vy7valw29631izm0jfj-awsebcli-3.12.3/lib  /nix/store/l98nd84061xi3vy7valw29631izm0jfj-awsebcli-3.12.3/bin
patching script interpreter paths in /nix/store/l98nd84061xi3vy7valw29631izm0jfj-awsebcli-3.12.3
checking for references to /build in /nix/store/l98nd84061xi3vy7valw29631izm0jfj-awsebcli-3.12.3...
wrapping `/nix/store/l98nd84061xi3vy7valw29631izm0jfj-awsebcli-3.12.3/bin/eb'...
wrapping `/nix/store/l98nd84061xi3vy7valw29631izm0jfj-awsebcli-3.12.3/bin/ebp'...
/nix/store/l98nd84061xi3vy7valw29631izm0jfj-awsebcli-3.12.3

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

3 participants