Move the cyberpunk build script into the cyberpunk directory

This commit is contained in:
Savanni D'Gerinel 2023-05-02 18:15:10 -04:00
parent a668a114db
commit 72237b2f2e
2 changed files with 39 additions and 4 deletions

View File

@ -0,0 +1,36 @@
{ pkgs, typeshare }:
let
standardOverride = attrs: {
nativeBuildInputs = [
pkgs.pkg-config
pkgs.gtk4
];
buildInputs = [
typeshare
];
verbose = true;
};
customBuildInfo = pkgs: pkgs.buildRustCrate.override {
defaultCrateOverrides = pkgs.defaultCrateOverrides // {
cairo-sys-rs = standardOverride;
graphene-sys = standardOverride;
gobject-sys = standardOverride;
pango-sys = standardOverride;
gio-sys = standardOverride;
gdk-pixbuf-sys = standardOverride;
gdk4-sys = standardOverride;
gsk4-sys = standardOverride;
gtk4-sys = standardOverride;
kifu-gtk = attrs: {
nativeBuildInputs = [
pkgs.glib
typeshare
];
};
};
};
in (import ./Cargo.nix {
inherit pkgs;
buildRustCrateForPkgs = customBuildInfo;
release = true;
}).rootCrate.build

View File

@ -105,11 +105,10 @@
kifu-wasm = import ./kifu { inherit (pkgs) rustPlatform wasm-pack; mkDerivation = pkgs.stdenv.mkDerivation; typeshare = typeshare.packages."x86_64-linux".default; }; 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 {
inherit pkgs; inherit pkgs;
buildRustCrateForPkgs = customBuildInfo; typeshare = typeshare.packages."x86_64-linux".default;
release = true; };
}).rootCrate.build;
}; };
}; };
} }