Unverified Commit cb0ac8dd authored by jopejoe1's avatar jopejoe1 Committed by GitHub
Browse files

vega-lite: migrate from nodePackages (#458583)

parents f5c6c9fa 233755a3
Loading
Loading
Loading
Loading
+44 −0
Original line number Diff line number Diff line
{
  lib,
  buildNpmPackage,
  fetchFromGitHub,
  pkg-config,
  pixman,
  cairo,
  pango,
  nix-update-script,
}:

buildNpmPackage (finalAttrs: {
  pname = "vega-lite";
  version = "6.4.1";

  src = fetchFromGitHub {
    owner = "vega";
    repo = "vega-lite";
    tag = "v${finalAttrs.version}";
    hash = "sha256-X6O7ZehY3tS7dFBaKnBuDokCfG+zWmSDHl1d+ifyc/o=";
  };

  npmDepsHash = "sha256-YjZdh5R7hawgf8EAGlKEAkqchcFuN1j2yMJo9Ptnjyk=";

  nativeBuildInputs = [
    pkg-config
  ];

  buildInputs = [
    cairo
    pixman
    pango
  ];

  passthru.updateScript = nix-update-script { };

  meta = {
    changelog = "https://github.com/vega/vega-lite/releases/tag/v${finalAttrs.version}";
    description = "Concise grammar of interactive graphics, built on Vega";
    homepage = "https://vega.github.io/vega-lite/";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ pyrox0 ];
  };
})
+1 −0
Original line number Diff line number Diff line
@@ -288,6 +288,7 @@ mapAliases {
  inherit (pkgs) ungit; # added 2023-08-20
  unified-language-server = throw "unified-language-server was removed as it is a library that should be imported within a Javascript project, not an end-user tool"; # added 2025-10-02
  inherit (pkgs) uppy-companion; # Added 2025-11-01
  inherit (pkgs) vega-lite; # Added 2025-11-04
  inherit (pkgs) vim-language-server; # added 2024-06-25
  vls = throw "vls has been deprecated by upstream as vetur is also deprecated. Upstream suggests migrating to Volar for Vue LSP tooling instead."; # added 2024-12-09
  inherit (pkgs) vsc-leetcode-cli; # Added 2023-08-30
+0 −1
Original line number Diff line number Diff line
@@ -130,7 +130,6 @@
, "ts-node"
, "ttf2eot"
, "vega-cli"
, "vega-lite"
, "vercel"
, "wavedrom-cli"
, "wring"
+0 −155
Original line number Diff line number Diff line
@@ -18357,15 +18357,6 @@ let
        sha512 = "Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==";
      };
    };
    "json-stringify-pretty-compact-4.0.0" = {
      name = "json-stringify-pretty-compact";
      packageName = "json-stringify-pretty-compact";
      version = "4.0.0";
      src = fetchurl {
        url = "https://registry.npmjs.org/json-stringify-pretty-compact/-/json-stringify-pretty-compact-4.0.0.tgz";
        sha512 = "3CNZ2DnrpByG9Nqj6Xo8vqbjT4F6N+tb4Gb28ESAZjYZ5yqvmc56J+/kuIwkaAMOyblTQhUW7PxMkUb8Q36N3Q==";
      };
    };
    "json-stringify-safe-5.0.1" = {
      name = "json-stringify-safe";
      packageName = "json-stringify-safe";
@@ -32696,15 +32687,6 @@ let
        sha512 = "K5zd7s5tjr1LiOOkjGpcVls8GsH/f2CWCrWcpKy74gTCp+llCdwz0Enqo013ZlGaRNjfgD/o1caJRt3GSaec4A==";
      };
    };
    "vega-expression-5.1.2" = {
      name = "vega-expression";
      packageName = "vega-expression";
      version = "5.1.2";
      src = fetchurl {
        url = "https://registry.npmjs.org/vega-expression/-/vega-expression-5.1.2.tgz";
        sha512 = "fFeDTh4UtOxlZWL54jf1ZqJHinyerWq/ROiqrQxqLkNJRJ86RmxYTgXwt65UoZ/l4VUv9eAd2qoJeDEf610Umw==";
      };
    };
    "vega-expression-5.2.0" = {
      name = "vega-expression";
      packageName = "vega-expression";
@@ -49006,143 +48988,6 @@ in
    bypassCache = true;
    reconstructLock = true;
  };
  vega-lite = nodeEnv.buildNodePackage {
    name = "vega-lite";
    packageName = "vega-lite";
    version = "5.23.0";
    src = fetchurl {
      url = "https://registry.npmjs.org/vega-lite/-/vega-lite-5.23.0.tgz";
      sha512 = "l4J6+AWE3DIjvovEoHl2LdtCUkfm4zs8Xxx7INwZEAv+XVb6kR6vIN1gt3t2gN2gs/y4DYTs/RPoTeYAuEg6mA==";
    };
    dependencies = [
      sources."@types/estree-1.0.6"
      sources."@types/geojson-7946.0.4"
      sources."ansi-regex-5.0.1"
      sources."ansi-styles-4.3.0"
      sources."cliui-8.0.1"
      sources."color-convert-2.0.1"
      sources."color-name-1.1.4"
      sources."commander-7.2.0"
      sources."d3-array-3.2.4"
      sources."d3-color-3.1.0"
      sources."d3-delaunay-6.0.4"
      sources."d3-dispatch-3.0.1"
      sources."d3-dsv-3.0.1"
      sources."d3-force-3.0.0"
      sources."d3-format-3.1.0"
      sources."d3-geo-3.1.1"
      sources."d3-geo-projection-4.0.0"
      sources."d3-hierarchy-3.1.2"
      sources."d3-interpolate-3.0.1"
      sources."d3-path-3.1.0"
      sources."d3-quadtree-3.0.1"
      sources."d3-scale-4.0.2"
      sources."d3-scale-chromatic-3.1.0"
      sources."d3-shape-3.2.0"
      sources."d3-time-3.1.0"
      sources."d3-time-format-4.1.0"
      sources."d3-timer-3.0.1"
      sources."delaunator-5.0.1"
      sources."emoji-regex-8.0.0"
      sources."encoding-0.1.13"
      sources."escalade-3.2.0"
      sources."get-caller-file-2.0.5"
      sources."iconv-lite-0.6.3"
      sources."internmap-2.0.3"
      sources."is-fullwidth-code-point-3.0.0"
      sources."json-stringify-pretty-compact-4.0.0"
      sources."node-fetch-2.7.0"
      sources."require-directory-2.1.1"
      sources."robust-predicates-3.0.2"
      sources."rw-1.3.3"
      sources."safer-buffer-2.1.2"
      sources."string-width-4.2.3"
      sources."strip-ansi-6.0.1"
      (
        sources."topojson-client-3.1.0"
        // {
          dependencies = [
            sources."commander-2.20.3"
          ];
        }
      )
      sources."tr46-0.0.3"
      sources."tslib-2.8.1"
      (
        sources."vega-5.32.0"
        // {
          dependencies = [
            sources."vega-expression-5.2.0"
          ];
        }
      )
      sources."vega-canvas-1.2.7"
      sources."vega-crossfilter-4.1.3"
      sources."vega-dataflow-5.7.7"
      sources."vega-encode-4.10.2"
      sources."vega-event-selector-3.0.1"
      sources."vega-expression-5.1.2"
      sources."vega-force-4.2.2"
      sources."vega-format-1.1.3"
      (
        sources."vega-functions-5.17.0"
        // {
          dependencies = [
            sources."vega-expression-5.2.0"
          ];
        }
      )
      sources."vega-geo-4.4.3"
      sources."vega-hierarchy-4.1.3"
      sources."vega-label-1.3.1"
      sources."vega-loader-4.5.3"
      sources."vega-parser-6.5.0"
      sources."vega-projection-1.6.2"
      sources."vega-regression-1.3.1"
      sources."vega-runtime-6.2.1"
      sources."vega-scale-7.4.2"
      sources."vega-scenegraph-4.13.1"
      (
        sources."vega-selections-5.6.0"
        // {
          dependencies = [
            sources."vega-expression-5.2.0"
          ];
        }
      )
      sources."vega-statistics-1.9.0"
      sources."vega-time-2.1.3"
      sources."vega-transforms-4.12.1"
      (
        sources."vega-typings-1.5.0"
        // {
          dependencies = [
            sources."vega-expression-5.2.0"
          ];
        }
      )
      sources."vega-util-1.17.3"
      sources."vega-view-5.15.0"
      sources."vega-view-transforms-4.6.1"
      sources."vega-voronoi-4.2.4"
      sources."vega-wordcloud-4.1.6"
      sources."webidl-conversions-3.0.1"
      sources."whatwg-url-5.0.0"
      sources."wrap-ansi-7.0.0"
      sources."y18n-5.0.8"
      sources."yargs-17.7.2"
      sources."yargs-parser-21.1.1"
    ];
    buildInputs = globalBuildInputs;
    meta = {
      description = "Vega-Lite is a concise high-level language for interactive visualization";
      homepage = "https://vega.github.io/vega-lite/";
      license = "BSD-3-Clause";
    };
    production = true;
    bypassCache = true;
    reconstructLock = true;
  };
  vercel = nodeEnv.buildNodePackage {
    name = "vercel";
    packageName = "vercel";
+0 −16
Original line number Diff line number Diff line
@@ -146,22 +146,6 @@ final: prev: {
    ];
  };

  vega-lite = prev.vega-lite.override {
    postInstall = ''
      cd node_modules
      for dep in ${final.vega-cli}/lib/node_modules/vega-cli/node_modules/*; do
        if [[ ! -d ''${dep##*/} ]]; then
          ln -s "${final.vega-cli}/lib/node_modules/vega-cli/node_modules/''${dep##*/}"
        fi
      done
    '';
    passthru.tests = {
      simple-execution = callPackage ./package-tests/vega-lite.nix {
        inherit (final) vega-lite;
      };
    };
  };

  wavedrom-cli = prev.wavedrom-cli.override {
    nativeBuildInputs = [
      pkgs.pkg-config
Loading