Build the overrides that make kifu-gtk successfully build

This commit is contained in:
Savanni D'Gerinel 2023-04-04 00:22:22 -04:00
parent b790d25334
commit e70a191e34
3 changed files with 30 additions and 27 deletions

View File

@ -45,41 +45,33 @@
packages."x86_64-linux" =
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
standardOverride = attrs: {
nativeBuildInputs = [
pkgs.pkg-config
pkgs.gtk4
];
verbose = true;
};
customBuildInfo = pkgs: pkgs.buildRustCrate.override {
defaultCrateOverrides = pkgs.defaultCrateOverrides // {
gobject-sys = attrs: {
nativeBuildInputs = [
pkgs.pkg-config
pkgs.wrapGAppsHook4
pkgs.gtk4
pkgs.glib
pkgs.clang
];
};
graphene-sys = attrs: {
nativeBuildInputs = [
pkgs.pkg-config
pkgs.wrapGAppsHook4
pkgs.gtk4
pkgs.glib
pkgs.clang
];
};
cairo-sys = attrs: {
nativeBuildInputs = [
pkgs.pkg-config
pkgs.wrapGAppsHook4
pkgs.gtk4
pkgs.glib
pkgs.clang
];
};
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;
};
};
in {
# gobject-sys = pkgs.buildRustCrate cargo.internal.crates.gobject-sys;
kifu-gtk = (import ./kifu/kifu-gtk/Cargo.nix {
inherit pkgs;
buildRustCrateForPkgs = customBuildInfo;
rootFeatures = [ "screenplay" ];
release = false;
}).rootCrate.build;
};
};

View File

@ -0,0 +1,8 @@
[package]
name = "kifu-test"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

View File

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}