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

Coq: minor refactoring #21879

Merged
merged 3 commits into from Jan 25, 2017
Merged

Coq: minor refactoring #21879

merged 3 commits into from Jan 25, 2017

Conversation

vbgl
Copy link
Contributor

@vbgl vbgl commented Jan 14, 2017

Motivation for this change

Remove some duplication and ease future maintenance.

Things done

nox-review says: “Nothing changed”.

If someone has a better way to compute coq-version, please share it!

@rht
Copy link
Member

rht commented Jan 14, 2017

It wouldn't be possible for @vbgl to peer-review @vbgl's own commits, would it?

@@ -19,8 +20,8 @@ let
"8.6" = "1pw1xvy1657l1k69wrb911iqqflzhhp8wwsjvihbgc72r3skqg3f";
}."${version}";
coq-version = builtins.substring 0 3 version;
buildIde = lablgtk != null;
ideFlags = if buildIde then "-lablgtkdir ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else "";
camlp5 = ocamlPackages.camlp5_transitional;
Copy link
Member

Choose a reason for hiding this comment

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

It would have been simpler if ocaml, findlib, lablgtk are defined this way. Then the inherit can be made 1 line, and buildInputs doesn't require the ocamlPackages namespace prefix.

Copy link
Member

Choose a reason for hiding this comment

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

ic, this is specific to camlp5_transitional. The others should have been casted with (ocamlPackages).

@@ -16929,13 +16929,8 @@ in
};
coq_8_5 = callPackage ../applications/science/logic/coq {
version = "8.5pl3";
inherit (ocamlPackages) ocaml findlib lablgtk;
Copy link
Member

@rht rht Jan 15, 2017

Choose a reason for hiding this comment

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

I see, so indeed this makes the all-packages.nix cleaner. If this can be extended to other packages as well?

@jpierre03
Copy link
Contributor

@vbgl nix-shell -p nox --run "nox-review wip" should be used before git commit.

@rht
Copy link
Member

rht commented Jan 22, 2017

nox-review says: “Nothing changed”.

While this is not in checkbox format, I think this implies nox-review has been run.

@vbgl vbgl mentioned this pull request Jan 25, 2017
@vbgl
Copy link
Contributor Author

vbgl commented Jan 25, 2017

@jpierre03 this PR does not change any derivation, it changes how said derivations are defined. There is thus no build to check.

@vbgl vbgl merged commit 635ac15 into NixOS:master Jan 25, 2017
@vbgl vbgl deleted the coq-clean branch October 2, 2017 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants