2013-10-20 22:30:11 +02:00
|
|
|
{stdenv, fetchurl, unzip, xulrunner, bash}:
|
|
|
|
let
|
|
|
|
s = # Generated upstream information
|
|
|
|
rec {
|
|
|
|
baseName="slimerjs";
|
2013-10-30 10:03:47 +01:00
|
|
|
version="0.8.4";
|
2013-10-20 22:30:11 +02:00
|
|
|
name="${baseName}-${version}";
|
2013-10-30 10:03:47 +01:00
|
|
|
hash="12hv126i304y3lr8z420vpdlrks1qzz0zwfi5yishdfiasdl5pyd";
|
|
|
|
url="http://download.slimerjs.org/v0.8/slimerjs-0.8.4.zip";
|
|
|
|
sha256="12hv126i304y3lr8z420vpdlrks1qzz0zwfi5yishdfiasdl5pyd";
|
2013-10-20 22:30:11 +02:00
|
|
|
};
|
|
|
|
buildInputs = [
|
|
|
|
unzip
|
|
|
|
];
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit (s) name version;
|
|
|
|
inherit buildInputs;
|
|
|
|
src = fetchurl {
|
|
|
|
inherit (s) url sha256;
|
|
|
|
};
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out"/{bin,share/doc/slimerjs,lib/slimerjs}
|
|
|
|
cp LICENSE README* "$out/share/doc/slimerjs"
|
|
|
|
cp * "$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"
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|