diff options
author | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2021-03-14 00:30:36 +0100 |
---|---|---|
committer | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2021-04-05 05:23:19 +0200 |
commit | 2c143a461438a4e3c9509222274be819df8d86ef (patch) | |
tree | 13e1dfaf764ac375d74cc5ed19d713b7695fa18f /doc/languages-frameworks/agda.section.md | |
parent | 14edfb4cd7cc6a5a332318e37f1bf6a844b3e9c6 (diff) | |
download | nixlib-2c143a461438a4e3c9509222274be819df8d86ef.tar nixlib-2c143a461438a4e3c9509222274be819df8d86ef.tar.gz nixlib-2c143a461438a4e3c9509222274be819df8d86ef.tar.bz2 nixlib-2c143a461438a4e3c9509222274be819df8d86ef.tar.lz nixlib-2c143a461438a4e3c9509222274be819df8d86ef.tar.xz nixlib-2c143a461438a4e3c9509222274be819df8d86ef.tar.zst nixlib-2c143a461438a4e3c9509222274be819df8d86ef.zip |
doc/languages-frameworks/*: add missing languages to code fences
convert shell -> ShellSession
Diffstat (limited to 'doc/languages-frameworks/agda.section.md')
-rw-r--r-- | doc/languages-frameworks/agda.section.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/languages-frameworks/agda.section.md b/doc/languages-frameworks/agda.section.md index f57b194a7266..30a266502bf3 100644 --- a/doc/languages-frameworks/agda.section.md +++ b/doc/languages-frameworks/agda.section.md @@ -3,7 +3,7 @@ ## How to use Agda Agda can be installed from `agda`: -``` +```ShellSession $ nix-env -iA agda ``` @@ -15,13 +15,13 @@ To use Agda with libraries, the `agda.withPackages` function can be used. This f For example, suppose we wanted a version of Agda which has access to the standard library. This can be obtained with the expressions: -``` +```nix agda.withPackages [ agdaPackages.standard-library ] ``` or -``` +```nix agda.withPackages (p: [ p.standard-library ]) ``` @@ -32,7 +32,7 @@ If you want to use a library in your home directory (for instance if it is a dev Agda will not by default use these libraries. To tell Agda to use the library we have some options: * Call `agda` with the library flag: -``` +```ShellSession $ agda -l standard-library -i . MyFile.agda ``` * Write a `my-library.agda-lib` file for the project you are working on which may look like: @@ -49,7 +49,7 @@ More information can be found in the [official Agda documentation on library man Agda modules can be compiled with the `--compile` flag. A version of `ghc` with `ieee754` is made available to the Agda program via the `--with-compiler` flag. This can be overridden by a different version of `ghc` as follows: -``` +```nix agda.withPackages { pkgs = [ ... ]; ghc = haskell.compiler.ghcHEAD; @@ -80,12 +80,12 @@ By default, Agda sources are files ending on `.agda`, or literate Agda files end ## Adding Agda packages to Nixpkgs To add an Agda package to `nixpkgs`, the derivation should be written to `pkgs/development/libraries/agda/${library-name}/` and an entry should be added to `pkgs/top-level/agda-packages.nix`. Here it is called in a scope with access to all other Agda libraries, so the top line of the `default.nix` can look like: -``` +```nix { mkDerivation, standard-library, fetchFromGitHub }: ``` and `mkDerivation` should be called instead of `agdaPackages.mkDerivation`. Here is an example skeleton derivation for iowa-stdlib: -``` +```nix mkDerivation { version = "1.5.0"; pname = "iowa-stdlib"; |