Try to set up staged building

This commit is contained in:
Savanni D'Gerinel 2023-04-03 09:22:23 -04:00
parent d8573665d9
commit d776a64837
1 changed files with 34 additions and 2 deletions

View File

@ -47,17 +47,49 @@
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
craneLib = crane.lib."x86_64-linux";
in {
in rec {
kifu-core-deps = craneLib.buildDepsOnly {
pname = "kifu-core-deps";
version = "0.1.0";
src = craneLib.cleanCargoSource (craneLib.path ./.);
cargoExtraArgs = "-p kifu-core";
};
kifu-core = craneLib.buildPackage {
pname = "kifu-core";
version = "0.1.0";
src = craneLib.cleanCargoSource (craneLib.path ./.);
cargoExtraArgs = "-p kifu-core";
doInstallCargoArtifacts = true;
inherit kifu-core-deps;
};
kifu-gtk-deps = craneLib.buildDepsOnly {
pname = "kifu-gtk-deps";
version = "0.1.0";
src = craneLib.cleanCargoSource (craneLib.path ./.);
nativeBuildInputs = with pkgs; [
pkg-config
glib
gtk4
];
buildInputs = with pkgs; [
pkg-config
];
cargoExtraArgs = "-p kifu-gtk";
inherit kifu-core;
};
kifu-gtk = craneLib.buildPackage {
pname = "kifu-gtk";
version = "0.1.0";
src = craneLib.cleanCargoSource (craneLib.path ./.);
cargoExtraArgs = "-p kifu-gtk";
nativeBuildInputs = with pkgs; [
pkg-config
glib
gtk4
];
buildInputs = with pkgs; [
pkg-config
];
inherit kifu-gtk-deps;
};
};
};