1
0
Fork 0

Add phantomjs

This commit is contained in:
Daniel Kempkens 2022-05-24 10:14:27 +02:00
parent 1797853fa1
commit 9c529749fc
4 changed files with 39 additions and 0 deletions

View file

@ -4,4 +4,5 @@
* [agilebits-op](https://app-updates.agilebits.com/product_history/CLI2)
* [cliclick](https://github.com/BlueM/cliclick)
* [phantomjs](https://github.com/ariya/phantomjs)
* [proximity-sort](https://github.com/jonhoo/proximity-sort)

View file

@ -5,5 +5,6 @@ let custom = super.callPackage ./packages.nix { }; in
{
inherit (custom) agilebits-op;
inherit (custom) cliclick;
inherit (custom) phantomjs;
inherit (custom) proximity-sort;
}

View file

@ -3,5 +3,6 @@
{
agilebits-op = import ./packages/agilebits-op.nix { inherit system lib pkgs; };
cliclick = import ./packages/cliclick.nix { inherit system lib pkgs; };
phantomjs = import ./packages/phantomjs.nix { inherit system lib pkgs; };
proximity-sort = import ./packages/proximity-sort.nix { inherit system lib pkgs; };
}

36
packages/phantomjs.nix Normal file
View file

@ -0,0 +1,36 @@
{ system, lib, pkgs }:
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" ];
};
}