Build with crate2nix
This commit is contained in:
parent
0240132153
commit
e32f103dd4
33
flake.nix
33
flake.nix
|
@ -38,8 +38,41 @@
|
|||
pkgs.pkg-config
|
||||
pkgs.sqlite
|
||||
pkgs.rustup
|
||||
pkgs.crate2nix
|
||||
];
|
||||
LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib";
|
||||
};
|
||||
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 // {
|
||||
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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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]
|
|
@ -0,0 +1,3 @@
|
|||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
Loading…
Reference in New Issue