From 6b1057b452c55bb3b463f0d7055bc4ec3fd1f381 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Wed, 17 Feb 2021 18:02:09 +0100 Subject: [PATCH] ocamlPackages.uucp: use throw instead of lib.assertMsg This makes the uucp evaluation fail silently for nix-env -qaP ocaml-ng.ocamlPackages_4_02, as throw messages are not printed to stderr. --- pkgs/development/ocaml-modules/uucp/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/uucp/default.nix b/pkgs/development/ocaml-modules/uucp/default.nix index 433e3f9cb10..bb70ff6a4b7 100644 --- a/pkgs/development/ocaml-modules/uucp/default.nix +++ b/pkgs/development/ocaml-modules/uucp/default.nix @@ -8,8 +8,9 @@ let doCheck = true; in -assert lib.assertMsg (lib.versionAtLeast ocaml.version minimumOCamlVersion) - "${pname} needs at least OCaml ${minimumOCamlVersion}"; +if !(lib.versionAtLeast ocaml.version minimumOCamlVersion) +then builtins.throw "${pname} needs at least OCaml ${minimumOCamlVersion}" +else stdenv.mkDerivation {