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

solc: 0.4.11 -> 0.4.12 #27150

Merged
merged 1 commit into from
Jul 7, 2017
Merged

solc: 0.4.11 -> 0.4.12 #27150

merged 1 commit into from
Jul 7, 2017

Conversation

dbrock
Copy link
Contributor

@dbrock dbrock commented Jul 5, 2017

Motivation for this change
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
    • Linux
  • 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.

Sorry, something went wrong.

stdenv.mkDerivation rec {
version = "0.4.11";
stdenv.mkDerivation {
inherit version;
Copy link
Member

Choose a reason for hiding this comment

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

I believe this shouldn't be needed, I don't think mkDerivation cares about version attribute.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, thanks. Removing.

let jsoncpp = fetchzip {
url = https://github.com/open-source-parsers/jsoncpp/archive/1.7.7.tar.gz;
url = jsoncppURL;
sha256 = "0jz93zv17ir7lbxb3dv8ph2n916rajs8i96immwx9vb45pqid3n0";
}; in

Copy link
Member

Choose a reason for hiding this comment

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

Just a small stylistic comment - was there a reason to prefer this style over:

let rev = "194ff033ae44944ac59aa7bd3da89ba94ec5893c";
    sha256 = "0gkg3nay0625qmhxxxax1d1c4dl554ri3pkwd12qfg6g1w6j04w7";
    version = "0.4.12";
    jsoncppURL = https://github.com/open-source-parsers/jsoncpp/archive/1.7.7.tar.gz;
    ... rest of the bindings ...
in

which I find bit cleaner compared to nested let expressions.

Copy link
Contributor

Choose a reason for hiding this comment

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

Obviously, your version is better. The reason is likely inexperience.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, will fix.

};

patchPhase = ''
echo >commit_hash.txt ${commit}
echo >commit_hash.txt ${rev}
Copy link
Contributor

Choose a reason for hiding this comment

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

Requires quotes and almost nobody writes the I/O redirection that way.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since they are unary operators, I always write redirections without spaces. And I find it usually makes more sense to put them towards the front of the command.

I'll put in quotes though.

echo >prerelease.txt
substituteInPlace deps/jsoncpp.cmake \
--replace https://github.com/open-source-parsers/jsoncpp/archive/1.7.7.tar.gz ${jsoncpp}
--replace ${jsoncppURL} ${jsoncpp}
Copy link
Contributor

Choose a reason for hiding this comment

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

Quotes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By the way, is there a "shellquote" function? Putting a variable reference in quotes when you know for sure that the value doesn't contain any special characters seems a bit paranoid, especially since theoretically it could still break if there was a quotation mark in the value?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. So you think we should use it here?

Copy link
Contributor

Choose a reason for hiding this comment

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

@dbrock No, because you would require a cmake escape function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What's a cmake escape function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why should we use the quotes at all to begin with?

Please advise.

Copy link
Contributor

Choose a reason for hiding this comment

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

@dbrock There are two levels of code injection possible. One is in the builder (it should be safe to modify the URL to any value) and the other is in CMake.

I am not sure whether this level of correctness is actually achieved by the rest of NixPkgs and assuming you are just interested in getting this into NixPkgs, I am not the one holding back this PR, in case you were thinking that.

@dbrock
Copy link
Contributor Author

dbrock commented Jul 5, 2017

Should be better now!

@pSub pSub added the 8.has: package (update) This PR updates a package to a newer version label Jul 6, 2017
@Mic92 Mic92 merged commit a765577 into NixOS:master Jul 7, 2017
asymmetric added a commit to dapphub/dapptools that referenced this pull request Feb 25, 2019
Some versions of solc were merged with failing CI builds:

NixOS/nixpkgs#20098
NixOS/nixpkgs#27150
asymmetric added a commit to dapphub/dapptools that referenced this pull request Feb 25, 2019
Some versions of solc were merged with failing CI builds:

NixOS/nixpkgs#20098
NixOS/nixpkgs#27150
asymmetric added a commit to dapphub/dapptools that referenced this pull request Feb 25, 2019
Some versions of solc were merged with failing CI builds:

NixOS/nixpkgs#20098
NixOS/nixpkgs#27150
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: package (update) This PR updates a package to a newer version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants