lib/types.nix: Disable 32-bit integer types for now

This file doesn't evaluate in 32-bit versions of Nix because the integer
type is a signed 32-bit integer there, so 4294967296 causes an 'invalid
integer' error.  I see no other way around than commenting this out :(

(s32 could be made to work by tweaking the expressions a bit, but didn't
do that for now since it'd be asymmetric to have s32 but no u32).
This commit is contained in:
Tuomas Tynkkynen 2017-11-05 22:47:09 +02:00
parent 68d4912ea5
commit 8c190c3f7d

View file

@ -157,14 +157,14 @@ rec {
};
u8 = unsign 8 256;
u16 = unsign 16 65536;
u32 = unsign 32 4294967296;
# the biggest int the nix lexer accepts is 9223372036854775808
# the smallest int the nix lexer accepts is -9223372036854775807
# unsigned64 = unsign 64 18446744073709551616;
# the biggest int a 64-bit Nix accepts is 2^63 - 1 (9223372036854775808), for a 32-bit Nix it is 2^31 - 1 (2147483647)
# the smallest int a 64-bit Nix accepts is -2^63 (-9223372036854775807), for a 32-bit Nix it is -2^31 (-2147483648)
# u32 = unsign 32 4294967296;
# u64 = unsign 64 18446744073709551616;
s8 = sign 8 256;
s16 = sign 16 65536;
s32 = sign 32 4294967296;
# s32 = sign 32 4294967296;
};
str = mkOptionType {