13 pname = "edge-runtime";
16 rustPlatform.buildRustPackage {
17 inherit pname version;
19 src = fetchFromGitHub {
23 hash = "sha256-sDgGfQiAUuI+JaF0BRB5lwvjbWWIoTV/k/tbQsBBc4E=";
24 fetchSubmodules = true;
28 lockFile = ./Cargo.lock;
30 "ort-2.0.0-rc.0" = "sha256-j3g9ES2ZLmAAcPYgszBGDG16HiFJTnohwxSvXypFGTw=";
34 nativeBuildInputs = [ pkg-config rustPlatform.bindgenHook ];
36 buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ]
37 ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Security CoreFoundation SystemConfiguration ]);
39 # The v8 package will try to download a `librusty_v8.a` release at build time to our read-only filesystem
40 # To avoid this we pre-download the file and export it via RUSTY_V8_ARCHIVE
41 RUSTY_V8_ARCHIVE = callPackage ./librusty_v8.nix { };
46 passthru.updateScript = nix-update-script { };
48 doInstallCheck = true;
49 installCheckPhase = ''
50 runHook preInstallCheck
51 $out/bin/edge-runtime --help
52 runHook postInstallCheck
58 description = "Server based on Deno runtime, capable of running JavaScript, TypeScript, and WASM services";
59 mainProgram = "edge-runtime";
60 homepage = "https://github.com/supabase/edge-runtime";
61 license = licenses.mit;
62 maintainers = with maintainers; [ happysalada ];