1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-19 03:36:53 +00:00
nixpkgs/pkgs/applications/science/math/sage/fetch-mirrors.sh
Timo Kaufmann fe68ba81d2 sage: 6.8 -> 8.0
This "un-breaks" sage while also updating it to 8.0.

It compiles sage with its dependencies as one big pile, which is not
the best approach but definately better than nothing for now.

To be able to shrink the huge output pile a little, it also splits
docs from the rest of the output.
2017-11-05 17:37:40 -06:00

12 lines
414 B
Bash
Executable file

#! /usr/bin/env nix-shell
#! nix-shell -i bash -p curl go-pup
# Fetches a list of all available source mirrors from the sage homepage.
# Note that the list is sorted by country, but fetchurl doesn't offer an option
# to customize mirror preference.
curl -s http://www.sagemath.org/download-source.html \
| pup 'table#mirror' \
| pup 'a attr{href}' \
| sed -e 's/index\.html/sage-${version}.tar.gz/'