Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
nix-repl> stdenv = import <nixpkgs> {}
nix-repl> b = stdenv.lib.subtractLists stdenv.lib.platforms.i686 stdenv.lib.platforms.unix
nix-repl> builtins.trace b b
trace: [ { kernel = { families = { bsd = <CODE>; }; }; } { kernel = { families = { darwin = <CODE>; }; }; } { kernel = { _type = "kernel"; execFormat = { _type = "exec-format"; name = "elf"; }; families = { }; name = "linux"; }; } { kernel = { _type = "kernel"; execFormat = { _type = "exec-format"; name = "elf"; }; families = { }; name = "solaris"; }; } { abi = { _type = "abi"; name = "cygnus"; }; kernel = <CODE>; } ]
[ { ... } { ... } { ... } { ... } { ... } ]
nix-repl> builtins.trace stdenv.lib.platforms.unix stdenv.lib.platforms.unix
trace: [ { kernel = { families = { bsd = <CODE>; }; }; } { kernel = { families = { darwin = <CODE>; }; }; } { kernel = { _type = "kernel"; execFormat = { _type = "exec-format"; name = "elf"; }; families = { }; name = "linux"; }; } { kernel = { _type = "kernel"; execFormat = { _type = "exec-format"; name = "elf"; }; families = { }; name = "solaris"; }; } { abi = { _type = "abi"; name = "cygnus"; }; kernel = <CODE>; } ]
[ { ... } { ... } { ... } { ... } { ... } ]
nix-repl> :p b
[ { kernel = { families = { bsd = { _type = "exec-format"; name = "bsd"; }; }; }; } { kernel = { families = { darwin = { _type = "exec-format"; name = "darwin"; }; }; }; } { kernel = { _type = "kernel"; execFormat = { _type = "exec-format"; name = "elf"; }; families = { }; name = "linux"; }; } { kernel = { _type = "kernel"; execFormat = «repeated»; families = { }; name = "solaris"; }; } { abi = { _type = "abi"; name = "cygnus"; }; kernel = { _type = "kernel"; execFormat = { _type = "exec-format"; name = "pe"; }; families = { }; name = "windows"; }; } ]
nix-repl> :p stdenv.lib.platforms.unix
[ { kernel = { families = { bsd = { _type = "exec-format"; name = "bsd"; }; }; }; } { kernel = { families = { darwin = { _type = "exec-format"; name = "darwin"; }; }; }; } { kernel = { _type = "kernel"; execFormat = { _type = "exec-format"; name = "elf"; }; families = { }; name = "linux"; }; } { kernel = { _type = "kernel"; execFormat = «repeated»; families = { }; name = "solaris"; }; } { abi = { _type = "abi"; name = "cygnus"; }; kernel = { _type = "kernel"; execFormat = { _type = "exec-format"; name = "pe"; }; families = { }; name = "windows"; }; } ]
nix-repl> :p stdenv.lib.platforms.i686
[ { cpu = { _type = "cpu-type"; bits = 32; family = "x86"; name = "i686"; significantByte = { _type = "significant-byte"; name = "littleEndian"; }; }; } ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.