mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 05:00:16 +00:00
Use an SF version extractor with better chances to yield correct result by default
svn path=/nixpkgs/trunk/; revision=22390
This commit is contained in:
parent
6308953547
commit
44216c2ef8
|
@ -4,6 +4,7 @@
|
|||
#http://downloads.sourceforge.net/webdruid/files/webdruid/0.6.0-alpha5/webdruid-0.6.0-alpha5.tar.gz
|
||||
skipRedirectSF='s@sourceforge.net/projects@downloads.sourceforge.net/project@; s@/files@@; s@/download$@@;'
|
||||
extractReleaseSF='s@.*/([^/]+)/[^/]+@\1@'
|
||||
extractVersionSF='s@.*/[^/0-9]*([0-9].*)[.](tar|tgz|tbz2|zip).*@\1@'
|
||||
apacheMirror='s@http://www.apache.org/dist/@mirror://apache/@'
|
||||
skipRedirectApache='s@/dyn/closer.cgi[?]path=@/dist@'
|
||||
|
||||
|
|
|
@ -56,8 +56,8 @@ prefetchClause=""
|
|||
echo "Sourceforge-corrected URL: $freshUrl" >&2
|
||||
|
||||
version="$(echo "$freshUrl" |
|
||||
sed -re "$extractReleaseSF")"
|
||||
baseName="$(getAttr baseName "$(echo "$freshUrl" | sed -re 's@.*/projects/([^/]+)/.*@\1@')")"
|
||||
sed -re "$extractVersionSF")"
|
||||
baseName="$(getAttr baseName "$(echo "$freshUrl" | sed -re 's@.*/project/([^/]+)/.*@\1@')")"
|
||||
url="$freshUrl"
|
||||
name="$baseName-$version"
|
||||
advertisedUrl="$freshUrl"
|
||||
|
|
Loading…
Reference in a new issue