mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 19:15:39 +00:00
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 }:
|
||||
let
|
||||
s = # Generated upstream information
|
||||
rec {
|
||||
baseName="slimerjs";
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "slimerjs";
|
||||
version = "1.0.0";
|
||||
name="${baseName}-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "laurentj";
|
||||
repo = baseName;
|
||||
sha256="1w4sfrv520isbs7r1rlzl5y3idrpad7znw9fc92yz40jlwz7sxs4";
|
||||
repo = "slimerjs";
|
||||
sha256 = "sha256-RHd9PqcSkO9FYi5x+09TN7c4fKGf5pCPXjoCUXZ2mvA=";
|
||||
rev = version;
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
inherit (s) name version;
|
||||
|
||||
buildInputs = [ zip ];
|
||||
nativeBuildInputs = [ unzip ];
|
||||
#src = fetchurl {
|
||||
# inherit (s) url sha256;
|
||||
#};
|
||||
#src = fetchgit {
|
||||
# inherit (s) url sha256 rev;
|
||||
#};
|
||||
src = fetchFromGitHub {
|
||||
inherit (s) owner repo rev sha256;
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
test -d src && cd src
|
||||
test -f omni.ja || zip omni.ja -r */
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out"/{bin,share/doc/slimerjs,lib/slimerjs}
|
||||
cp LICENSE README* "$out/share/doc/slimerjs"
|
||||
|
@ -38,11 +29,11 @@ stdenv.mkDerivation {
|
|||
chmod a+x "$out/bin/slimerjs"
|
||||
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";
|
||||
license = lib.licenses.mpl20 ;
|
||||
maintainers = [lib.maintainers.raskin];
|
||||
platforms = lib.platforms.linux;
|
||||
license = licenses.mpl20;
|
||||
maintainers = with maintainers; [ raskin ];
|
||||
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 a new issue