Moving stuff around and flailing with the build tools

This commit is contained in:
Savanni D'Gerinel 2023-04-27 10:07:28 -04:00
parent fa0f662806
commit 6eee6df6e4
4 changed files with 3673 additions and 8 deletions

View File

@ -69,21 +69,27 @@
gdk4-sys = standardOverride; gdk4-sys = standardOverride;
gsk4-sys = standardOverride; gsk4-sys = standardOverride;
gtk4-sys = standardOverride; gtk4-sys = standardOverride;
kifu-core = attrs: {
nativeBuildInputs = [
typeshare.packages."x86_64-linux".default
];
};
kifu-gtk = attrs: { kifu-gtk = attrs: {
nativeBuildInputs = [ nativeBuildInputs = [
pkgs.glib pkgs.glib
typeshare.packages."x86_64-linux".default typeshare.packages."x86_64-linux".default
]; ];
}; };
kifu-wasm = attrs: {
nativeBuildInputs = [
typeshare.packages."x86_64-linux".default
pkgs.wasm-pack
];
buildPhase = ''
cargo build --offline
'';
installPhase = ''
exit 1
'';
};
}; };
}; };
in { in {
kifu-gtk = (import ./kifu/kifu-gtk/Cargo.nix { kifu-gtk = (import ./kifu/kifu-gtk/Cargo.nix {
inherit pkgs; inherit pkgs;
buildRustCrateForPkgs = customBuildInfo; buildRustCrateForPkgs = customBuildInfo;
@ -91,6 +97,16 @@
release = true; release = true;
}).rootCrate.build; }).rootCrate.build;
kifu-wasm = (import ./kifu/kifu-pwa/core/Cargo.nix {
inherit pkgs;
buildRustCrateForPkgs = customBuildInfo;
release = true;
}).rootCrate.build;
/*
kifu-wasm = import ./kifu { inherit (pkgs) rustPlatform wasm-pack; mkDerivation = pkgs.stdenv.mkDerivation; typeshare = typeshare.packages."x86_64-linux".default; };
*/
cyberpunk-splash = (import ./cyberpunk-splash/Cargo.nix { cyberpunk-splash = (import ./cyberpunk-splash/Cargo.nix {
inherit pkgs; inherit pkgs;
buildRustCrateForPkgs = customBuildInfo; buildRustCrateForPkgs = customBuildInfo;

17
kifu/default.nix Normal file
View File

@ -0,0 +1,17 @@
{ mkDerivation
, rustPlatform
, typeshare
, wasm-pack
}:
let
in mkDerivation {
name = "kifu-wasm";
version = "0.0.0";
src = ./.;
buildPhase = ''
pwd
exit 1
'';
}

3632
kifu/kifu-pwa/core/Cargo.nix Normal file

File diff suppressed because it is too large Load Diff

View File

@ -3,9 +3,9 @@ use std::process::Command;
fn main() { fn main() {
Command::new("typeshare") Command::new("typeshare")
.args(&[ .args(&[
".", "../../kifu-core",
"--lang=typescript", "--lang=typescript",
"--output-file=typeshare/core.d.ts", "--output-file=pkg/core.d.ts",
]) ])
.status() .status()
.unwrap(); .unwrap();