mirror of
https://github.com/roc-lang/roc.git
synced 2024-10-05 14:47:18 +03:00
587d0afd46
Commits: * Code coverage * flake lock update * update nix rev * flake update * llvm-cov does not work on macos * back to old rev
35 lines
1.3 KiB
Nix
35 lines
1.3 KiB
Nix
{ pkgs }:
|
|
let
|
|
rustVersion = (pkgs.rust-bin.fromRustupToolchainFile ../rust-toolchain.toml);
|
|
rustPlatform = pkgs.makeRustPlatform {
|
|
cargo = rustVersion;
|
|
rustc = rustVersion;
|
|
};
|
|
|
|
# this will allow our callPackage to reference our own packages defined below
|
|
# mainly helps with passing compile-deps and rustPlatform to builder automatically
|
|
callPackage = pkgs.lib.callPackageWith (pkgs // packages);
|
|
|
|
packages = {
|
|
inherit rustPlatform;
|
|
compile-deps = callPackage ./compile-deps.nix { };
|
|
rust-shell =
|
|
# llvm-tools-preview for code coverage with cargo-llvm-cov
|
|
(rustVersion.override { extensions = [ "rust-src" "rust-analyzer" "llvm-tools-preview"]; });
|
|
|
|
|
|
# contains all rust crates in workspace.members of Cargo.toml
|
|
roc-full = (callPackage ./builder.nix { }).roc-release;
|
|
roc-full-debug = (callPackage ./builder.nix { }).roc-debug;
|
|
|
|
roc-lang-server = (callPackage ./builder.nix { subPackage = "language_server"; }).roc-release;
|
|
roc-lang-server-debug = (callPackage ./builder.nix { subPackage = "language_server"; }).roc-debug;
|
|
|
|
# only the CLI crate = executable provided in nightly releases
|
|
roc-cli = (callPackage ./builder.nix { subPackage = "cli"; }).roc-release;
|
|
roc-cli-debug = (callPackage ./builder.nix { subPackage = "cli"; }).roc-debug;
|
|
};
|
|
|
|
in
|
|
packages
|