make-derivation: use lib.assertMsg
As suggested by @Profpatsch
This commit is contained in:
parent
5be927db14
commit
c7e026bec4
|
@ -83,8 +83,10 @@ rec {
|
|||
, ... } @ attrs:
|
||||
|
||||
# Check that the name is consistent with pname and version:
|
||||
assert lib.lists.all (name: builtins.hasAttr name attrs) ["name" "pname" "version"]
|
||||
-> lib.strings.hasSuffix "${attrs.pname}-${attrs.version}" attrs.name;
|
||||
assert lib.assertMsg
|
||||
(lib.lists.all (name: builtins.hasAttr name attrs) ["name" "pname" "version"]
|
||||
-> lib.strings.hasSuffix "${attrs.pname}-${attrs.version}" attrs.name)
|
||||
"mkDerivation: `name` must be consistent with `pname-version`";
|
||||
|
||||
let
|
||||
# TODO(@oxij, @Ericson2314): This is here to keep the old semantics, remove when
|
||||
|
|
Loading…
Reference in a new issue