feat(ocaml/belenios): init
This commit is contained in:
parent
fe7db521d4
commit
2df4e90159
3 changed files with 1988 additions and 0 deletions
98
ocaml-pkgs/belenios/default.nix
Normal file
98
ocaml-pkgs/belenios/default.nix
Normal file
|
@ -0,0 +1,98 @@
|
|||
{
|
||||
lib,
|
||||
fetchFromGitLab,
|
||||
stdenv,
|
||||
js_of_ocaml,
|
||||
ocamlnet,
|
||||
eliom,
|
||||
calendar,
|
||||
ocsipersist-sqlite-config,
|
||||
cmdliner,
|
||||
markup,
|
||||
ocaml_gettext,
|
||||
gettext-camomile,
|
||||
hex,
|
||||
ocsipersist,
|
||||
csv,
|
||||
atdgen,
|
||||
libsodium,
|
||||
ocaml,
|
||||
findlib,
|
||||
dune_3,
|
||||
menhir,
|
||||
nodejs,
|
||||
importNpmLock,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "belenios";
|
||||
version = "3.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.inria.fr";
|
||||
owner = "belenios";
|
||||
repo = "belenios";
|
||||
rev = version;
|
||||
hash = "sha256-paTkzWB2QiBfFnGfiMkTIHdKeg37PTGbMu25JLJc38U=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
js_of_ocaml
|
||||
ocamlnet
|
||||
eliom
|
||||
calendar
|
||||
ocsipersist-sqlite-config
|
||||
cmdliner
|
||||
markup
|
||||
ocaml_gettext
|
||||
gettext-camomile
|
||||
hex
|
||||
ocsipersist
|
||||
csv
|
||||
atdgen
|
||||
libsodium
|
||||
ocaml
|
||||
findlib
|
||||
dune_3
|
||||
menhir
|
||||
nodejs
|
||||
importNpmLock.hooks.linkNodeModulesHook
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
];
|
||||
|
||||
npmDeps = importNpmLock.buildNodeModules {
|
||||
npmRoot = "${src}/frontend";
|
||||
packageLock = lib.importJSON ./package-lock.json;
|
||||
inherit nodejs;
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace frontend/Makefile \
|
||||
--replace-fail 'nodejs' '${lib.getExe' nodejs "node"}' \
|
||||
--replace-fail 'npm install' 'cp ${./package-lock.json} . && ln -s ../node_modules node_modules'
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
dune build --release
|
||||
dune exec -- \
|
||||
src/scripts/checki18next/checki18next.exe --dir frontend/translations \
|
||||
< src/scripts/checki18next/reference.json
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
dune install --destdir=$out --prefix=/
|
||||
contrib/make-tarball.sh $out/share/belenios-server/belenios.tar.gz
|
||||
make DESTDIR=$out/share/belenios-server/ -C frontend
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Verifiable online voting system\r\nhttp://www.belenios.org";
|
||||
homepage = "https://gitlab.inria.fr/belenios/belenios";
|
||||
changelog = "https://gitlab.inria.fr/belenios/belenios/-/blob/${src.rev}/CHANGES.md";
|
||||
license = lib.licenses.agpl3Only;
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
mainProgram = "belenios";
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
1889
ocaml-pkgs/belenios/package-lock.json
generated
Normal file
1889
ocaml-pkgs/belenios/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -24,4 +24,5 @@ mkGeneralOverlay ./pkgs final prev
|
|||
|
||||
# tools from language specific pkgs sets
|
||||
inherit (final.ocamlPackages) catala;
|
||||
inherit (final.ocaml-ng.ocamlPackages_4_14) belenios;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue