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
|
||||||
|
|
86
flake.nix
86
flake.nix
|
@ -46,56 +46,52 @@
|
||||||
];
|
];
|
||||||
LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib";
|
LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib";
|
||||||
};
|
};
|
||||||
packages."x86_64-linux" =
|
# packages."x86_64-linux" =
|
||||||
let
|
# let
|
||||||
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
# pkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||||
standardOverride = attrs: {
|
# standardOverride = attrs: {
|
||||||
nativeBuildInputs = [
|
# nativeBuildInputs = [
|
||||||
pkgs.pkg-config
|
# pkgs.pkg-config
|
||||||
pkgs.gtk4
|
# pkgs.gtk4
|
||||||
];
|
# ];
|
||||||
verbose = true;
|
# verbose = true;
|
||||||
};
|
# };
|
||||||
customBuildInfo = pkgs: pkgs.buildRustCrate.override {
|
# customBuildInfo = pkgs: pkgs.buildRustCrate.override {
|
||||||
defaultCrateOverrides = pkgs.defaultCrateOverrides // {
|
# defaultCrateOverrides = pkgs.defaultCrateOverrides // {
|
||||||
cairo-sys-rs = standardOverride;
|
# cairo-sys-rs = standardOverride;
|
||||||
graphene-sys = standardOverride;
|
# graphene-sys = standardOverride;
|
||||||
gobject-sys = standardOverride;
|
# gobject-sys = standardOverride;
|
||||||
pango-sys = standardOverride;
|
# pango-sys = standardOverride;
|
||||||
gio-sys = standardOverride;
|
# gio-sys = standardOverride;
|
||||||
gdk-pixbuf-sys = standardOverride;
|
# gdk-pixbuf-sys = standardOverride;
|
||||||
gdk4-sys = standardOverride;
|
# gdk4-sys = standardOverride;
|
||||||
gsk4-sys = standardOverride;
|
# gsk4-sys = standardOverride;
|
||||||
gtk4-sys = standardOverride;
|
# gtk4-sys = standardOverride;
|
||||||
kifu-gtk = attrs: {
|
# kifu-gtk = attrs: {
|
||||||
nativeBuildInputs = [
|
# nativeBuildInputs = [
|
||||||
pkgs.glib
|
# pkgs.glib
|
||||||
];
|
# ];
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
in {
|
# in {
|
||||||
# gobject-sys = pkgs.buildRustCrate cargo.internal.crates.gobject-sys;
|
# # gobject-sys = pkgs.buildRustCrate cargo.internal.crates.gobject-sys;
|
||||||
# kifu-gtk = (import ./kifu/kifu-gtk/Cargo.nix {
|
# kifu-gtk = (import ./kifu/kifu-gtk/Cargo.nix {
|
||||||
# inherit pkgs;
|
# inherit pkgs;
|
||||||
# buildRustCrateForPkgs = customBuildInfo;
|
# buildRustCrateForPkgs = customBuildInfo;
|
||||||
# rootFeatures = [ "screenplay" ];
|
# rootFeatures = [ "screenplay" ];
|
||||||
# release = true;
|
# release = true;
|
||||||
# }).rootCrate.build;
|
# }).rootCrate.build;
|
||||||
cyberpunk-splash = (import ./cyberpunk-splash/Cargo.nix {
|
# cyberpunk-splash = (import ./cyberpunk-splash/Cargo.nix {
|
||||||
inherit pkgs;
|
# inherit pkgs;
|
||||||
buildRustCrateForPkgs = customBuildInfo;
|
# buildRustCrateForPkgs = customBuildInfo;
|
||||||
release = true;
|
# release = true;
|
||||||
}).rootCrate.build;
|
# }).rootCrate.build;
|
||||||
|
#
|
||||||
dashboard = (import ./dashboard/Cargo.nix {
|
# dashboard = (import ./dashboard/Cargo.nix {
|
||||||
inherit pkgs;
|
# inherit pkgs;
|
||||||
release = true;
|
# release = true;
|
||||||
}).rootCrate.build;
|
# }).rootCrate.build;
|
||||||
};
|
# };
|
||||||
|
|
||||||
hydraJobs = {
|
|
||||||
inherit (self) packages;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue