make-derivation: add check that the name is consistent with pname and version
This commit is contained in:
parent
149a55eca7
commit
2962f94fec
@ -82,6 +82,10 @@ rec {
|
|||||||
|
|
||||||
, ... } @ attrs:
|
, ... } @ 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;
|
||||||
|
|
||||||
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
|
||||||
# no package has `doCheck = true`.
|
# no package has `doCheck = true`.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user