Along with PR #13879, these patches let julia build and run on
darwin. Using an llvm with shared library support is an idea adopted from
a @pikajude comment here https://github.com/NixOS/nixpkgs/issues/10864
The libgit2 change is mechanical to pull in iconv on darwin.
The frameworks are referenced by julia's build system.
The old expression used a shell script to set some repetitive
makeFlags. The makeFlags settings were spread out over different parts
of the expression. This deters new contributors. The new expression is
clearer, at the cost of being slightly repetitive.
There were a few unused LDFLAGS and LD_LIBRARY_PATH settings. There was
also an incorrect setting; Julia prefers to be linked to threaded
FFTW. The libary names are now set correctly so that it's not necessary
to link system libraries into $out/lib/julia as if they were private
libraries. The LDFLAGS were also moved out of NIX_LDFLAGS so they will
affect only the Julia build itself, and not all the individual private
libraries.
This is to bring the julia version information into accordance with
section 7.3.2 of the nixpkgs manual:
The version in the filename should leave out unnecessary detail.
For instance, if we keep the latest Firefox 2.0.x and 3.5.x
versions in Nixpkgs, they should be named firefox/2.0.nix and
firefox/3.5.nix, respectively (which, at a given point, might
contain versions 2.0.0.20 and 3.5.4).
Julia uses semantic versioning (http://semver.org), so the third
digit (the patch level) represents backwards-compatible bug fixes
only.
It was mentioned in PR #5842 that Julia's testsuite fails under nixpkgs.
This PR enables the testsuite for Julia 0.3.X to demonstrate that it
works.
Since Julia is numerical software, I think it is a great idea to
merge this current PR so that Julia will always be tested in the
future.
I was unable to get the tests to pass on the 0.2.X branch. However,
this branch is dead (its latest commit was Aug 8) and will receive
no more releases.