2023-05-10 23:04:05 +00:00
|
|
|
{ pkgs, lib }:
|
2022-05-24 08:14:27 +00:00
|
|
|
|
|
|
|
pkgs.stdenv.mkDerivation rec {
|
|
|
|
pname = "phantomjs";
|
|
|
|
version = "2.1.1";
|
|
|
|
|
|
|
|
src = pkgs.fetchurl {
|
|
|
|
url = "https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-${version}-macosx.zip";
|
|
|
|
sha256 = "U4z0iCGasn4wnq/GKeK87pl2mQ/pCx7DNPVBd5FQ+ME=";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = with pkgs; [ unzip ];
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
unzip $src
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D phantomjs-${version}-macosx/bin/phantomjs $out/bin/phantomjs
|
|
|
|
'';
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
|
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/phantomjs --version
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Scriptable Headless WebKit";
|
|
|
|
homepage = "https://github.com/ariya/phantomjs";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = [ "x86_64-darwin" ];
|
|
|
|
};
|
|
|
|
}
|