diff --git a/pkgs/by-name/se/seppo/mcdb.nix b/pkgs/by-name/se/seppo/mcdb.nix new file mode 100644 index 000000000000..afe8436c7e4f --- /dev/null +++ b/pkgs/by-name/se/seppo/mcdb.nix @@ -0,0 +1,26 @@ +{ + buildDunePackage, + camlp-streams, + optint, + alcotest, + uri, + base64, + seppo, +}: + +buildDunePackage { + pname = "mcdb"; + + inherit (seppo) version src; + + propagatedBuildInputs = [ + camlp-streams + optint + ]; + + checkInputs = [ + alcotest + uri + base64 + ]; +} diff --git a/pkgs/by-name/se/seppo/package.nix b/pkgs/by-name/se/seppo/package.nix new file mode 100644 index 000000000000..3121d2274cc9 --- /dev/null +++ b/pkgs/by-name/se/seppo/package.nix @@ -0,0 +1,69 @@ +{ + ocamlPackages, + fetchFromGitea, + ocaml-crunch, + seppo, + lib, +}: + +let + mcdb = ocamlPackages.callPackage ./mcdb.nix { inherit seppo; }; +in + +ocamlPackages.buildDunePackage { + pname = "seppo"; + version = "0-unstable-2025-06-03"; + + src = fetchFromGitea { + domain = "codeberg.org"; + owner = "seppo"; + repo = "seppo"; + rev = "33ae3e9f61d596fb91d3ab1a91fc26ae80981a93"; + hash = "sha256-tOIIfYBLcZqQzoPxAVkE8RGX0sugUmDGpxIhIZ5Wy+w="; + }; + + # Provide git sha to avoid git dependency + env.GIT_SHA = seppo.src.rev; + + # Static build fails to find correct static libraries + postPatch = '' + sed -i 's/-static/""/' bin/gen_flags.sh + ''; + + nativeBuildInputs = [ + ocaml-crunch + ]; + + buildInputs = with ocamlPackages; [ + mcdb + + camlp-streams + cohttp-lwt-unix + crunch + csexp + decoders-ezjsonm + lambdasoup + lwt_ppx + mirage-crypto-rng + ocaml_sqlite3 + optint + safepass + timedesc + tls-lwt + tyre + uucp + uuidm + uunf + uutf + x509 + xmlm + ]; + + meta = { + homepage = "https://seppo.mro.name"; + description = "Personal Social Web"; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ infinidoge ]; + mainProgram = "seppo"; + }; +}