1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

nixos/version: support UAPI Version Format in IMAGE_VERSION field

Add '~' and '^' to the supported characters for the field. These
characters are needed to be able to define all versions that are
compatible with the UAPI Version Format specification.

One example where this is used is the `%A` flag in systemd.unit. If we
don't allow these other characters, we for example cannot declare a
pre-relase version.

systemd, as far as I can tell, doesn't enforce any restrictions on the
os-release fields.

https://uapi-group.org/specifications/specs/version_format_specification/
This commit is contained in:
nikstur 2024-05-16 15:37:39 +02:00
parent bafcff9b15
commit ff776981fe

View file

@ -135,7 +135,7 @@ in
};
version = lib.mkOption {
type = types.nullOr (types.strMatching "^[a-z0-9._-]+$");
type = types.nullOr (types.strMatching "^[a-z0-9._-~^]+$");
default = null;
description = ''
Image version.