1 { lib, stdenv, fetchFromGitHub, zip, unzip, firefox, bash }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
10 sha256 = "sha256-RHd9PqcSkO9FYi5x+09TN7c4fKGf5pCPXjoCUXZ2mvA=";
14 buildInputs = [ zip ];
15 nativeBuildInputs = [ unzip ];
19 test -f omni.ja || zip omni.ja -r */
23 mkdir -p "$out"/{bin,share/doc/slimerjs,lib/slimerjs}
24 cp LICENSE README* "$out/share/doc/slimerjs"
25 cp -r * "$out/lib/slimerjs"
26 echo '#!${bash}/bin/bash' >> "$out/bin/slimerjs"
27 echo 'export SLIMERJSLAUNCHER=${firefox}/bin/firefox' >> "$out/bin/slimerjs"
28 echo "'$out/lib/slimerjs/slimerjs' \"\$@\"" >> "$out/bin/slimerjs"
29 chmod a+x "$out/bin/slimerjs"
30 sed -e 's@MaxVersion=[3456][0-9][.]@MaxVersion=99.@' -i "$out/lib/slimerjs/application.ini"
34 description = "Gecko-based programmatically-driven browser";
35 license = licenses.mpl20;
36 maintainers = with maintainers; [ raskin ];
37 platforms = platforms.linux;