diff --git a/pkgs/development/ocaml-modules/cstruct/ppx.nix b/pkgs/development/ocaml-modules/cstruct/ppx.nix index 5f4130dc23f..78600b78306 100644 --- a/pkgs/development/ocaml-modules/cstruct/ppx.nix +++ b/pkgs/development/ocaml-modules/cstruct/ppx.nix @@ -1,4 +1,8 @@ -{ buildDunePackage, cstruct, ppx_tools_versioned }: +{ lib, buildDunePackage, cstruct, ppx_tools_versioned }: + +if !lib.versionAtLeast (cstruct.version or "1") "3" +then cstruct +else buildDunePackage { pname = "ppx_cstruct";