mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-11 10:55:31 +03:00
use callPackageWith to cleanup some logic
This commit is contained in:
parent
81cd92f3fe
commit
3179773d90
@ -155,6 +155,12 @@
|
||||
formatter = pkgs.nixpkgs-fmt;
|
||||
|
||||
# You can build this package (the roc CLI) with the `nix build` command.
|
||||
packages.default = rocBuild.roc-cli;
|
||||
packages = {
|
||||
default = rocBuild.roc-cli;
|
||||
|
||||
cli = rocBuild.roc-cli;
|
||||
|
||||
lang-server = rocBuild.roc-lang-server;
|
||||
};
|
||||
});
|
||||
}
|
||||
|
@ -5,12 +5,20 @@ let
|
||||
cargo = rustVersion;
|
||||
rustc = rustVersion;
|
||||
};
|
||||
compile-deps = pkgs.callPackage ./compile-deps.nix { };
|
||||
in
|
||||
{
|
||||
inherit rustPlatform compile-deps;
|
||||
|
||||
# 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 =
|
||||
(rustVersion.override { extensions = [ "rust-src" "rust-analyzer" ]; });
|
||||
roc-cli = pkgs.callPackage ./roc-cli.nix { inherit compile-deps rustPlatform; };
|
||||
roc-lang-server = {};
|
||||
}
|
||||
|
||||
roc-cli = callPackage ./builder.nix { }; # TODO: this builds the language server as `roc_ls`
|
||||
roc-lang-server = callPackage ./builder.nix { subPackage = "lang_srv"; };
|
||||
};
|
||||
|
||||
in
|
||||
packages
|
||||
|
Loading…
Reference in New Issue
Block a user