diff --git a/pkgs/development/ocaml-modules/cstruct/unix.nix b/pkgs/development/ocaml-modules/cstruct/unix.nix index fb7612b5f05e..604ad4fb083b 100644 --- a/pkgs/development/ocaml-modules/cstruct/unix.nix +++ b/pkgs/development/ocaml-modules/cstruct/unix.nix @@ -1,4 +1,8 @@ -{ buildDunePackage, cstruct }: +{ lib, buildDunePackage, cstruct }: + +if !lib.versionAtLeast (cstruct.version or "1") "3" +then cstruct +else buildDunePackage { pname = "cstruct-unix";