/ flake.nix
flake.nix
1 { 2 description = "A devShell example"; 3 4 inputs = { 5 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 fenix.url = "github:nix-community/fenix"; 7 flake-utils.url = "github:numtide/flake-utils"; 8 }; 9 10 outputs = { nixpkgs, fenix, flake-utils, ... }: 11 flake-utils.lib.eachDefaultSystem (system: 12 let 13 overlays = [ fenix.overlays.default ]; 14 pkgs = import nixpkgs { 15 inherit system overlays; 16 }; 17 fx = fenix.packages.${system}; 18 rust-toolchain = fx.combine [ 19 fx.latest.cargo 20 fx.latest.rustc 21 fx.latest.rust-analyzer 22 fx.latest.clippy 23 fx.latest.rustfmt 24 fx.latest.rust-src 25 fx.latest.miri 26 ]; 27 kompari = pkgs.callPackage ./nix/kompari.nix { }; 28 in 29 with pkgs; 30 { 31 devShells.default = mkShell rec { 32 buildInputs = [ 33 cargo-insta 34 cargo-flamegraph 35 cargo-fuzz 36 cargo-nextest 37 cargo-outdated 38 cargo-show-asm 39 libclang 40 libxkbcommon 41 kompari 42 stdenv.cc.cc 43 taplo 44 typst 45 tinymist 46 vulkan-loader 47 wayland 48 wayland-protocols 49 xorg.libxcb 50 ]; 51 52 nativeBuildInputs = [ 53 rust-toolchain 54 pkgs.rustPlatform.bindgenHook 55 wayland-scanner 56 ]; 57 58 LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs; 59 LIBCLANG_PATH = "${pkgs.libclang.lib}/lib"; 60 }; 61 } 62 ); 63 }