push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,90 @@
{
lib,
stdenv,
ocaml,
findlib,
dune_1,
dune_2,
dune_3,
}:
lib.extendMkDerivation {
constructDrv = stdenv.mkDerivation;
excludeDrvArgNames = [
"minimalOCamlVersion"
"duneVersion"
];
extendDrvArgs =
finalAttrs:
{
pname,
version,
nativeBuildInputs ? [ ],
enableParallelBuilding ? true,
...
}@args:
let
Dune =
let
dune-version = args.duneVersion or "3";
in
{
"1" = dune_1;
"2" = dune_2;
"3" = dune_3;
}
."${dune-version}";
in
if args ? minimalOCamlVersion && lib.versionOlder ocaml.version args.minimalOCamlVersion then
throw "${pname}-${version} is not available for OCaml ${ocaml.version}"
else
{
name = "ocaml${ocaml.version}-${pname}-${version}";
strictDeps = true;
inherit enableParallelBuilding;
dontAddStaticConfigureFlags = true;
configurePlatforms = [ ];
nativeBuildInputs = [
ocaml
Dune
findlib
]
++ nativeBuildInputs;
buildPhase =
args.buildPhase or ''
runHook preBuild
dune build -p ${pname} ''${enableParallelBuilding:+-j $NIX_BUILD_CORES}
runHook postBuild
'';
installPhase =
args.installPhase or ''
runHook preInstall
dune install --prefix $out --libdir $OCAMLFIND_DESTDIR ${pname} \
${
if lib.versionAtLeast Dune.version "2.9" then
"--docdir $out/share/doc --mandir $out/share/man"
else
""
}
runHook postInstall
'';
checkPhase =
args.checkPhase or ''
runHook preCheck
dune runtest -p ${pname} ''${enableParallelBuilding:+-j $NIX_BUILD_CORES}
runHook postCheck
'';
meta = (args.meta or { }) // {
platforms = args.meta.platforms or ocaml.meta.platforms;
};
};
}

View File

@@ -0,0 +1,67 @@
{
lib,
stdenv,
ocaml_oasis,
ocaml,
findlib,
ocamlbuild,
}:
{
pname,
version,
nativeBuildInputs ? [ ],
meta ? {
platforms = ocaml.meta.platforms or [ ];
},
minimumOCamlVersion ? null,
createFindlibDestdir ? true,
dontStrip ? true,
...
}@args:
if args ? minimumOCamlVersion && lib.versionOlder ocaml.version args.minimumOCamlVersion then
throw "${pname}-${version} is not available for OCaml ${ocaml.version}"
else
stdenv.mkDerivation (
args
// {
name = "ocaml${ocaml.version}-${pname}-${version}";
nativeBuildInputs = [
ocaml
findlib
ocamlbuild
ocaml_oasis
]
++ nativeBuildInputs;
inherit createFindlibDestdir;
inherit dontStrip;
strictDeps = true;
buildPhase = ''
runHook preBuild
oasis setup
ocaml setup.ml -configure --prefix $OCAMLFIND_DESTDIR --exec-prefix $out
ocaml setup.ml -build
runHook postBuild
'';
checkPhase = ''
runHook preCheck
ocaml setup.ml -test
runHook postCheck
'';
installPhase = ''
runHook preInstall
mkdir -p $out
ocaml setup.ml -install
runHook postInstall
'';
}
)

View File

@@ -0,0 +1,54 @@
{
lib,
stdenv,
fetchurl,
ocaml,
findlib,
topkg,
ocamlbuild,
cmdliner,
odoc,
b0,
}:
{
pname,
version,
nativeBuildInputs ? [ ],
buildInputs ? [ ],
...
}@args:
lib.throwIf (args ? minimalOCamlVersion && lib.versionOlder ocaml.version args.minimalOCamlVersion)
"${pname}-${version} is not available for OCaml ${ocaml.version}"
stdenv.mkDerivation
(
{
dontAddStaticConfigureFlags = true;
configurePlatforms = [ ];
strictDeps = true;
inherit (topkg) buildPhase installPhase;
}
// (removeAttrs args [ "minimalOCamlVersion" ])
// {
name = "ocaml${ocaml.version}-${pname}-${version}";
nativeBuildInputs = [
ocaml
findlib
ocamlbuild
topkg
]
++ nativeBuildInputs;
buildInputs = [ topkg ] ++ buildInputs;
meta = (args.meta or { }) // {
platforms = args.meta.platforms or ocaml.meta.platforms;
};
}
)