diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-06-22 15:01:47 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-06-22 16:57:59 +0000 |
commit | 633cab0ecb07627706c6b523e219490f019eaab5 (patch) | |
tree | 4fb472bdfe2723037dad53dc1b8a87c939015f5e /nixpkgs/doc/languages-frameworks/idris.section.md | |
parent | ffb691c199e7e0cbc4e45e5310779c9e3f7c2a73 (diff) | |
parent | 432fc2d9a67f92e05438dff5fdc2b39d33f77997 (diff) | |
download | nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.gz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.bz2 nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.lz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.xz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.zst nixlib-633cab0ecb07627706c6b523e219490f019eaab5.zip |
Merge commit '432fc2d9a67f92e05438dff5fdc2b39d33f77997'
# Conflicts: # nixpkgs/pkgs/applications/editors/emacs/elisp-packages/elpa-generated.nix # nixpkgs/pkgs/applications/networking/mailreaders/thunderbird/default.nix # nixpkgs/pkgs/applications/window-managers/sway/default.nix # nixpkgs/pkgs/build-support/rust/default.nix # nixpkgs/pkgs/development/go-modules/generic/default.nix
Diffstat (limited to 'nixpkgs/doc/languages-frameworks/idris.section.md')
-rw-r--r-- | nixpkgs/doc/languages-frameworks/idris.section.md | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/nixpkgs/doc/languages-frameworks/idris.section.md b/nixpkgs/doc/languages-frameworks/idris.section.md index 000e3627d70d..ffdd706eb0b7 100644 --- a/nixpkgs/doc/languages-frameworks/idris.section.md +++ b/nixpkgs/doc/languages-frameworks/idris.section.md @@ -1,10 +1,10 @@ # Idris {#idris} -## Installing Idris +## Installing Idris {#installing-idris} The easiest way to get a working idris version is to install the `idris` attribute: -```ShellSesssion +```ShellSession $ # On NixOS $ nix-env -i nixos.idris $ # On non-NixOS @@ -21,7 +21,7 @@ self: super: { And then: -```ShellSesssion +```ShellSession $ # On NixOS $ nix-env -iA nixos.myIdris $ # On non-NixOS @@ -29,7 +29,8 @@ $ nix-env -iA nixpkgs.myIdris ``` To see all available Idris packages: -```ShellSesssion + +```ShellSession $ # On NixOS $ nix-env -qaPA nixos.idrisPackages $ # On non-NixOS @@ -37,22 +38,23 @@ $ nix-env -qaPA nixpkgs.idrisPackages ``` Similarly, entering a `nix-shell`: -```ShellSesssion + +```ShellSession $ nix-shell -p 'idrisPackages.with-packages (with idrisPackages; [ contrib pruviloj ])' ``` -## Starting Idris with library support +## Starting Idris with library support {#starting-idris-with-library-support} To have access to these libraries in idris, call it with an argument `-p <library name>` for each library: -```ShellSesssion +```ShellSession $ nix-shell -p 'idrisPackages.with-packages (with idrisPackages; [ contrib pruviloj ])' [nix-shell:~]$ idris -p contrib -p pruviloj ``` A listing of all available packages the Idris binary has access to is available via `--listlibs`: -```ShellSesssion +```ShellSession $ idris --listlibs 00prelude-idx.ibc pruviloj @@ -64,7 +66,7 @@ prelude 00contrib-idx.ibc ``` -## Building an Idris project with Nix +## Building an Idris project with Nix {#building-an-idris-project-with-nix} As an example of how a Nix expression for an Idris package can be created, here is the one for `idrisPackages.yaml`: @@ -105,7 +107,7 @@ build-idris-package { Assuming this file is saved as `yaml.nix`, it's buildable using -```ShellSesssion +```ShellSession $ nix-build -E '(import <nixpkgs> {}).idrisPackages.callPackage ./yaml.nix {}' ``` @@ -121,11 +123,11 @@ with import <nixpkgs> {}; in another file (say `default.nix`) to be able to build it with -```ShellSesssion +```ShellSession $ nix-build -A yaml ``` -## Passing options to `idris` commands +## Passing options to `idris` commands {#passing-options-to-idris-commands} The `build-idris-package` function provides also optional input values to set additional options for the used `idris` commands. |