Skip to content

Commit

Permalink
Merge pull request #97908 from MMesch/mmesch/vega
Browse files Browse the repository at this point in the history
  • Loading branch information
doronbehar authored Sep 19, 2020
2 parents dff40ce + 9c12892 commit 32818fc
Show file tree
Hide file tree
Showing 4 changed files with 870 additions and 101 deletions.
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5709,6 +5709,12 @@
githubId = 117842;
name = "Henri Bourcereau";
};
mmesch = {
email = "mmesch@noreply.github.com";
github = "mmesch";
githubId = 2597803;
name = "Matthias Meschede";
};
mmilata = {
email = "martin@martinmilata.cz";
github = "mmilata";
Expand Down
28 changes: 28 additions & 0 deletions pkgs/development/node-packages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,32 @@ let
meta.broken = since "10";
};

vega-cli = super.vega-cli.override {
nativeBuildInputs = [ pkgs.pkgconfig ];
buildInputs = with pkgs; [
super.node-pre-gyp
pixman
cairo
pango
libjpeg
];
};

vega-lite = super.vega-lite.override {
# npx tries to install vega from scratch at vegalite runtime if it
# can't find it. We thus replace it with a direct call to the nix
# derivation. This might not be necessary anymore in future vl
# versions: https://github.com/vega/vega-lite/issues/6863.
postInstall = ''
substituteInPlace $out/lib/node_modules/vega-lite/bin/vl2pdf \
--replace "npx -p vega vg2pdf" "${self.vega-cli}/bin/vg2pdf"
substituteInPlace $out/lib/node_modules/vega-lite/bin/vl2svg \
--replace "npx -p vega vg2svg" "${self.vega-cli}/bin/vg2svg"
substituteInPlace $out/lib/node_modules/vega-lite/bin/vl2png \
--replace "npx -p vega vg2png" "${self.vega-cli}/bin/vg2png"
'';
};

webtorrent-cli = super.webtorrent-cli.override {
buildInputs = [ self.node-gyp-build ];
};
Expand All @@ -181,6 +207,8 @@ let
# https://sharp.pixelplumbing.com/install
vips

libsecret
self.node-gyp-build
self.node-pre-gyp
];
};
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/node-packages/node-packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@
, "typescript-language-server"
, "uglify-js"
, "ungit"
, "vega-cli"
, "vega-lite"
, "vim-language-server"
, "vscode-css-languageserver-bin"
, "vscode-html-languageserver-bin"
Expand Down
Loading

0 comments on commit 32818fc

Please sign in to comment.