Skip to content

Commit

Permalink
feat(flake): setup flake.nix to work with bevy dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
kpbaks committed Jan 31, 2024
1 parent 29c900d commit 519444a
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 23 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/target
.direnv/
60 changes: 60 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

61 changes: 39 additions & 22 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,30 +1,47 @@
{
description = "Your Flake Description";
description = "gbp-rs";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs.inputs.flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
in
with pkgs;
outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (system: let
# system = "x86_64-linux";
# pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs {inherit system;};
in
with pkgs; {
# devShells.${system}.default = pkgs.mkShell rec {
# formatter.${system} = pkgs.alejandra;
devShells.default = pkgs.mkShell rec {
nativeBuildInputs = [
pkgs.pkg-config
];
buildInputs = [
pkgs.udev
pkgs.alsa-lib
pkgs.vulkan-loader
pkgs.xorg.libX11
pkgs.xorg.libXcursor
pkgs.xorg.libXi
pkgs.xorg.libXrandr # To use the x11 feature
pkgs.libxkbcommon
pkgs.wayland # To use the wayland feature

mkShell rec {
nativeBuildInputs = [
pkg-config
];
buildInputs = [
udev alsa-lib vulkan-loader
xorg.libX11 xorg.libXcursor xorg.libXi xorg.libXrandr # To use the x11 feature
libxkbcommon wayland # To use the wayland feature
];
LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs;
}
);
}
pkgs.bacon
pkgs.rustup
];

# shellHook = ''
# echo hello
# '';

LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs;
};
});
}
1 change: 0 additions & 1 deletion gbpplanner-rs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use bevy_inspector_egui::quick::WorldInspectorPlugin;

#[derive(Parser)]
#[clap(version, author, about)]
// #[clap(version = "0.1.0", author = "Johannes Schickling")]
struct Cli {
/// Sets a custom config file
#[arg(short, long, value_name = "FILE")]
Expand Down

0 comments on commit 519444a

Please sign in to comment.