mirror of
https://github.com/mx42/nix_spacetimedb.git
synced 2026-01-14 05:39:52 +01:00
chore: try to reorganize a bit - doesn't work imported in local flake
This commit is contained in:
26
flake.nix
26
flake.nix
@@ -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 ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user