chore: try to reorganize a bit - doesn't work imported in local flake

This commit is contained in:
Xavier Morel
2025-05-13 18:39:43 +02:00
parent 205f52c60a
commit ac50832939

View File

@@ -18,25 +18,18 @@
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
}; };
spacetime = pkgs.stdenv.mkDerivation {
stdenv = pkgs.stdenv;
lib = pkgs.lib;
fetchurl = pkgs.fetchurl;
autoPatchelfHook = pkgs.autoPatchelfHook;
libgcc = pkgs.libgcc;
in
{
packages = {
default = stdenv.mkDerivation {
pname = "spacetimedb"; pname = "spacetimedb";
version = "1.0.1"; version = "1.0.1";
src = fetchurl { src = pkgs.fetchurl {
url = "https://github.com/clockworklabs/SpacetimeDB/releases/download/v1.1.0/spacetime-x86_64-unknown-linux-gnu.tar.gz"; url = "https://github.com/clockworklabs/SpacetimeDB/releases/download/v1.1.0/spacetime-x86_64-unknown-linux-gnu.tar.gz";
hash = "sha256-t7V4TkPWQfzH8PUkRLq1OMaKhZ4in4EZCLKinc2oSik="; hash = "sha256-t7V4TkPWQfzH8PUkRLq1OMaKhZ4in4EZCLKinc2oSik=";
}; };
nativeBuildInputs = [ autoPatchelfHook ]; nativeBuildInputs = with pkgs; [
autoPatchelfHook
];
buildInputs = [ buildInputs = with pkgs; [
libgcc libgcc
stdenv.cc.cc.lib stdenv.cc.cc.lib
]; ];
@@ -53,10 +46,15 @@
runHook postInstall runHook postInstall
''; '';
}; };
in
{
packages = {
spacetimedb = spacetime;
default = spacetime;
}; };
devShells = { devShells = {
default = pkgs.mkShell { default = pkgs.mkShell {
buildInputs = [ self.${system}.packages.default ]; buildInputs = [ spacetime ];
}; };
}; };
} }