belenios
Lyes Saadi 2026-03-24 00:17:24 +01:00
parent cbd3318de3
commit 23d5bc4352
No known key found for this signature in database
GPG Key ID: 55A1D803917CF39A
13 changed files with 278 additions and 25 deletions

BIN
belenios.tar.gz 100644

Binary file not shown.

View File

@ -0,0 +1,52 @@
diff --git a/src/lib/core/dune b/src/lib/core/dune
index b3fa93bc..978bcfd5 100644
--- a/src/lib/core/dune
+++ b/src/lib/core/dune
@@ -1,7 +1,7 @@
(library
(name belenios_core)
(public_name belenios-lib.core)
- (libraries base64 hex yojson atdgen re belenios-platform)
+ (libraries base64 hex yojson atdgen-runtime re belenios-platform)
(modules_without_implementation question_sigs trustees_sig versioned_sig))
(rule
diff --git a/src/lib/question/dune b/src/lib/question/dune
index aecbfad1..f78738ef 100644
--- a/src/lib/question/dune
+++ b/src/lib/question/dune
@@ -2,7 +2,7 @@
(name belenios_question)
(public_name belenios-lib.question)
(modules_without_implementation types)
- (libraries yojson atdgen belenios-platform belenios-lib.core))
+ (libraries yojson atdgen-runtime belenios-platform belenios-lib.core))
(rule
(targets question_h_t.ml question_h_t.mli)
diff --git a/src/lib/shell/dune b/src/lib/shell/dune
index 63828081..de8f3870 100644
--- a/src/lib/shell/dune
+++ b/src/lib/shell/dune
@@ -3,7 +3,7 @@
(public_name belenios-lib)
(libraries
yojson
- atdgen
+ atdgen-runtime
belenios-platform
belenios-lib.core
belenios-lib.v1))
diff --git a/src/lib/v1/dune b/src/lib/v1/dune
index 4c0eb68d..890262c0 100644
--- a/src/lib/v1/dune
+++ b/src/lib/v1/dune
@@ -4,7 +4,7 @@
(modules_without_implementation types)
(libraries
yojson
- atdgen
+ atdgen-runtime
belenios-platform
belenios-lib.core
belenios-lib.question))

View File

@ -7,14 +7,14 @@
ocamlPackages.buildDunePackage rec { ocamlPackages.buildDunePackage rec {
pname = "belenios"; pname = "belenios";
version = "3.0"; version = "3.1";
src = fetchFromGitLab { src = fetchFromGitLab {
domain = "gitlab.inria.fr"; domain = "gitlab.inria.fr";
owner = pname; owner = pname;
repo = pname; repo = pname;
rev = version; rev = version;
hash = "sha256-paTkzWB2QiBfFnGfiMkTIHdKeg37PTGbMu25JLJc38U="; hash = "sha256-Mrx6AQakeBg6IeqNyDUZ5j6KaUGOh1AUfrLIxvDI45M=";
}; };
nativeBuildInputs = with ocamlPackages; [ nativeBuildInputs = with ocamlPackages; [

View File

@ -0,0 +1,59 @@
{
"nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1772408722,
"narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3",
"type": "github"
},
"original": {
"id": "flake-parts",
"type": "indirect"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1774244481,
"narHash": "sha256-4XfMXU0DjN83o6HWZoKG9PegCvKvIhNUnRUI19vzTcQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4590696c8693fea477850fe379a01544293ca4e2",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-25.11",
"type": "indirect"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1772328832,
"narHash": "sha256-e+/T/pmEkLP6BHhYjx6GmwP5ivonQQn0bJdH9YrRB+Q=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "c185c7a5e5dd8f9add5b2f8ebeff00888b070742",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View File

@ -12,14 +12,19 @@ ocamlPackages.buildDunePackage {
atdgen atdgen
]; ];
buildInputs = with ocamlPackages; [
hex
digestif
biniou
];
propagatedBuildInputs = propagatedBuildInputs =
[ [
belenios-platform belenios-platform
] ]
++ (with ocamlPackages; [ ++ (with ocamlPackages; [
atdgen atdgen-runtime
base64 base64
hex
ocaml_gettext ocaml_gettext
re re
uri uri

View File

@ -0,0 +1,13 @@
diff --git a/src/web/server/common/dune b/src/web/server/common/dune
index 3324b582..50cf6c46 100644
--- a/src/web/server/common/dune
+++ b/src/web/server/common/dune
@@ -15,7 +15,7 @@
gettext.base
gettext.extension
gettext-camomile
- netstring)
+ sendmail)
(modules_without_implementation
web_i18n_sig
web_services_sig

View File

@ -12,12 +12,12 @@ ocamlPackages.buildDunePackage {
odoc odoc
]; ];
propagatedBuildInputs = buildInputs = with ocamlPackages; [
[ belenios-platform
belenios-platform lwt
] js_of_ocaml
++ (with ocamlPackages; [ js_of_ocaml-ppx
js_of_ocaml digestif
js_of_ocaml-ppx hex
]); ];
} }

View File

@ -13,12 +13,15 @@ ocamlPackages.buildDunePackage {
odoc odoc
]; ];
propagatedBuildInputs = buildInputs =
[ [
belenios-platform belenios-platform
libsodium libsodium
] ]
++ (with ocamlPackages; [ ++ (with ocamlPackages; [
lwt
cryptokit cryptokit
digestif
zarith
]); ]);
} }

View File

@ -7,7 +7,11 @@ ocamlPackages.buildDunePackage {
pname = "belenios-platform"; pname = "belenios-platform";
inherit (belenios) version src; inherit (belenios) version src;
nativeBuildInputs = with ocamlPackages; [ # nativeBuildInputs = with ocamlPackages; [
odoc # odoc
# ];
propagatedBuildInputs = with ocamlPackages; [
lwt
]; ];
} }

