This commit is contained in:
janis 2025-10-16 17:05:25 +02:00
commit c1996a1e65
Signed by: janis
SSH key fingerprint: SHA256:bB1qbbqmDXZNT0KKD5c2Dfjg53JGhj7B3CFcLIzSqq8
2 changed files with 36 additions and 0 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

35
flake.nix Normal file
View file

@ -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
];
};
});
}