make-derivation: use a more descriptive assert message
As suggested by @Profpatsch
This commit is contained in:
parent
c7e026bec4
commit
1f7fc09176
@ -86,7 +86,8 @@ rec {
|
|||||||
assert lib.assertMsg
|
assert lib.assertMsg
|
||||||
(lib.lists.all (name: builtins.hasAttr name attrs) ["name" "pname" "version"]
|
(lib.lists.all (name: builtins.hasAttr name attrs) ["name" "pname" "version"]
|
||||||
-> lib.strings.hasSuffix "${attrs.pname}-${attrs.version}" attrs.name)
|
-> lib.strings.hasSuffix "${attrs.pname}-${attrs.version}" attrs.name)
|
||||||
"mkDerivation: `name` must be consistent with `pname-version`";
|
("mkDerivation: `name` (\"${attrs.name}\") must be consistent " +
|
||||||
|
"with `pname-version` \"${attrs.pname}-${attrs.version}\"");
|
||||||
|
|
||||||
let
|
let
|
||||||
# TODO(@oxij, @Ericson2314): This is here to keep the old semantics, remove when
|
# TODO(@oxij, @Ericson2314): This is here to keep the old semantics, remove when
|
||||||
|
Loading…
x
Reference in New Issue
Block a user