mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-11 18:58:24 +03:00
support nix run and add basic doc
This commit is contained in:
parent
ce7fb7ec50
commit
e853d3b5ac
@ -148,5 +148,12 @@
|
||||
cli = rocBuild.roc-cli;
|
||||
lang-server = rocBuild.roc-lang-server;
|
||||
};
|
||||
|
||||
apps = {
|
||||
default = {
|
||||
type = "app";
|
||||
program = "${rocBuild.roc-cli}/bin/roc";
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
|
@ -1,7 +1,11 @@
|
||||
# Roc installation guide for Nix
|
||||
|
||||
|
||||
## NixOS quick start
|
||||
If you want to quickly get started you can do
|
||||
```shell
|
||||
nix run roc-lang/roc -- <roc args>
|
||||
# example nix run roc-lang/roc -- repl
|
||||
```
|
||||
to try out roc!
|
||||
|
||||
<details>
|
||||
<summary>
|
||||
|
@ -3,6 +3,8 @@ let
|
||||
inherit (compile-deps) zigPkg llvmPkgs llvmVersion llvmMajorMinorStr glibcPath libGccSPath;
|
||||
|
||||
subPackagePath = if subPackage != null then "crates/${subPackage}" else null;
|
||||
|
||||
mainBin = if subPackage == "lang_srv" then "roc_ls" else "roc";
|
||||
in
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "roc" + lib.optionalString (subPackage != null) "_${subPackage}";
|
||||
@ -84,4 +86,11 @@ rustPlatform.buildRustPackage {
|
||||
${wrapRoc}
|
||||
fi
|
||||
'';
|
||||
|
||||
# https://ryantm.github.io/nixpkgs/stdenv/meta/
|
||||
meta = {
|
||||
homepage = "https://www.roc-lang.org/";
|
||||
license = lib.licenses.upl;
|
||||
mainProgram = mainBin;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user