2014-11-03 11:11:25 +00:00
|
|
|
{stdenv, fetchurl, fetchgit, zip, unzip, firefox, bash}:
|
2013-10-20 21:30:11 +01:00
|
|
|
let
|
|
|
|
s = # Generated upstream information
|
|
|
|
rec {
|
|
|
|
baseName="slimerjs";
|
2015-08-21 06:58:36 +01:00
|
|
|
version="0.9.6.2015.08.20";
|
2013-10-20 21:30:11 +01:00
|
|
|
name="${baseName}-${version}";
|
2015-06-14 09:21:36 +01:00
|
|
|
hash="0wry296iv63bmvm3qbkbgk42nbs80cbir0kv27v0ah5f6kvjc9cq";
|
2015-08-21 06:58:36 +01:00
|
|
|
#url="http://download.slimerjs.org/releases/0.9.6/slimerjs-0.9.6.zip";
|
|
|
|
url = "https://github.com/laurentj/slimerjs.git";
|
|
|
|
rev = "87e0ff1d666897754a914131d8f1744195ee4d7a";
|
|
|
|
sha256="0ifgr8pi40id7vcv8ipc754bys22bhij0kkhd691285x19f52alc";
|
2013-10-20 21:30:11 +01:00
|
|
|
};
|
|
|
|
buildInputs = [
|
2013-10-30 22:59:45 +00:00
|
|
|
unzip zip
|
2013-10-20 21:30:11 +01:00
|
|
|
];
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit (s) name version;
|
|
|
|
inherit buildInputs;
|
2015-08-21 06:58:36 +01:00
|
|
|
#src = fetchurl {
|
|
|
|
# inherit (s) url sha256;
|
2013-12-30 17:38:23 +00:00
|
|
|
#};
|
2015-08-21 06:58:36 +01:00
|
|
|
src = fetchgit {
|
|
|
|
inherit (s) url sha256 rev;
|
|
|
|
};
|
2013-10-30 22:59:45 +00:00
|
|
|
preConfigure = ''
|
|
|
|
test -d src && cd src
|
|
|
|
test -f omni.ja || zip omni.ja -r */
|
|
|
|
'';
|
2013-10-20 21:30:11 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out"/{bin,share/doc/slimerjs,lib/slimerjs}
|
|
|
|
cp LICENSE README* "$out/share/doc/slimerjs"
|
2013-10-30 22:59:45 +00:00
|
|
|
cp -r * "$out/lib/slimerjs"
|
2013-10-20 21:30:11 +01:00
|
|
|
echo '#!${bash}/bin/bash' >> "$out/bin/slimerjs"
|
2014-11-03 11:11:25 +00:00
|
|
|
echo 'export SLIMERJSLAUNCHER=${firefox}/bin/firefox' >> "$out/bin/slimerjs"
|
2013-10-20 21:30:11 +01:00
|
|
|
echo "'$out/lib/slimerjs/slimerjs' \"\$@\"" >> "$out/bin/slimerjs"
|
|
|
|
chmod a+x "$out/bin/slimerjs"
|
2015-01-16 09:18:14 +00:00
|
|
|
sed -e 's@MaxVersion=3[0-9][.]@MaxVersion=40.@' -i "$out/lib/slimerjs/application.ini"
|
2013-10-20 21:30:11 +01:00
|
|
|
'';
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|