Created
June 16, 2022 20:16
-
-
Save kolektiv/d6620afdc1a88271f3a81bd8541594c0 to your computer and use it in GitHub Desktop.
This file contains 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 = "A very basic flake"; | |
inputs = { | |
fenix = { | |
url = "github:nix-community/fenix"; | |
inputs.nixpkgs.follows = "nixpkgs"; | |
}; | |
nixpkgs = { | |
url = "nixpkgs/nixos-unstable"; | |
}; | |
utils = { | |
url = "github:numtide/flake-utils"; | |
}; | |
}; | |
outputs = { self, fenix, nixpkgs, utils }: | |
utils.lib.eachDefaultSystem (system: | |
let | |
core = import ~/.config/nix/software/vscode/extensions/all.nix { pkgs = pkgs; }; | |
pkgs = nixpkgs.legacyPackages.${system}; | |
rust = fenix.packages.${system}; | |
in rec { | |
devShells.default = pkgs.mkShell { | |
buildInputs = with pkgs; [ | |
# Rust Toolchain | |
rust.stable.toolchain | |
# Compiler Dependencies | |
clang | |
lld | |
libiconv | |
# VSCode with Rust Extensions | |
(vscode-with-extensions.override { | |
vscodeExtensions = core.extensions ++ (with pkgs.vscode-extensions; [ | |
bungcip.better-toml | |
]) ++ [ | |
rust.rust-analyzer-vscode-extension | |
]; | |
}) | |
]; | |
CARGO_HOME = "./.cargo"; | |
}; | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment