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

srcml: init -> 0.9.5 #25395

Merged
merged 1 commit into from
May 20, 2017
Merged

srcml: init -> 0.9.5 #25395

merged 1 commit into from
May 20, 2017

Conversation

leenaars
Copy link
Contributor

@leenaars leenaars commented May 1, 2017

Motivation for this change

Useful tool for source code analysis. See https://en.wikipedia.org/wiki/SrcML

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 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.


patchPhase = ''
patchShebangs .
substituteInPlace CMake/install.cmake --replace /usr/local $out
Copy link
Member

Choose a reason for hiding this comment

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

prePatch is preferred to not break the usage of patches = [].

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

'';

nativeBuildInputs = [ ];
buildInputs = [ libxml2 libxslt boost cmake libarchive python antlr ];
Copy link
Member

Choose a reason for hiding this comment

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

cmake and antlr belongs to nativeBuildInputs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

buildInputs = [ libxml2 libxslt boost cmake libarchive python antlr ];

configurePhase = ''
cmake -DCMAKE_INSTALL_PREFIX=$out .
Copy link
Member

Choose a reason for hiding this comment

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

this should be default, did you try dropping this phase?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, it works without.

with stdenv.lib;

stdenv.mkDerivation rec {
pname = "srcml";
Copy link
Member

Choose a reason for hiding this comment

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

pname does not serve a purpose here.

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 use this pattern everywhere, and hope that there will semantic version names soon - at which point it will. Is it okay to leave as is?

Copy link
Member

Choose a reason for hiding this comment

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

Can you explain what benefit this layer of indirection provides. I do not see, where pname is used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed pname.

name = "${pname}-${version}";

src = fetchurl {
url = "http://www.sdml.cs.kent.edu/lmcrs/srcML-src.tar.gz";
Copy link
Member

Choose a reason for hiding this comment

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

This url does not look stable (newer releases will replace the archive), because it does not contain a version number. Is there a different source we can rely on?

Copy link
Member

Choose a reason for hiding this comment

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

If not uploading to archive.org, is an option.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I already reported to upstream and asked for semantic versioning.

@leenaars leenaars force-pushed the srcml branch 2 times, most recently from b416c83 to 3cc66ca Compare May 1, 2017 17:01
name = "srcml-${version}";

src = fetchurl {
url = "http://www.sdml.cs.kent.edu/lmcrs/srcML-src.tar.gz";
Copy link
Member

Choose a reason for hiding this comment

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

I still would like to see either an versioned upstream url or a different source.

@pSub pSub added the 8.has: package (new) This PR adds a new package label May 2, 2017
@vbgl
Copy link
Contributor

vbgl commented May 4, 2017

It seems that you need to add curl to the buildInputs.

@Mic92 Mic92 merged commit 92964a2 into NixOS:master May 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: package (new) This PR adds a new package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants