2023-05-10 23:04:05 +00:00
|
|
|
{ pkgs, lib }:
|
2022-05-24 08:14:27 +00:00
|
|
|
|
2024-06-07 12:26:20 +00:00
|
|
|
pkgs.stdenvNoCC.mkDerivation rec {
|
2022-05-24 08:14:27 +00:00
|
|
|
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=";
|
|
|
|
};
|
|
|
|
|
2024-06-07 12:26:20 +00:00
|
|
|
nativeBuildInputs = with pkgs; [ unzip ];
|
2022-05-24 08:14:27 +00:00
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
unzip $src
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2024-06-07 12:26:20 +00:00
|
|
|
runHook preInstall
|
2022-05-24 08:14:27 +00:00
|
|
|
install -D phantomjs-${version}-macosx/bin/phantomjs $out/bin/phantomjs
|
2024-06-07 12:26:20 +00:00
|
|
|
runHook postInstall
|
2022-05-24 08:14:27 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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" ];
|
|
|
|
};
|
|
|
|
}
|