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