Installing AMC with Nix

AMC is part of the Nix packages collection, and of NixOS since the 21.11 release.

Installation on NixOS

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:

environment.systemPackages = with pkgs; [
auto-multiple-choice
(texlive.combine {
  inherit (pkgs.texlive) scheme-full;
  xtra =
    {
      pkgs = [ auto-multiple-choice ];
    };
})
];

Installation with Nix on non-NixOS platforms

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.

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:

TEXINPUTS=:.:$(nix eval --raw nixpkgs.auto-multiple-choice.outPath)/tex/latex:$TEXINPUTS pdflatex questionnaire

Troubleshooting

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.