c2vi dash working
This commit is contained in:
141
flake.nix
141
flake.nix
@@ -35,7 +35,7 @@ let
|
||||
];
|
||||
wasmCrane = (crane.mkLib pkgs).overrideToolchain wasmToolchain;
|
||||
|
||||
osToolchain = fenix.packages.${system}.nightly.toolchain;
|
||||
osToolchain = fenix.packages.${system}.latest.toolchain;
|
||||
|
||||
osCrane = (crane.mkLib pkgs).overrideToolchain osToolchain;
|
||||
|
||||
@@ -120,11 +120,67 @@ in {
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
default = osCrane.buildPackage {
|
||||
src = "${self}";
|
||||
cargoExtraArgs = "--bin mize --features target-os";
|
||||
fileSetForCrate =
|
||||
crate:
|
||||
pkgs.lib.fileset.toSource {
|
||||
root = ./.;
|
||||
fileset = pkgs.lib.fileset.unions [
|
||||
./Cargo.toml
|
||||
./Cargo.lock
|
||||
(craneLib.fileset.commonCargoSources ./packages/marts)
|
||||
(craneLib.fileset.commonCargoSources ./packages/mize)
|
||||
(craneLib.fileset.commonCargoSources ./packages/ppc/spacetimedb)
|
||||
(craneLib.fileset.commonCargoSources ./packages/mme)
|
||||
(craneLib.fileset.commonCargoSources ./packages/vic)
|
||||
(craneLib.fileset.commonCargoSources ./packages/ac_mize_macros)
|
||||
(craneLib.fileset.commonCargoSources crate)
|
||||
];
|
||||
};
|
||||
ppc = osCrane.buildPackage {
|
||||
src = fileSetForCrate ./packages/ppc;
|
||||
cargoExtraArgs = "-p ppc";
|
||||
nativeBuildInputs = [
|
||||
pkgs.pkg-config
|
||||
pkgs.gobject-introspection
|
||||
pkgs.gobject-introspection.dev
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
git # needed to build spacetimedb as it needs to get it's git hash for setting it's version
|
||||
at-spi2-atk
|
||||
atkmm
|
||||
cairo
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk3
|
||||
harfbuzz
|
||||
librsvg
|
||||
libsoup_3
|
||||
pango
|
||||
webkitgtk_4_1
|
||||
openssl
|
||||
wasm-bindgen-cli
|
||||
lld_20
|
||||
xdotool
|
||||
];
|
||||
|
||||
LD_LIBRARY_PATH = with pkgs; pkgs.lib.makeLibraryPath [
|
||||
xdotool
|
||||
webkitgtk_4_1
|
||||
pango
|
||||
openssl
|
||||
at-spi2-atk
|
||||
atkmm
|
||||
cairo
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk3
|
||||
harfbuzz
|
||||
librsvg
|
||||
libsoup_3
|
||||
];
|
||||
};
|
||||
#SPACETIMEDB_NIX_BUILD_GIT_COMMIT =
|
||||
|
||||
wasm = wasmCrane.buildPackage {
|
||||
src = "${self}";
|
||||
@@ -213,6 +269,81 @@ in {
|
||||
|
||||
|
||||
#default = (mizeLib.buildMizeForSystem system).modules.mize.devShell;
|
||||
buildShell = pkgs.mkShell {
|
||||
|
||||
MIZE_BUILD_CONFIG = let
|
||||
settingsFormat = pkgs.formats.toml { };
|
||||
in settingsFormat.generate "mize-build-config.toml" {
|
||||
config = {
|
||||
namespace = "mize.buildtime.ns";
|
||||
module_url = "c2vi.dev";
|
||||
};
|
||||
};
|
||||
shellHook = ''
|
||||
mize_project_root=$(${pkgs.lib.getExe pkgs.git} rev-parse --show-toplevel)
|
||||
export MIZE_CONFIG_FILES=$mize_project_root/mize_config.toml
|
||||
'';
|
||||
nativeBuildInputs = [
|
||||
pkgs.wasm-pack
|
||||
pkgs.pkg-config
|
||||
pkgs.gobject-introspection
|
||||
pkgs.gobject-introspection.dev
|
||||
|
||||
# thanks to: https://github.com/NixOS/nixpkgs/pull/496279/changes
|
||||
(pkgs.buildWasmBindgenCli rec {
|
||||
src = pkgs.fetchCrate {
|
||||
pname = "wasm-bindgen-cli";
|
||||
version = "0.2.114";
|
||||
hash = "sha256-xrCym+rFY6EUQFWyWl6OPA+LtftpUAE5pIaElAIVqW0=";
|
||||
};
|
||||
|
||||
cargoDeps = pkgs.rustPlatform.fetchCargoVendor {
|
||||
inherit src;
|
||||
inherit (src) pname version;
|
||||
hash = "sha256-Z8+dUXPQq7S+Q7DWNr2Y9d8GMuEdSnq00quUR0wDNPM=";
|
||||
};
|
||||
})
|
||||
(fenix.packages.${system}.combine [
|
||||
fenix.packages.${system}.latest.toolchain
|
||||
fenix.packages.${system}.targets.wasm32-unknown-unknown.latest.toolchain
|
||||
])
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
at-spi2-atk
|
||||
atkmm
|
||||
cairo
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk3
|
||||
harfbuzz
|
||||
librsvg
|
||||
libsoup_3
|
||||
pango
|
||||
webkitgtk_4_1
|
||||
openssl
|
||||
wasm-bindgen-cli
|
||||
lld_20
|
||||
xdotool
|
||||
];
|
||||
|
||||
LD_LIBRARY_PATH = with pkgs; pkgs.lib.makeLibraryPath [
|
||||
xdotool
|
||||
webkitgtk_4_1
|
||||
pango
|
||||
openssl
|
||||
at-spi2-atk
|
||||
atkmm
|
||||
cairo
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gtk3
|
||||
harfbuzz
|
||||
librsvg
|
||||
libsoup_3
|
||||
];
|
||||
|
||||
};
|
||||
default = pkgs.mkShell {
|
||||
|
||||
MIZE_BUILD_CONFIG = let
|
||||
|
||||
Reference in New Issue
Block a user