roc/devtools/vscodeflake.nix
Anton-4 e9f1e568e6
vscode marketplace example
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-10-28 11:33:01 +02:00

56 lines
1.9 KiB
Nix

{
description = "Allows sharing dependencies between dev tools and roc";
inputs = {
# change this path to the path of your roc folder
roc.url = "path:/home/anton/gitrepos/roc3/roc";
# to easily make configs for multiple architectures
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, roc, flake-utils }:
let supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];
in flake-utils.lib.eachSystem supportedSystems (system:
let
pkgs = import roc.inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
};
rocShell = roc.devShell.${system};
in {
devShell = pkgs.mkShell {
packages = let
devInputs = (with pkgs; [ less gdb ]);
vscodeWithExtensions = pkgs.vscode-with-extensions.override {
vscodeExtensions = with pkgs.vscode-extensions; [
matklad.rust-analyzer
eamodio.gitlens
bbenoist.nix
vadimcn.vscode-lldb
]
#++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
# {
# name = "";
# publisher = "";
# version = "";
# keep this sha for the first run, nix will tell you the correct one to change it to
# sha256 = "I1kTVTBZXvp9x3sB+59OgIc1Ttq0WAZy8VCZhEtwrm4=";
# }
# ]
;
};
in [ vscodeWithExtensions devInputs ];
inputsFrom = [ rocShell ];
# env vars
LLVM_SYS_130_PREFIX = rocShell.LLVM_SYS_130_PREFIX;
NIX_GLIBC_PATH = rocShell.NIX_GLIBC_PATH;
LD_LIBRARY_PATH = rocShell.LD_LIBRARY_PATH;
NIXPKGS_ALLOW_UNFREE = rocShell.NIXPKGS_ALLOW_UNFREE;
};
});
}