1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 06:31:02 +00:00

lib/systems: add uname attrs

This commit is contained in:
Matthew Bauer 2018-10-16 21:48:43 -05:00
parent 01dfe3f560
commit 0e0894c37d

View file

@ -46,6 +46,24 @@ rec {
# Misc boolean options
useAndroidPrebuilt = false;
useiOSPrebuilt = false;
# Output from uname
uname = {
# uname -s
system = if final.isLinux then "Linux"
else if final.isDarwin then "Darwin"
else if final.isWindows then "Windows"
else if final.isFreeBSD then "FreeBSD"
else if final.isNetBSD then "NetBSD"
else if final.isOpenBSD then "OpenBSD"
else null;
# uname -p
processor = final.parsed.cpu.name;
# uname -r
release = null;
};
} // mapAttrs (n: v: v final.parsed) inspect.predicates
// args;
in assert final.useAndroidPrebuilt -> final.isAndroid;