1{ 2 description = "Flake to build and test the app"; 3 4 inputs = { 5 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 flake-utils.url = "github:numtide/flake-utils"; 7 fenix = { 8 url = "github:nix-community/fenix"; 9 inputs.nixpkgs.follows = "nixpkgs"; 10 }; 11 }; 12 13 outputs = { self, nixpkgs, flake-utils, fenix, ... }: 14 flake-utils.lib.eachDefaultSystem (system: 15 let 16 pkgs = import nixpkgs { inherit system; config = { allowUnfree = true; };}; 17 18 inherit (pkgs) lib; 19 20 toolchain = with fenix.packages.${system}; 21 combine [ 22 minimal.rustc 23 minimal.cargo 24 ]; 25 26 devShell = pkgs.mkShell rec { 27 buildInputs = with pkgs; [ 28 pkg-config 29 udev 30 toolchain 31 ]; 32 33 LD_LIBRARY_PATH = 34 builtins.foldl' (a: b: "${a}:${b}/lib") "${pkgs.vulkan-loader}/lib" buildInputs; 35 }; 36 37 in { 38 devShells = { 39 default = devShell; 40 }; 41 } 42 ); 43}