From 7d9836ebef1950c550081b2ea9cd3f7718280a02 Mon Sep 17 00:00:00 2001 From: Malte Voos Date: Sat, 20 Aug 2022 13:27:09 +0200 Subject: init --- flake.nix | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 flake.nix (limited to 'flake.nix') 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}"; + }; + } + ); +} -- cgit 1.4.1