Skip to content

Instantly share code, notes, and snippets.

@kolektiv
Created June 16, 2022 20:16
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save kolektiv/d6620afdc1a88271f3a81bd8541594c0 to your computer and use it in GitHub Desktop.
{
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