xlog/package.nix

37 lines
608 B
Nix
Raw Normal View History

2024-04-23 02:36:13 +00:00
{
lib,
mkShell,
buildDunePackage,
ptime,
ocaml,
dune_3,
odoc,
utop,
enableShell ? false
}:
let
sourceRoot = ./.;
fs = lib.fileset;
sourceFiles = fs.difference
(fs.gitTracked sourceRoot)
(fs.fileFilter (file: file.hasExt "nix") sourceRoot);
sourceSet = fs.toSource { root = sourceRoot; fileset = sourceFiles; };
in buildDunePackage rec {
pname = "xlog";
version = "0.0.1";
src = sourceSet;
minimalOCamlVersion = "5.1";
dontStrip = true;
propagatedBuildInputs = [ ptime ];
nativeBuildInputs = lib.optionals enableShell [
ocaml dune_3 odoc utop
];
}