From 397fc0dacac23515ee09b8de6a14dc9019f325e2 Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Sun, 10 Sep 2017 16:29:39 +0000 Subject: [PATCH] fast-cli: fix build --- pkgs/development/node-packages/default-v6.nix | 8 ++++++++ pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/development/node-packages/default-v6.nix b/pkgs/development/node-packages/default-v6.nix index 27664385b613..334c79a82672 100644 --- a/pkgs/development/node-packages/default-v6.nix +++ b/pkgs/development/node-packages/default-v6.nix @@ -53,4 +53,12 @@ nodePackages // { export PATH="$PATH:$tmp" ''; }); + + fast-cli = nodePackages.fast-cli.override (oldAttrs: { + preRebuild = '' + # Simply ignore the phantomjs --version check. It seems to need a display but it is safe to ignore + sed -i -e "s|console.error('Error verifying phantomjs, continuing', err)|console.error('Error verifying phantomjs, continuing', err); return true;|" node_modules/phantomjs-prebuilt/lib/util.js + ''; + buildInputs = oldAttrs.buildInputs ++ [ pkgs.phantomjs2 ]; + }); } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0ca1dff970b7..2bf0622e09a5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1027,9 +1027,7 @@ with pkgs; fastJson = callPackage ../development/libraries/fastjson { }; - fast-cli = nodePackages.fast-cli.overrideDerivation (old: { - buildInputs = old.buildInputs ++ [phantomjs2]; - }); + fast-cli = nodePackages.fast-cli; fd = callPackage ../tools/misc/fd { };