mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-11 05:34:11 +03:00
e9f1e568e6
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
56 lines
1.9 KiB
Nix
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;
|
|
};
|
|
});
|
|
}
|
|
|