-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the ability to build from source #41
Comments
@deemp Can you please confirm the correctness of the |
There's no top-level Then, it'll be possible to install
|
Maybe it's enough to install nix-env -iA nixpkgs.haskellPackages.rzk ? |
@fizruk, when you use this command, you rely on the version of
If a user has flakes enabled, an arbitrary revision of In a recent revision of the nix shell github:nixos/nixpkgs/f4a33546bdb5f81bd6cceb1b3cb19667145fed83#haskellPackages.rzk
...
error: Package ‘rzk-0.5.3’ in /nix/store/8cf9bhcqh1cw9zgz2q1yh6sxvvpyjal6-source/pkgs/development/haskell-modules/hackage-packages.nix:253017 is marked as broken, refusing to evaluate.
... However, it's possible to get export NIXPKGS_ALLOW_BROKEN=1
nix shell github:nixos/nixpkgs/f4a33546bdb5f81bd6cceb1b3cb19667145fed83#haskellPackages.rzk --impure Or, install it so that export NIXPKGS_ALLOW_BROKEN=1
nix profile install github:nixos/nixpkgs/f4a33546bdb5f81bd6cceb1b3cb19667145fed83#haskellPackages.rzk --impure Then, you'll have rzk typecheck --help
Usage: rzk typecheck [STRING]...
Available options:
-h,--help Show this help text |
@deemp thanks for the detailed explanation! Do you know why the package is marked as broken? |
No I don't. It's done by automatic tools (link). |
UPD on #41 (comment). I found out it's possible to get Make export NIXPKGS_ALLOW_BROKEN=1
nix-shell -p haskellPackages.rzk -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/f4a33546bdb5f81bd6cceb1b3cb19667145fed83.tar.gz Install system-wide: export NIXPKGS_ALLOW_BROKEN=1
nix-env -iA nixpkgs.haskellPackages.rzk -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/f4a33546bdb5f81bd6cceb1b3cb19667145fed83.tar.gz Moreover, when flakes are enabled, Without a specific revision: nix shell github:rzk-lang/rzk#rzk
rzk version
# or, to run
nix run github:rzk-lang/rzk#rzk -- version
# or, to install system-wide
nix profile install github:rzk-lang/rzk#rzk
rzk version The installable (link) can be simplified further by renaming the The package will be accessible via |
Thanks for such a detailed response! |
You can fetch the latest version of nix-shell --packages pan -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/master.zip The problem is that the Also, you can provide
No, flakes is an experimental feature, so many people don't use it. It can be temporary enabled (link). |
So the PR is marked as draft because I still didn't understand what's the best set of commands to run 😅 . We would like for it to install the latest available version and not pin to a specific commit so the extension is not tightly coupled with Rzk releases and not have to update it every time a new release is published.
If installation via Nix is not as simple as stack/cabal, would you recommend we just remove the option or are there a few commands to run that will achieve what we need? |
In my opinion, it's the best to let people install So, you can just write in the extension description that |
This is possible both with
If you want to provide the version from the repo, I suggest to set up caching in your CI to let people use pre-built
|
I think that makes sense; anyone who knows how to use Nix will most likely not need help installing |
Sure, I do not mind removing the Nix option from the extension. |
Currently, the extension prompts to download a pre-built binary from GitHub releases if
rzk
is not found on the system. It should also offer options to install using the different supported build systems: stack, cabal, and nix.The commands to install look like so (TBC):
stack install rzk
cabal v2-install rzk
nix-env -iA rzk
The text was updated successfully, but these errors were encountered: