Skip to content

Instantly share code, notes, and snippets.

@cyounkins
Created December 18, 2018 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cyounkins/c725fd4bc2d51c994da1b27b9ec19ae9 to your computer and use it in GitHub Desktop.
Save cyounkins/c725fd4bc2d51c994da1b27b9ec19ae9 to your computer and use it in GitHub Desktop.
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