nixpkgs/pkgs/development/ocaml-modules/ocsigen-server/default.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

126 lines
2.1 KiB
Nix

{
lib,
buildDunePackage,
fetchFromGitHub,
which,
ocaml,
lwt_react,
ssl,
lwt_ssl,
findlib,
bigstringaf,
lwt,
cstruct,
mirage-crypto,
zarith,
mirage-crypto-ec,
ptime,
mirage-crypto-rng,
mtime,
ca-certs,
cohttp,
cohttp-lwt-unix,
lwt_log,
re,
cryptokit,
xml-light,
ipaddr,
camlzip,
makeWrapper,
}:
let
mkpath = p: "${p}/lib/ocaml/${ocaml.version}/site-lib/stublibs";
in
let
caml_ld_library_path = lib.concatMapStringsSep ":" mkpath [
bigstringaf
lwt
ssl
cstruct
mirage-crypto
zarith
mirage-crypto-ec
ptime
mirage-crypto-rng
mtime
ca-certs
cryptokit
re
];
in
buildDunePackage rec {
version = "6.0.0";
pname = "ocsigenserver";
minimalOCamlVersion = "4.08";
src = fetchFromGitHub {
owner = "ocsigen";
repo = "ocsigenserver";
rev = "refs/tags/${version}";
hash = "sha256-T3bgPZpDO6plgebLJDBtBuR2eR/bN3o24UAUv1VwgtI=";
};
nativeBuildInputs = [
makeWrapper
which
];
buildInputs = [
lwt_react
camlzip
findlib
];
propagatedBuildInputs = [
cohttp
cohttp-lwt-unix
cryptokit
ipaddr
lwt_log
lwt_ssl
re
xml-light
];
configureFlags = [
"--root $(out)"
"--prefix /"
"--temproot ''"
];
dontAddPrefix = true;
dontAddStaticConfigureFlags = true;
configurePlatforms = [ ];
postConfigure = ''
make -C src confs
'';
postInstall = ''
make install.files
'';
postFixup = ''
rm -rf $out/var/run
wrapProgram $out/bin/ocsigenserver \
--suffix CAML_LD_LIBRARY_PATH : "${caml_ld_library_path}"
'';
dontPatchShebangs = true;
meta = {
homepage = "http://ocsigen.org/ocsigenserver/";
description = "Full featured Web server";
longDescription = ''
A full featured Web server. It implements most features of the HTTP protocol, and has a very powerful extension mechanism that make very easy to plug your own OCaml modules for generating pages.
'';
license = lib.licenses.lgpl21Only;
inherit (ocaml.meta) platforms;
maintainers = [ lib.maintainers.gal_bolle ];
};
}