diff options
author | Malte Voos <git@mal.tc> | 2022-08-20 13:27:09 +0200 |
---|---|---|
committer | Malte Voos <git@mal.tc> | 2022-08-20 13:27:09 +0200 |
commit | 7d9836ebef1950c550081b2ea9cd3f7718280a02 (patch) | |
tree | 8bb48736644fe40fb1861f980844c37a5ed44eff /flake.nix | |
download | life-7d9836ebef1950c550081b2ea9cd3f7718280a02.tar.gz life-7d9836ebef1950c550081b2ea9cd3f7718280a02.zip |
init
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}"; + }; + } + ); +} |