Set up bash scripts that can be used as a build environment #52
|
@ -0,0 +1,26 @@
|
|||
|
||||
if [[ ! -z "$MODULE" ]]; then
|
||||
MODULE="-p $MODULE"
|
||||
fi
|
||||
|
||||
case $CMD in
|
||||
build)
|
||||
$CARGO build $MODULE $PARAMS
|
||||
;;
|
||||
test)
|
||||
$CARGO test $MODULE $PARAMS
|
||||
;;
|
||||
release)
|
||||
$CARGO build --release $MODULE $PARAMS
|
||||
;;
|
||||
clean)
|
||||
$CARGO clean $MODULE
|
||||
;;
|
||||
"")
|
||||
echo "No command specified. Use build | test | release | clean"
|
||||
;;
|
||||
*)
|
||||
echo "$CMD is unknown. Use build | test | release | clean"
|
||||
;;
|
||||
esac
|
||||
|
98
flake.nix
98
flake.nix
|
@ -46,56 +46,52 @@
|
|||
];
|
||||
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;
|
||||
kifu-gtk = attrs: {
|
||||
nativeBuildInputs = [
|
||||
pkgs.glib
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
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 = true;
|
||||
# }).rootCrate.build;
|
||||
cyberpunk-splash = (import ./cyberpunk-splash/Cargo.nix {
|
||||
inherit pkgs;
|
||||
buildRustCrateForPkgs = customBuildInfo;
|
||||
release = true;
|
||||
}).rootCrate.build;
|
||||
|
||||
dashboard = (import ./dashboard/Cargo.nix {
|
||||
inherit pkgs;
|
||||
release = true;
|
||||
}).rootCrate.build;
|
||||
};
|
||||
|
||||
hydraJobs = {
|
||||
inherit (self) packages;
|
||||
};
|
||||
# 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;
|
||||
# kifu-gtk = attrs: {
|
||||
# nativeBuildInputs = [
|
||||
# pkgs.glib
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# 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 = true;
|
||||
# }).rootCrate.build;
|
||||
# cyberpunk-splash = (import ./cyberpunk-splash/Cargo.nix {
|
||||
# inherit pkgs;
|
||||
# buildRustCrateForPkgs = customBuildInfo;
|
||||
# release = true;
|
||||
# }).rootCrate.build;
|
||||
#
|
||||
# dashboard = (import ./dashboard/Cargo.nix {
|
||||
# inherit pkgs;
|
||||
# release = true;
|
||||
# }).rootCrate.build;
|
||||
# };
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue