{
  description = "Openbirch rust flake";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
    rust-overlay = {
      url = "github:oxalica/rust-overlay";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs =
    { self
    , nixpkgs
    , rust-overlay
    ,
    }:
    let
      # rust-overlay = import rust-overlay;
      pkgs =
        import nixpkgs
          {
            system = "x86_64-linux";
            overlays = [ rust-overlay.overlays.default ];
          };
    in
    {
      devShells.x86_64-linux.default = pkgs.mkShell rec {
        buildInputs = with pkgs; [
          rust-bin.nightly.latest.default
          rust-analyzer

          expat
          fontconfig
          freetype
          freetype.dev
          libGL
          pkg-config
          xorg.libX11
          xorg.libXcursor
          xorg.libXi
          xorg.libXrandr
          wayland
          libxkbcommon
          rust-cbindgen
          cmake
          glfw
          clang
          libclang
          libllvm
          nerd-fonts.mononoki

          m4
        ];

        LD_LIBRARY_PATH =
          builtins.foldl' (a: b: "${a}:${b}/lib") "${pkgs.vulkan-loader}/lib" buildInputs;

        NIX_LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;

        shellHook = ''
          export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH
          export LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib";
          # export MONOSPACE_FONT="${pkgs.nerd-fonts.mononoki}/share/fonts/truetype/NerdFonts/Mononoki/MononokiNerdFont-Regular.ttf "
        '';
      };
    };
}
