diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2013-10-29 10:56:33 +0400 |
---|---|---|
committer | Michael Raskin <7c6f434c@mail.ru> | 2013-10-29 10:56:33 +0400 |
commit | 22ddf66b54396f865ae1c1df6a366640039c20c6 (patch) | |
tree | b16622d756ba5b91f3c5a568822e72fb75384e4a /pkgs/build-support | |
parent | a976962d6cb87ffb946956fe58a5dfd5742f769e (diff) |
Adding a facility to generate Lisp module definitions from QuickLisp; no sane update facility yet; adding Esrap-PEG as a test
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/upstream-updater/update-walker-service-specific.sh | 5 | ||||
-rwxr-xr-x | pkgs/build-support/upstream-updater/update-walker.sh | 17 |
2 files changed, 21 insertions, 1 deletions
diff --git a/pkgs/build-support/upstream-updater/update-walker-service-specific.sh b/pkgs/build-support/upstream-updater/update-walker-service-specific.sh index 4f3a7110346eb..c98880df1a9ad 100644 --- a/pkgs/build-support/upstream-updater/update-walker-service-specific.sh +++ b/pkgs/build-support/upstream-updater/update-walker-service-specific.sh @@ -7,3 +7,8 @@ SF_redirect () { SF_version_dir () { version_link 'http://sourceforge.net/.+/[0-9.]+/$' } + +GH_latest () { + prefetch_command_rel ../fetchgit/nix-prefetch-git + rev "$(curl "$CURRENT_URL/commits" | grep /commit/ | head -n 1 | xargs basename )" +} diff --git a/pkgs/build-support/upstream-updater/update-walker.sh b/pkgs/build-support/upstream-updater/update-walker.sh index c4dc7713f5040..f29add11bb319 100755 --- a/pkgs/build-support/upstream-updater/update-walker.sh +++ b/pkgs/build-support/upstream-updater/update-walker.sh @@ -3,6 +3,8 @@ own_dir="$(cd "$(dirname "$0")"; pwd)" CURRENT_URL= +CURRENT_REV= +PREFETCH_COMMAND= NEED_TO_CHOOSE_URL=1 url () { @@ -118,13 +120,25 @@ ensure_choice () { } } +rev () { + CURRENT_REV="$1" +} + +prefetch_command () { + PREFETCH_COMMAND="$1" +} + +prefetch_command_rel () { + PREFETCH_COMMAND="$(dirname "$0")/$1" +} + ensure_hash () { echo "Ensuring hash. CURRENT_HASH: $CURRENT_HASH" >&2 [ -z "$CURRENT_HASH" ] && hash } hash () { - CURRENT_HASH="$(nix-prefetch-url "$CURRENT_URL")" + CURRENT_HASH="$(${PREFETCH_COMMAND:-nix-prefetch-url} "$CURRENT_URL" $CURRENT_REV)" echo "CURRENT_HASH: $CURRENT_HASH" >&2 } @@ -172,6 +186,7 @@ do_write_expression () { echo "${1} name=\"\${baseName}-\${version}\";" echo "${1} hash=\"$CURRENT_HASH\";" echo "${1} url=\"$CURRENT_URL\";" + [ -n "$CURRENT_REV" ] && echo "${1} rev=\"$CURRENT_REV\";" echo "${1} sha256=\"$CURRENT_HASH\";" echo "$2" } |