10 , gobject-introspection
12 , gsettings-desktop-schemas
25 stdenv.mkDerivation (finalAttrs: rec {
26 pname = "auto-multiple-choice";
29 url = "https://download.auto-multiple-choice.net/${pname}_${version}_dist.tar.gz";
30 # before 1.6.0, the URL pattern used "precomp" instead of "dist". ^^^^
31 sha256 = "sha256-I9Xw1BN8ZSQhi5F1R3axHBKE6tnaCNk8k5tts6LoMjY=";
34 # There's only the Makefile
38 "PERLPATH=${perl}/bin/perl"
39 # We *need* to set DESTDIR as empty and use absolute paths below,
40 # because the Makefile ignores PREFIX and MODSDIR is required to
41 # be an absolute path to not trigger "portable distribution" check
42 # in auto-multiple-choice.in.
44 # Set variables from Makefile.conf to absolute paths
45 "BINDIR=${placeholder "out"}/bin"
46 "PERLDIR=${placeholder "out"}/share/perl5"
47 "MODSDIR=${placeholder "out"}/lib"
48 "TEXDIR=${placeholder "out"}/tex/latex/" # what texlive.combine expects
49 "TEXDOCDIR=${placeholder "out"}/share/doc/texmf/" # TODO where to put this?
50 "MAN1DIR=${placeholder "out"}/share/man/man1"
51 "DESKTOPDIR=${placeholder "out"}/share/applications"
52 "METAINFODIR=${placeholder "out"}/share/metainfo"
53 "ICONSDIR=${placeholder "out"}/share/auto-multiple-choice/icons"
54 "CSSDIR=${placeholder "out"}/share/auto-multiple-choice/gtk"
55 "APPICONDIR=${placeholder "out"}/share/icons/hicolor"
56 "LOCALEDIR=${placeholder "out"}/share/locale"
57 "MODELSDIR=${placeholder "out"}/share/auto-multiple-choice/models"
58 "DOCDIR=${placeholder "out"}/share/doc/auto-multiple-choice"
59 "SHARED_MIMEINFO_DIR=${placeholder "out"}/share/mime/packages"
60 "LANG_GTKSOURCEVIEW_DIR=${placeholder "out"}/share/gtksourceview-4/language-specs"
61 # Pretend to be redhat so `install` doesn't try to chown/chgrp.
63 "GCC=${stdenv.cc.targetPrefix}cc"
64 "GCC_PP=${stdenv.cc.targetPrefix}c++"
68 makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
72 wrapProgram $out/bin/auto-multiple-choice \
73 ''${makeWrapperArgs[@]} \
74 --prefix PERL5LIB : "${with perlPackages; makeFullPerlPath [
81 GlibObjectIntrospection
90 ]}:"$out/share/perl5 \
91 --prefix XDG_DATA_DIRS : "$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
92 --prefix PATH : "$out/bin" \
93 --set TEXINPUTS ":.:$out/tex/latex"
100 gobject-introspection
109 gsettings-desktop-schemas
119 ] ++ (with perlPackages; [
127 GlibObjectIntrospection
139 pkgs = [ finalAttrs.finalPackage ];
143 description = "Create and manage multiple choice questionnaires with automated marking";
144 mainProgram = "auto-multiple-choice";
146 Create, manage and mark multiple-choice questionnaires.
147 auto-multiple-choice features automated or manual formatting with
148 LaTeX, shuffling of questions and answers and automated marking using
149 Optical Mark Recognition.
151 Questionnaires can be created using either a very simple text syntax,
152 AMC-TXT, or LaTeX. In the latter case, your TeXLive installation must
153 be combined with this package. This can be done in configuration.nix
158 environment.systemPackages = with pkgs; [
161 inherit (pkgs.texlive) scheme-full;
162 inherit auto-multiple-choice;
167 For usage instructions, see documentation at the project's homepage.
169 homepage = "https://www.auto-multiple-choice.net/";
170 changelog = "https://gitlab.com/jojo_boulix/auto-multiple-choice/-/blob/master/ChangeLog";
171 license = licenses.gpl2Plus;
172 maintainers = [ maintainers.thblt ];
173 platforms = platforms.all;