10 , gobject-introspection
12 , gsettings-desktop-schemas
24 , auto-multiple-choice
26 stdenv.mkDerivation (finalAttrs: rec {
27 pname = "auto-multiple-choice";
30 url = "https://download.auto-multiple-choice.net/${pname}_${version}_dist.tar.gz";
31 # before 1.6.0, the URL pattern used "precomp" instead of "dist". ^^^^
32 sha256 = "sha256-I9Xw1BN8ZSQhi5F1R3axHBKE6tnaCNk8k5tts6LoMjY=";
35 # There's only the Makefile
39 "PERLPATH=${perl}/bin/perl"
40 # We *need* to pass DESTDIR, as the Makefile ignores PREFIX.
44 "PERLDIR=/share/perl5"
45 "MODSDIR=/lib" # At runtime, AMC will test for that dir before
46 # defaulting to the "portable" strategy we use, so this test
47 # *must* fail. *But* this variable cannot be set to anything but
48 # "/lib" , because that name is hardcoded in the main executable
49 # and this variable controls both both the path AMC will check at
50 # runtime, AND the path where the actual modules will be stored at
51 # build-time. This has been reported upstream as
52 # https://project.auto-multiple-choice.net/issues/872
53 "TEXDIR=/tex/latex/" # what texlive.combine expects
54 "TEXDOCDIR=/share/doc/texmf/" # TODO where to put this?
55 "MAN1DIR=/share/man/man1"
56 "DESKTOPDIR=/share/applications"
57 "METAINFODIR=/share/metainfo"
58 "ICONSDIR=/share/auto-multiple-choice/icons"
59 "APPICONDIR=/share/icons/hicolor"
60 "LOCALEDIR=/share/locale"
61 "MODELSDIR=/share/auto-multiple-choice/models"
62 "DOCDIR=/share/doc/auto-multiple-choice"
63 "SHARED_MIMEINFO_DIR=/share/mime/packages"
64 "LANG_GTKSOURCEVIEW_DIR=/share/gtksourceview-4/language-specs"
65 # Pretend to be redhat so `install` doesn't try to chown/chgrp.
67 "GCC=${stdenv.cc.targetPrefix}cc"
68 "GCC_PP=${stdenv.cc.targetPrefix}c++"
72 makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
76 wrapProgram $out/bin/auto-multiple-choice \
77 ''${makeWrapperArgs[@]} \
78 --prefix PERL5LIB : "${with perlPackages; makeFullPerlPath [
85 GlibObjectIntrospection
94 ]}:"$out/share/perl5 \
95 --prefix XDG_DATA_DIRS : "$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
96 --set TEXINPUTS ":.:$out/tex/latex"
103 gobject-introspection
112 gsettings-desktop-schemas
122 ] ++ (with perlPackages; [
130 GlibObjectIntrospection
142 pkgs = [ finalAttrs.finalPackage ];
146 description = "Create and manage multiple choice questionnaires with automated marking.";
147 mainProgram = "auto-multiple-choice";
149 Create, manage and mark multiple-choice questionnaires.
150 auto-multiple-choice features automated or manual formatting with
151 LaTeX, shuffling of questions and answers and automated marking using
152 Optical Mark Recognition.
154 Questionnaires can be created using either a very simple text syntax,
155 AMC-TXT, or LaTeX. In the latter case, your TeXLive installation must
156 be combined with this package. This can be done in configuration.nix
161 environment.systemPackages = with pkgs; [
164 inherit (pkgs.texlive) scheme-full;
165 inherit auto-multiple-choice;
170 For usage instructions, see documentation at the project's homepage.
172 homepage = "https://www.auto-multiple-choice.net/";
173 changelog = "https://gitlab.com/jojo_boulix/auto-multiple-choice/-/blob/master/ChangeLog";
174 license = licenses.gpl2Plus;
175 maintainers = [ maintainers.thblt ];
176 platforms = platforms.all;