View File

@ -10,6 +10,8 @@ ocamlPackages.buildDunePackage {
pname = "belenios-server"; pname = "belenios-server";
inherit (belenios) version src; inherit (belenios) version src;
# dontDetectOcamlConflicts = true;
nativeBuildInputs = with ocamlPackages; [ nativeBuildInputs = with ocamlPackages; [
atdgen atdgen
js_of_ocaml-compiler js_of_ocaml-compiler
@ -17,20 +19,41 @@ ocamlPackages.buildDunePackage {
ocaml_gettext ocaml_gettext
]; ];
patches = [ ./netstring.patch ];
buildInputs =
[
# belenios-lib
# belenios-platform-native
belenios-platform-js
]
++ (with ocamlPackages; [
# calendar
# csv
eliom
gettext-camomile
# lwt
# ocamlnet
ocsipersist
ocsipersist-lib
ocsipersist-sqlite-config
ocsigen_server
ocaml_gettext
xml-light
tyxml
markup
sendmail
]);
propagatedBuildInputs = propagatedBuildInputs =
[ [
belenios-lib belenios-lib
belenios-platform-native belenios-platform-native
belenios-platform-js
] ]
++ (with ocamlPackages; [ ++ (with ocamlPackages; [
calendar calendar
csv
eliom
gettext-camomile
lwt lwt
ocamlnet xml-light
ocsipersist-sqlite-config
]); ]);
} }

View File

@ -1,8 +1,9 @@
{ {
belenios, belenios,
belenios-lib, belenios-lib,
belenios-platform, # belenios-platform,
belenios-platform-native, belenios-platform-native,
libsodium,
ocamlPackages ocamlPackages
}: }:
@ -10,14 +11,21 @@ ocamlPackages.buildDunePackage {
pname = "belenios-tool"; pname = "belenios-tool";
inherit (belenios) version src; inherit (belenios) version src;
propagatedBuildInputs = buildInputs =
[ [
belenios-lib belenios-lib
belenios-platform # belenios-platform
belenios-platform-native belenios-platform-native
libsodium
] ]
++ (with ocamlPackages; [ ++ (with ocamlPackages; [
cmdliner cmdliner
cohttp-lwt-unix cryptokit
hex
]); ]);
propagatedBuildInputs = with ocamlPackages; [
lwt
cohttp-lwt-unix
];
} }

59
pkgs/flake.lock 100644
View File

@ -0,0 +1,59 @@
{
"nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1772408722,
"narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3",
"type": "github"
},
"original": {
"id": "flake-parts",
"type": "indirect"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1774244481,
"narHash": "sha256-4XfMXU0DjN83o6HWZoKG9PegCvKvIhNUnRUI19vzTcQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4590696c8693fea477850fe379a01544293ca4e2",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-25.11",
"type": "indirect"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1772328832,
"narHash": "sha256-e+/T/pmEkLP6BHhYjx6GmwP5ivonQQn0bJdH9YrRB+Q=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "c185c7a5e5dd8f9add5b2f8ebeff00888b070742",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

27
pkgs/flake.nix 100644
View File

@ -0,0 +1,27 @@
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-25.11";
};
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" ];
perSystem = { pkgs, ... }: rec {
devShells.default = pkgs.mkShell {
packages = [];
};
packages = let
ocamlPackages = pkgs.ocaml-ng.ocamlPackages_5_2;
in rec {
belenios = pkgs.callPackage ./belenios { inherit ocamlPackages belenios-server belenios-tool; };
belenios-lib = pkgs.callPackage ./belenios/lib.nix { inherit belenios ocamlPackages belenios-platform; };
belenios-tool = pkgs.callPackage ./belenios/tool.nix { inherit belenios ocamlPackages belenios-lib belenios-platform-native; };
belenios-server = pkgs.callPackage ./belenios/server.nix { inherit belenios ocamlPackages belenios-lib belenios-platform-native belenios-platform-js; };
belenios-platform = pkgs.callPackage ./belenios/platform.nix { inherit belenios ocamlPackages; };
belenios-platform-native = pkgs.callPackage ./belenios/platform-native.nix { inherit belenios ocamlPackages belenios-platform; };
belenios-platform-js = pkgs.callPackage ./belenios/platform-js.nix { inherit belenios ocamlPackages belenios-platform; };
};
};
};
}