3
0
Fork 0
forked from mirrors/nixpkgs

Updating SlimerJS to Git version for compatibility with fresh xulrunner

This commit is contained in:
Michael Raskin 2013-10-31 02:59:45 +04:00
parent 6e062f1434
commit 92e3206c2a
4 changed files with 25 additions and 11 deletions

View file

@ -10,5 +10,7 @@ SF_version_dir () {
GH_latest () {
prefetch_command_rel ../fetchgit/nix-prefetch-git
rev "$(curl "$CURRENT_URL/commits" | grep /commit/ | head -n 1 | xargs basename )"
revision "$("$(dirname "$0")/urls-from-page.sh" "$CURRENT_URL/commits" | grep /commit/ | head -n 1 | xargs basename )"
version '.*' "git-$(date +%Y-%m-%d)"
NEED_TO_CHOOSE_URL=
}

View file

@ -120,8 +120,9 @@ ensure_choice () {
}
}
rev () {
revision () {
CURRENT_REV="$1"
echo "CURRENT_REV: $CURRENT_REV"
}
prefetch_command () {

View file

@ -1,28 +1,36 @@
{stdenv, fetchurl, unzip, xulrunner, bash}:
{stdenv, fetchurl, fetchgit, zip, unzip, xulrunner, bash}:
let
s = # Generated upstream information
rec {
baseName="slimerjs";
version="0.8.4";
version="git-2013-10-31";
name="${baseName}-${version}";
hash="12hv126i304y3lr8z420vpdlrks1qzz0zwfi5yishdfiasdl5pyd";
url="http://download.slimerjs.org/v0.8/slimerjs-0.8.4.zip";
sha256="12hv126i304y3lr8z420vpdlrks1qzz0zwfi5yishdfiasdl5pyd";
hash="643a9d2f97f238bbd9debb17c010946d507a3b740079d9398939e7fdd70256b9";
url="https://github.com/laurentj/slimerjs";
rev="fdeb7364d3e29b47391ed0651176c1aedcb5277f";
sha256="643a9d2f97f238bbd9debb17c010946d507a3b740079d9398939e7fdd70256b9";
};
buildInputs = [
unzip
unzip zip
];
in
stdenv.mkDerivation {
inherit (s) name version;
inherit buildInputs;
src = fetchurl {
inherit (s) url sha256;
# src = fetchurl {
# inherit (s) url sha256;
# };
src = fetchgit {
inherit (s) url sha256 rev;
};
preConfigure = ''
test -d src && cd src
test -f omni.ja || zip omni.ja -r */
'';
installPhase = ''
mkdir -p "$out"/{bin,share/doc/slimerjs,lib/slimerjs}
cp LICENSE README* "$out/share/doc/slimerjs"
cp * "$out/lib/slimerjs"
cp -r * "$out/lib/slimerjs"
echo '#!${bash}/bin/bash' >> "$out/bin/slimerjs"
echo 'export SLIMERJSLAUNCHER=${xulrunner}/bin/xulrunner' >> "$out/bin/slimerjs"
echo "'$out/lib/slimerjs/slimerjs' \"\$@\"" >> "$out/bin/slimerjs"

View file

@ -0,0 +1,3 @@
url https://github.com/laurentj/slimerjs
target default.nix
GH_latest