diff options
Diffstat (limited to 'nixpkgs/doc/languages-frameworks/lisp.section.md')
-rw-r--r-- | nixpkgs/doc/languages-frameworks/lisp.section.md | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/nixpkgs/doc/languages-frameworks/lisp.section.md b/nixpkgs/doc/languages-frameworks/lisp.section.md index 09193093b08f..73f20436c76f 100644 --- a/nixpkgs/doc/languages-frameworks/lisp.section.md +++ b/nixpkgs/doc/languages-frameworks/lisp.section.md @@ -45,7 +45,7 @@ $ sbcl Also one can create a `pkgs.mkShell` environment in `shell.nix`/`flake.nix`: -``` +```nix let sbcl' = sbcl.withPackages (ps: [ ps.alexandria ]); in mkShell { @@ -55,10 +55,12 @@ in mkShell { Such a Lisp can be now used e.g. to compile your sources: -``` -buildPhase = '' - ${sbcl'}/bin/sbcl --load my-build-file.lisp -'' +```nix +{ + buildPhase = '' + ${sbcl'}/bin/sbcl --load my-build-file.lisp + ''; +} ``` ## Importing packages from Quicklisp {#lisp-importing-packages-from-quicklisp} @@ -173,7 +175,7 @@ into the package scope with `withOverrides`. A package defined outside Nixpkgs using `buildASDFSystem` can be woven into the Nixpkgs-provided scope like this: -``` +```nix let alexandria = sbcl.buildASDFSystem rec { pname = "alexandria"; @@ -199,7 +201,7 @@ new package with different parameters. Example of overriding `alexandria`: -``` +```nix sbcl.pkgs.alexandria.overrideLispAttrs (oldAttrs: rec { version = "1.4"; src = fetchFromGitLab { @@ -225,7 +227,7 @@ vice versa. To package slashy systems, use `overrideLispAttrs`, like so: -``` +```nix ecl.pkgs.alexandria.overrideLispAttrs (oldAttrs: { systems = oldAttrs.systems ++ [ "alexandria/tests" ]; lispLibs = oldAttrs.lispLibs ++ [ ecl.pkgs.rt ]; @@ -290,7 +292,7 @@ derivation. This example wraps CLISP: -``` +```nix wrapLisp { pkg = clisp; faslExt = "fas"; |