Installing AMC with Nix
Version 1 (Thibault P, 12/01/2021 10:57 pm)
1 | 1 | h1. Installing AMC with Nix |
|
---|---|---|---|
2 | 1 | ||
3 | 1 | Nix is part of the Nix packages collection, in unstable for now (as of |
|
4 | 1 | 2021-11-05) and will likely be part of the 21.11 release. |
|
5 | 1 | ||
6 | 1 | h2. Installation on NixOS |
|
7 | 1 | ||
8 | 1 | To install, either add @auto-multiple-choice@ to |
|
9 | 1 | @environment.systemPackages@ in your @configuration.nix@. If you want |
|
10 | 1 | to use TeX to write your questionnaires, you also need to add the |
|
11 | 1 | package to your texlive installation, like this: |
|
12 | 1 | ||
13 | 1 | <pre> |
|
14 | 1 | environment.systemPackages = with pkgs; [ |
|
15 | 1 | auto-multiple-choice |
|
16 | 1 | (texlive.combine { |
|
17 | 1 | inherit (pkgs.texlive) scheme-full; |
|
18 | 1 | xtra = |
|
19 | 1 | { |
|
20 | 1 | pkgs = [ auto-multiple-choice ]; |
|
21 | 1 | }; |
|
22 | 1 | }) |
|
23 | 1 | ]; |
|
24 | 1 | </pre> |
|
25 | 1 | ||
26 | 1 | h2. Installation with Nix on non-NixOS platforms |
|
27 | 1 | ||
28 | 1 | The usual methods should work. You can either get a shell with AMC |
|
29 | 1 | installed with @nix-shell -p auto-multiple-choice@, or install AMC in |
|
30 | 1 | the user environment with @nix-env -i auto-multiple-choice@. |
|
31 | 1 | ||
32 | 1 | In both these cases, though, the @.sty@ file won't be available to |
|
33 | 1 | your TeXLive installation. If you wish to use it, you can pass LaTeX |
|
34 | 1 | an explicit @TEXINPUTS@, like this: |
|
35 | 1 | ||
36 | 1 | <pre> |
|
37 | 1 | TEXINPUTS=:.:$(nix eval nixpkgs.auto-multiple-choice.outPath):$TEXINPUTS pdflatex questionnaire |
|
38 | 1 | </pre> |
|
39 | 1 | ||
40 | 1 | h2. Troubleshooting |
|
41 | 1 | ||
42 | 1 | AMC has been added _very_ recently to Nixpkgs. If you encounter |
|
43 | 1 | errors, make sure you're on unstable or at least 21.11 (not yet |
|
44 | 1 | released at the time of this writing), and update your channels before |
|
45 | 1 | installing. |