commit c1996a1e6511ace00aba68438228119b72e04af8 Author: janis Date: Thu Oct 16 17:05:25 2025 +0200 flake diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..b3e6466 --- /dev/null +++ b/flake.nix @@ -0,0 +1,35 @@ +{ + description = "A nix flake for nightly rust"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + rust-overlays.url = "github:oxalica/rust-overlay"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils, rust-overlays, ...}: + flake-utils.lib.eachDefaultSystem (system: let + overlays = [ + (import rust-overlays) + ]; + pkgs = import nixpkgs { + inherit system overlays; + }; + rust = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default.override { + extensions = ["rust-src" "rust-analyzer"]; + targets = [ "x86_64-unknown-linux-gnu" ]; + }); + in with pkgs; { + devShells.default = pkgs.mkShell { + buildInputs = [ + pkg-config + mold + clang + nasm + nasmfmt + git + rust + ]; + }; + }); +}