spacetimedb: 1.2.0 -> 1.3.0

requires fetching rusty_v8 dependecy added in 1.3.0
This commit is contained in:
Joslyn Esser
2025-08-18 18:48:03 -07:00
parent 2318ee749e
commit fd8a920f10
3 changed files with 43 additions and 3 deletions
+21
View File
@@ -0,0 +1,21 @@
# not a stable interface, do not reference outside the deno package but make a
# copy if you need
{
lib,
stdenv,
fetchurl,
}:
{
fetchLibrustyV8 =
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";
sha256 = args.shas.${stdenv.hostPlatform.system};
meta = {
inherit (args) version;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
};
}
@@ -0,0 +1,12 @@
# auto-generated file -- DO NOT EDIT!
{ fetchLibrustyV8 }:
fetchLibrustyV8 {
version = "137.2.1";
shas = {
x86_64-linux = "sha256-1mV+UjvJsIyLFpBGVDrGxr/rqUgKzRRFwgnMyYTb/pM=";
aarch64-linux = "sha256-Rp7chA+GjsozCkMQrDnOoi4VhVJdrFZd1BuLfcRhGjw=";
x86_64-darwin = "sha256-tDMk+F6D/h4osYlzT2qAhqfHYUSDk3nL4RxEKjhBhD0=";
aarch64-darwin = "sha256-1eBUjKFalb/CIPfHYP8SvqIaxRep8vU6u9QFShOMUsQ=";
};
}
+10 -3
View File
@@ -1,24 +1,28 @@
{
lib,
callPackage,
fetchFromGitHub,
rustPlatform,
pkg-config,
perl,
git,
versionCheckHook,
librusty_v8 ? callPackage ./librusty_v8.nix {
inherit (callPackage ./fetchers.nix { }) fetchLibrustyV8;
},
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "spacetimedb";
version = "1.2.0";
version = "1.3.0";
src = fetchFromGitHub {
owner = "clockworklabs";
repo = "spacetimedb";
tag = "v${finalAttrs.version}";
hash = "sha256-6Fqv3g9e/9i5JMYHwbymm0n2mBEI0207TAyu/nF39Xk=";
hash = "sha256-KslKsTVhc4xz1XMkkk40tqVZnLoL9UuSPvFHvdZ5vrI=";
};
cargoHash = "sha256-N7A7GAdk9j84qtKHTMtloU469FRwiYtqUdSytFVidlA=";
cargoHash = "sha256-DpGKSWCXSp7fvA1OdZ4YZnanvmKlnxBGsyhEThNwkGo=";
nativeBuildInputs = [
pkg-config
@@ -34,6 +38,9 @@ rustPlatform.buildRustPackage (finalAttrs: {
];
doInstallCheck = true;
env.RUSTY_V8_ARCHIVE = librusty_v8;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/spacetime";
versionCheckProgramArg = "--version";