git.iko.soy/typeable/nixpkgs
on master help sign in
make-derivation: use a more descriptive assert message

As suggested by @Profpatsch

commit1f7fc09176dc9b0260b8e2778f1e6c3139eae6a9 authorPatrick Hilhorst <git@hilhorst.be> dateTue 30 Oct 2018, 14:27 (8 years ago) parentc7e026b
1 file changed+2−1
pkgs/stdenv/generic/make-derivation.nix+2−1
pkgs/stdenv/generic/make-derivation.nix+2−1
@@ -86,7 +86,8 @@ rec {
8686 assert lib.assertMsg
8787 (lib.lists.all (name: builtins.hasAttr name attrs) ["name" "pname" "version"]
8888 -> lib.strings.hasSuffix "${attrs.pname}-${attrs.version}" attrs.name)
89− "mkDerivation: `name` must be consistent with `pname-version`";
89+ ("mkDerivation: `name` (\"${attrs.name}\") must be consistent " +
90+ "with `pname-version` \"${attrs.pname}-${attrs.version}\"");
9091
9192 let
9293 # TODO(@oxij, @Ericson2314): This is here to keep the old semantics, remove when