bk910x/package.nix

39 lines
640 B
Nix

{
lib,
mkShell,
buildDunePackage,
eio,
eio_main,
xlog,
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 = "bk910x";
version = "devel";
src = sourceSet;
minimalOCamlVersion = "5.1";
dontStrip = true;
propagatedBuildInputs = [ eio eio_main xlog ];
nativeBuildInputs = lib.optionals enableShell [
ocaml dune_3 odoc utop
];
}