Merge pull request #151551 from Stunkymonkey/slimerjs-refactor
slimerjs: refactor
This commit is contained in:
commit
2b5a71e1ee
@ -1,33 +1,24 @@
|
|||||||
{lib, stdenv, fetchFromGitHub, zip, unzip, firefox, bash}:
|
{ lib, stdenv, fetchFromGitHub, zip, unzip, firefox, bash }:
|
||||||
let
|
|
||||||
s = # Generated upstream information
|
stdenv.mkDerivation rec {
|
||||||
rec {
|
pname = "slimerjs";
|
||||||
baseName="slimerjs";
|
version = "1.0.0";
|
||||||
version="1.0.0";
|
|
||||||
name="${baseName}-${version}";
|
src = fetchFromGitHub {
|
||||||
owner = "laurentj";
|
owner = "laurentj";
|
||||||
repo = baseName;
|
repo = "slimerjs";
|
||||||
sha256="1w4sfrv520isbs7r1rlzl5y3idrpad7znw9fc92yz40jlwz7sxs4";
|
sha256 = "sha256-RHd9PqcSkO9FYi5x+09TN7c4fKGf5pCPXjoCUXZ2mvA=";
|
||||||
rev = version;
|
rev = version;
|
||||||
};
|
};
|
||||||
in
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
inherit (s) name version;
|
|
||||||
buildInputs = [ zip ];
|
buildInputs = [ zip ];
|
||||||
nativeBuildInputs = [ unzip ];
|
nativeBuildInputs = [ unzip ];
|
||||||
#src = fetchurl {
|
|
||||||
# inherit (s) url sha256;
|
|
||||||
#};
|
|
||||||
#src = fetchgit {
|
|
||||||
# inherit (s) url sha256 rev;
|
|
||||||
#};
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
inherit (s) owner repo rev sha256;
|
|
||||||
};
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
test -d src && cd src
|
test -d src && cd src
|
||||||
test -f omni.ja || zip omni.ja -r */
|
test -f omni.ja || zip omni.ja -r */
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p "$out"/{bin,share/doc/slimerjs,lib/slimerjs}
|
mkdir -p "$out"/{bin,share/doc/slimerjs,lib/slimerjs}
|
||||||
cp LICENSE README* "$out/share/doc/slimerjs"
|
cp LICENSE README* "$out/share/doc/slimerjs"
|
||||||
@ -38,11 +29,11 @@ stdenv.mkDerivation {
|
|||||||
chmod a+x "$out/bin/slimerjs"
|
chmod a+x "$out/bin/slimerjs"
|
||||||
sed -e 's@MaxVersion=[3456][0-9][.]@MaxVersion=99.@' -i "$out/lib/slimerjs/application.ini"
|
sed -e 's@MaxVersion=[3456][0-9][.]@MaxVersion=99.@' -i "$out/lib/slimerjs/application.ini"
|
||||||
'';
|
'';
|
||||||
meta = {
|
|
||||||
inherit (s) version;
|
meta = with lib; {
|
||||||
description = "Gecko-based programmatically-driven browser";
|
description = "Gecko-based programmatically-driven browser";
|
||||||
license = lib.licenses.mpl20 ;
|
license = licenses.mpl20;
|
||||||
maintainers = [lib.maintainers.raskin];
|
maintainers = with maintainers; [ raskin ];
|
||||||
platforms = lib.platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
url http://slimerjs.org/download.html
|
|
||||||
version_link '/slimerjs-[0-9.]+[.]zip$'
|
|
@ -1,3 +0,0 @@
|
|||||||
url https://github.com/laurentj/slimerjs
|
|
||||||
target default.nix
|
|
||||||
GH_latest
|
|
Loading…
Reference in New Issue
Block a user