Created
May 15, 2025 07:52
-
-
Save matthiasbeyer/333b43973c76704647f22f1b942ba5f3 to your computer and use it in GitHub Desktop.
flake.nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "Helper flake for rust dev envs"; | |
inputs = { | |
nixpkgs.url = "nixpkgs/nixos-24.11"; | |
flake-utils.url = "github:numtide/flake-utils"; | |
rust-overlay = { | |
url = "github:oxalica/rust-overlay"; | |
inputs = { | |
nixpkgs.follows = "nixpkgs"; | |
flake-utils.follows = "flake-utils"; | |
}; | |
}; | |
}; | |
outputs = { self, nixpkgs, flake-utils, rust-overlay, ... }: | |
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system: | |
let | |
pkgs = import nixpkgs { | |
inherit system; | |
overlays = [ (import rust-overlay) ]; | |
}; | |
rustTarget = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; | |
in | |
{ | |
devShells.default = pkgs.mkShell { | |
nativeBuildInputs = [ | |
rustTarget | |
pkgs.openssl | |
pkgs.pkg-config | |
]; | |
}; | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment