-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
srcml: init -> 0.9.5 #25395
Conversation
|
||
patchPhase = '' | ||
patchShebangs . | ||
substituteInPlace CMake/install.cmake --replace /usr/local $out |
There was a problem hiding this comment.
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 = []
.
There was a problem hiding this comment.
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 ]; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 . |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
b416c83
to
3cc66ca
Compare
name = "srcml-${version}"; | ||
|
||
src = fetchurl { | ||
url = "http://www.sdml.cs.kent.edu/lmcrs/srcML-src.tar.gz"; |
There was a problem hiding this comment.
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.
It seems that you need to add |
Motivation for this change
Useful tool for source code analysis. See https://en.wikipedia.org/wiki/SrcML
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)