2021-01-23 12:26:19 +00:00
|
|
|
{lib, stdenv, fetchFromGitHub, zip, unzip, firefox, bash}:
|
2013-10-20 21:30:11 +01:00
|
|
|
let
|
|
|
|
s = # Generated upstream information
|
|
|
|
rec {
|
|
|
|
baseName="slimerjs";
|
2018-05-01 22:59:07 +01:00
|
|
|
version="1.0.0";
|
2013-10-20 21:30:11 +01:00
|
|
|
name="${baseName}-${version}";
|
2017-03-13 07:23:19 +00:00
|
|
|
owner = "laurentj";
|
2019-09-09 00:38:31 +01:00
|
|
|
repo = baseName;
|
2018-05-01 22:59:07 +01:00
|
|
|
sha256="1w4sfrv520isbs7r1rlzl5y3idrpad7znw9fc92yz40jlwz7sxs4";
|
2019-09-09 00:38:31 +01:00
|
|
|
rev = version;
|
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;
|
2017-03-13 07:23:19 +00:00
|
|
|
#src = fetchurl {
|
|
|
|
# inherit (s) url sha256;
|
|
|
|
#};
|
2016-05-15 21:21:34 +01:00
|
|
|
#src = fetchgit {
|
|
|
|
# inherit (s) url sha256 rev;
|
|
|
|
#};
|
2017-03-13 07:23:19 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
inherit (s) owner repo rev sha256;
|
|
|
|
};
|
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"
|
2016-09-26 14:41:54 +01:00
|
|
|
sed -e 's@MaxVersion=[3456][0-9][.]@MaxVersion=99.@' -i "$out/lib/slimerjs/application.ini"
|
2013-10-20 21:30:11 +01:00
|
|
|
'';
|
|
|
|
meta = {
|
|
|
|
inherit (s) version;
|
2021-01-24 09:19:10 +00:00
|
|
|
description = "Gecko-based programmatically-driven browser";
|
2021-01-23 12:26:19 +00:00
|
|
|
license = lib.licenses.mpl20 ;
|
|
|
|
maintainers = [lib.maintainers.raskin];
|
|
|
|
platforms = lib.platforms.linux;
|
2013-10-20 21:30:11 +01:00
|
|
|
};
|
|
|
|
}
|