tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
auto-multiple-choice: init at 1.5.1
Thibault Polge
4 years ago
5b3e4e54
d5a1964a
+165
2 changed files
expand all
collapse all
unified
split
pkgs
applications
misc
auto-multiple-choice
default.nix
top-level
all-packages.nix
+163
pkgs/applications/misc/auto-multiple-choice/default.nix
···
1
1
+
{ lib
2
2
+
, stdenv
3
3
+
, fetchurl
4
4
+
, perlPackages
5
5
+
, makeWrapper
6
6
+
, wrapGAppsHook
7
7
+
, cairo
8
8
+
, dblatex
9
9
+
, gnumake
10
10
+
, gobject-introspection
11
11
+
, graphicsmagick
12
12
+
, gsettings-desktop-schemas
13
13
+
, gtk3
14
14
+
, libnotify
15
15
+
, librsvg
16
16
+
, libxslt
17
17
+
, netpbm
18
18
+
, opencv
19
19
+
, pango
20
20
+
, perl
21
21
+
, pkg-config
22
22
+
, poppler
23
23
+
, auto-multiple-choice
24
24
+
}:
25
25
+
stdenv.mkDerivation rec {
26
26
+
pname = "auto-multiple-choice";
27
27
+
version = "1.5.1";
28
28
+
src = fetchurl {
29
29
+
url = "https://download.auto-multiple-choice.net/${pname}_${version}_precomp.tar.gz";
30
30
+
sha256 = "71831122f7b43245d3289617064e0b561817c0130ee1773c1b957841b28b854c";
31
31
+
};
32
32
+
tlType = "run";
33
33
+
34
34
+
# There's only the Makefile
35
35
+
dontConfigure = true;
36
36
+
37
37
+
makeFlags = [
38
38
+
"PERLPATH=${perl}/bin/perl"
39
39
+
# We *need* to pass DESTDIR, as the Makefile ignores PREFIX.
40
40
+
"DESTDIR=$(out)"
41
41
+
# Relative paths.
42
42
+
"BINDIR=/bin"
43
43
+
"PERLDIR=/share/perl5"
44
44
+
"MODSDIR=/lib/"
45
45
+
"TEXDIR=/tex/latex/" # what texlive.combine expects
46
46
+
"TEXDOCDIR=/share/doc/texmf/" # TODO where to put this?
47
47
+
"MAN1DIR=/share/man/man1"
48
48
+
"DESKTOPDIR=/share/applications"
49
49
+
"METAINFODIR=/share/metainfo"
50
50
+
"ICONSDIR=/share/auto-multiple-choice/icons"
51
51
+
"APPICONDIR=/share/icons/hicolor"
52
52
+
"LOCALEDIR=/share/locale"
53
53
+
"MODELSDIR=/share/auto-multiple-choice/models"
54
54
+
"DOCDIR=/share/doc/auto-multiple-choice"
55
55
+
"SHARED_MIMEINFO_DIR=/share/mime/packages"
56
56
+
"LANG_GTKSOURCEVIEW_DIR=/share/gtksourceview-4/language-specs"
57
57
+
# Pretend to be redhat so `install` doesn't try to chown/chgrp.
58
58
+
"SYSTEM_TYPE=rpm"
59
59
+
];
60
60
+
61
61
+
preFixup = ''
62
62
+
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
63
63
+
'';
64
64
+
65
65
+
postFixup = ''
66
66
+
wrapProgram $out/bin/auto-multiple-choice \
67
67
+
''${makeWrapperArgs[@]} \
68
68
+
--prefix PERL5LIB : "${with perlPackages; makePerlPath [
69
69
+
ArchiveZip
70
70
+
DBDSQLite
71
71
+
Cairo
72
72
+
CairoGObject
73
73
+
DBI
74
74
+
Glib
75
75
+
GlibObjectIntrospection
76
76
+
Gtk3
77
77
+
LocaleGettext
78
78
+
PerlMagick
79
79
+
TextCSV
80
80
+
XMLParser
81
81
+
XMLSimple
82
82
+
XMLWriter
83
83
+
]}:"$out/share/perl5 \
84
84
+
--prefix XDG_DATA_DIRS : "$out/share" \
85
85
+
--set TEXINPUTS ":.:$out/share/texmf/tex/latex/AMC"
86
86
+
'';
87
87
+
88
88
+
nativeBuildInputs = [
89
89
+
pkg-config
90
90
+
makeWrapper
91
91
+
wrapGAppsHook
92
92
+
];
93
93
+
94
94
+
buildInputs = [
95
95
+
cairo
96
96
+
cairo.dev
97
97
+
dblatex
98
98
+
gnumake
99
99
+
gobject-introspection
100
100
+
graphicsmagick
101
101
+
gsettings-desktop-schemas
102
102
+
gtk3
103
103
+
libnotify
104
104
+
librsvg
105
105
+
libxslt
106
106
+
netpbm
107
107
+
opencv
108
108
+
pango
109
109
+
poppler
110
110
+
] ++ (with perlPackages; [
111
111
+
perl
112
112
+
ArchiveZip
113
113
+
Cairo
114
114
+
CairoGObject
115
115
+
DBDSQLite
116
116
+
DBI
117
117
+
Glib
118
118
+
GlibObjectIntrospection
119
119
+
Gtk3
120
120
+
LocaleGettext
121
121
+
PerlMagick
122
122
+
TextCSV
123
123
+
XMLParser
124
124
+
XMLSimple
125
125
+
XMLWriter
126
126
+
]);
127
127
+
128
128
+
meta = with lib; {
129
129
+
description = "Create and manage multiple choice questionnaires with automated marking.";
130
130
+
longDescription = ''
131
131
+
Create, manage and mark multiple-choice questionnaires.
132
132
+
auto-multiple-choice features automated or manual formatting with
133
133
+
LaTeX, shuffling of questions and answers and automated marking using
134
134
+
Optical Mark Recognition.
135
135
+
136
136
+
Questionnaires can be created using either a very simple text syntax,
137
137
+
AMC-TXT, or LaTeX. In the latter case, your TeXLive installation must
138
138
+
be combined with this package. This can be done in configuration.nix
139
139
+
as follows:
140
140
+
141
141
+
<screen>
142
142
+
…
143
143
+
environment.systemPackages = with pkgs; [
144
144
+
auto-multiple-choice
145
145
+
(texlive.combine {
146
146
+
inherit (pkgs.texlive) scheme-full;
147
147
+
extra =
148
148
+
{
149
149
+
pkgs = [ auto-multiple-choice ];
150
150
+
};
151
151
+
})
152
152
+
];
153
153
+
</screen>
154
154
+
155
155
+
For usage instructions, see documentation at the project's homepage.
156
156
+
'';
157
157
+
homepage = "https://www.auto-multiple-choice.net/";
158
158
+
changelog = "https://gitlab.com/jojo_boulix/auto-multiple-choice/-/blob/master/ChangeLog";
159
159
+
license = licenses.gpl2Plus;
160
160
+
maintainers = [ maintainers.thblt ];
161
161
+
platforms = platforms.all;
162
162
+
};
163
163
+
}
+2
pkgs/top-level/all-packages.nix
···
23692
23692
23693
23693
audio-recorder = callPackage ../applications/audio/audio-recorder { };
23694
23694
23695
23695
+
auto-multiple-choice = callPackage ../applications/misc/auto-multiple-choice { };
23696
23696
+
23695
23697
autokey = callPackage ../applications/office/autokey { };
23696
23698
23697
23699
autotalent = callPackage ../applications/audio/autotalent { };