Created
August 19, 2024 23:30
-
-
Save MeexReay/eaf5405d8e8f952305b4d67663c6ed4d to your computer and use it in GitHub Desktop.
Rust project flake.nix template
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 = "Rust project"; | |
inputs = { | |
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | |
rust-overlay.url = "github:oxalica/rust-overlay"; | |
flake-utils.url = "github:numtide/flake-utils"; | |
}; | |
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }: | |
flake-utils.lib.eachDefaultSystem (system: | |
let | |
overlays = [ (import rust-overlay) ]; | |
pkgs = import nixpkgs { | |
inherit system overlays; | |
}; | |
in | |
{ | |
devShells.default = with pkgs; mkShell { | |
buildInputs = [ | |
openssl | |
pkg-config | |
rust-bin.stable.latest.default | |
]; | |
}; | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment