Commit d6deff04 authored by Grimmauld's avatar Grimmauld Committed by github-actions[bot]
Browse files

edge-runtime: drop

The version in nixpkgs was outdated since Nov 2024, with countless releases since [1].
This is unacceptable for what is intended to be a network-facing service.
It also started failing to build.

[1] https://github.com/supabase/edge-runtime/releases

(cherry picked from commit 4e5251e1)
parent 0af09df2
Loading
Loading
Loading
Loading
+0 −7571

File deleted.

Preview size limit exceeded, changes collapsed.

+0 −28
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchurl,
}:

let
  fetch_librusty_v8 =
    args:
    fetchurl {
      name = "librusty_v8-${args.version}";
      url = "https://github.com/denoland/rusty_v8/releases/download/v${args.version}/librusty_v8_release_${stdenv.hostPlatform.rust.rustcTarget}.a.gz";
      hash = args.shas.${stdenv.hostPlatform.system};
      meta = {
        inherit (args) version;
        sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
      };
    };
in
fetch_librusty_v8 {
  version = "0.97.1";
  shas = {
    x86_64-linux = "sha256-wQBEi2Vs5ruhSkq0n3z8WWjls6V3th2cm+O6s4LDB8k=";
    aarch64-linux = "sha256-U0PCUNcshm7AaBuUgwQQ1Qn9dr1iL2Okodl6BI/nZR8=";
    x86_64-darwin = "sha256-cGXOstCOdqaOpU2LcOT5A0JfnkoDvUHhOcCJ9vsS7CM=";
    aarch64-darwin = "sha256-9TmAON0KUVRQISTudyryIhf4VC/Dc4caq69iquDdrTU=";
  };
}
+0 −68
Original line number Diff line number Diff line
{
  stdenv,
  lib,
  callPackage,
  fetchFromGitHub,
  rustPlatform,
  nix-update-script,
  openssl,
  pkg-config,
}:

let
  pname = "edge-runtime";
  version = "1.60.1";
in
rustPlatform.buildRustPackage {
  inherit pname version;

  src = fetchFromGitHub {
    owner = "supabase";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-w0iSKHT6aIixKh1bHg1lOQNEw/emKK7R2iLzWjb2Pnk=";
    fetchSubmodules = true;
  };

  cargoLock = {
    lockFile = ./Cargo.lock;
    outputHashes = {
      "deno_core-0.293.0" = "sha256-5WBORHokzWPdro9rmBijcsx/j81YFaEfMIK276bfI1o=";
      "eszip-0.72.2" = "sha256-lzJeapA5NTWBnBaQY8i82OeYN2DIukJZKoRAXFG4qVA=";
      "ort-2.0.0-rc.2" = "sha256-jOKeulnW/m+q1xf77jaNzLT+In/AFcSDDbz7xF23x5g=";
    };
  };

  nativeBuildInputs = [
    pkg-config
    rustPlatform.bindgenHook
  ];

  buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ];

  # The v8 package will try to download a `librusty_v8.a` release at build time to our read-only filesystem
  # To avoid this we pre-download the file and export it via RUSTY_V8_ARCHIVE
  RUSTY_V8_ARCHIVE = callPackage ./librusty_v8.nix { };

  # For version tag
  GIT_V_TAG = version;

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

  doInstallCheck = true;
  installCheckPhase = ''
    runHook preInstallCheck
    $out/bin/edge-runtime --help
    runHook postInstallCheck
  '';

  doCheck = false;

  meta = with lib; {
    description = "Server based on Deno runtime, capable of running JavaScript, TypeScript, and WASM services";
    mainProgram = "edge-runtime";
    homepage = "https://github.com/supabase/edge-runtime";
    license = licenses.mit;
    maintainers = with maintainers; [ happysalada ];
  };
}
+1 −0
Original line number Diff line number Diff line
@@ -565,6 +565,7 @@ mapAliases {
  edbrowse = throw "'edbrowse' has been removed as it was unmaintained in Nixpkgs"; # Added 2025-05-18
  edUnstable = throw "edUnstable was removed; use ed instead"; # Added 2024-07-01
  edgedb = throw "edgedb replaced to gel because of change of upstream"; # Added 2025-02-24
  edge-runtime = throw "'edge-runtime' was removed as it was unused, unmaintained, likely insecure and failed to build"; # Added 2025-05-18
  eintopf = lauti; # Project was renamed, added 2025-05-01
  elasticsearch7Plugins = elasticsearchPlugins;
  electronplayer = throw "'electronplayer' has been removed as it had been discontinued upstream since October 2024"; # Added 2024-12-17