mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-14 19:47:48 +00:00
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 New Issue
Block a user