2013-10-30 23:59:45 +01:00
|
|
|
{stdenv, fetchurl, fetchgit, zip, unzip, xulrunner, bash}:
|
2013-10-20 22:30:11 +02:00
|
|
|
let
|
|
|
|
s = # Generated upstream information
|
|
|
|
rec {
|
|
|
|
baseName="slimerjs";
|
2014-05-27 23:22:44 +02:00
|
|
|
version="0.9.1";
|
2013-10-20 22:30:11 +02:00
|
|
|
name="${baseName}-${version}";
|
2014-05-27 23:22:44 +02:00
|
|
|
hash="1ss69z2794mv40nfa5bfjd8h78jzcjq5xm63hzay1iyvp5rjbl7k";
|
|
|
|
url="http://download.slimerjs.org/v0.9/0.9.1/slimerjs-0.9.1.zip";
|
|
|
|
sha256="1ss69z2794mv40nfa5bfjd8h78jzcjq5xm63hzay1iyvp5rjbl7k";
|
2013-10-20 22:30:11 +02:00
|
|
|
};
|
|
|
|
buildInputs = [
|
2013-10-30 23:59:45 +01:00
|
|
|
unzip zip
|
2013-10-20 22:30:11 +02:00
|
|
|
];
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit (s) name version;
|
|
|
|
inherit buildInputs;
|
2013-12-30 18:38:23 +01:00
|
|
|
src = fetchurl {
|
|
|
|
inherit (s) url sha256;
|
|
|
|
};
|
|
|
|
#src = fetchgit {
|
|
|
|
# inherit (s) url sha256 rev;
|
|
|
|
#};
|
2013-10-30 23:59:45 +01:00
|
|
|
preConfigure = ''
|
|
|
|
test -d src && cd src
|
|
|
|
test -f omni.ja || zip omni.ja -r */
|
|
|
|
'';
|
2013-10-20 22:30:11 +02:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out"/{bin,share/doc/slimerjs,lib/slimerjs}
|
|
|
|
cp LICENSE README* "$out/share/doc/slimerjs"
|
2013-10-30 23:59:45 +01:00
|
|
|
cp -r * "$out/lib/slimerjs"
|
2013-10-20 22:30:11 +02:00
|
|
|
echo '#!${bash}/bin/bash' >> "$out/bin/slimerjs"
|
|
|
|
echo 'export SLIMERJSLAUNCHER=${xulrunner}/bin/xulrunner' >> "$out/bin/slimerjs"
|
|
|
|
echo "'$out/lib/slimerjs/slimerjs' \"\$@\"" >> "$out/bin/slimerjs"
|
|
|
|
chmod a+x "$out/bin/slimerjs"
|
|
|
|
'';
|
|
|
|
meta = {
|
|
|
|
inherit (s) version;
|
|
|
|
description = ''Gecko-based programmatically-driven browser'';
|
|
|
|
license = stdenv.lib.licenses.mpl20 ;
|
|
|
|
maintainers = [stdenv.lib.maintainers.raskin];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|