diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..9939f68 --- /dev/null +++ b/flake.nix @@ -0,0 +1,45 @@ +{ + inputs = { + flake-utils.url = "github:numtide/flake-utils"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + fenix = { + url = "github:nix-community/fenix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + outputs = { self, flake-utils, nixpkgs, fenix }: flake-utils.lib.eachDefaultSystem ( + system: + let + pkgs = import nixpkgs { + inherit system; + overlays = [ fenix.overlay ]; + }; + in + { + devShell = with pkgs; mkShell rec { + nativeBuildInputs = [ + (fenix.packages.${system}.complete.withComponents [ + "cargo" + "clippy" + "rust-src" + "rustc" + "rustfmt" + ]) + rust-analyzer-nightly + cargo-edit + + cmake + pkg-config + ]; + + buildInputs = [ + libxkbcommon + libGL + wayland + fontconfig + ]; + LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}"; + }; + } + ); +} |