File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed
pkgs/by-name/sp/spacetimedb Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ lib ,
3+ fetchFromGitHub ,
4+ rustPlatform ,
5+ pkg-config ,
6+ perl ,
7+ git ,
8+ versionCheckHook ,
9+ } :
10+ rustPlatform . buildRustPackage ( finalAttrs : {
11+ pname = "spacetimedb" ;
12+ version = "1.0.0" ;
13+
14+ src = fetchFromGitHub {
15+ owner = "clockworklabs" ;
16+ repo = "spacetimedb" ;
17+ tag = "v${ finalAttrs . version } " ;
18+ hash = "sha256-L3D7DfMQNuoZ/twAsrK20royIGp6PXCAFZKnb0PgSu0=" ;
19+ } ;
20+
21+ useFetchCargoVendor = true ;
22+ cargoHash = "sha256-eOZRp3LRbQzHfT+evKY55ifevX+ki9oT5B7vZs3ym+c=" ;
23+
24+ nativeBuildInputs = [
25+ pkg-config
26+ perl
27+ ] ;
28+
29+ # Replace hardcoded git binary
30+ postPatch = ''
31+ substituteInPlace crates/cli/build.rs --replace-fail 'Command::new("git")' 'Command::new("${ lib . getExe git } ")'
32+ '' ;
33+
34+ cargoBuildFlags = [ "-p spacetimedb-standalone -p spacetimedb-cli" ] ;
35+
36+ checkFlags = [
37+ # requires wasm32-unknown-unknown target
38+ "--skip=codegen"
39+ ] ;
40+
41+ doInstallCheck = true ;
42+ nativeInstallCheckInputs = [ versionCheckHook ] ;
43+ versionCheckProgram = "${ placeholder "out" } /bin/spacetime" ;
44+ versionCheckProgramArg = "--version" ;
45+
46+ postInstall = ''
47+ mv $out/bin/spacetimedb-cli $out/bin/spacetime
48+ '' ;
49+
50+ meta = {
51+ description = "Full-featured relational database system that lets you run your application logic inside the database" ;
52+ homepage = "https://github.com/clockworklabs/SpacetimeDB" ;
53+ license = lib . licenses . bsl11 ;
54+ mainProgram = "spacetime" ;
55+ maintainers = with lib . maintainers ; [ akotro ] ;
56+ } ;
57+ } )
You can’t perform that action at this time.
0 commit comments