diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2018-11-22 09:57:08 +0100 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2018-11-22 09:57:08 +0100 |
commit | c31cb577aed1e94e467ea1d6455fc275946d3b2d (patch) | |
tree | fcabcf126d5e422fa998925403add39444c2a166 /lib | |
parent | 16267b4389c75cba9f0f10664043bd6d47013827 (diff) | |
parent | 9467621b186dcaf8a24772482e0d8a6a581ce0bb (diff) |
Merge master into staging-next
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fixed-points.nix | 12 | ||||
-rw-r--r-- | lib/systems/parse.nix | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/lib/fixed-points.nix b/lib/fixed-points.nix index 13e053b5aa7db..7169c46fcbbca 100644 --- a/lib/fixed-points.nix +++ b/lib/fixed-points.nix @@ -41,6 +41,18 @@ rec { # think of it as an infix operator `g extends f` that mimics the syntax from # Java. It may seem counter-intuitive to have the "base class" as the second # argument, but it's nice this way if several uses of `extends` are cascaded. + # + # To get a better understanding how `extends` turns a function with a fix + # point (the package set we start with) into a new function with a different fix + # point (the desired packages set) lets just see, how `extends g f` + # unfolds with `g` and `f` defined above: + # + # extends g f = self: let super = f self; in super // g self super; + # = self: let super = { foo = "foo"; bar = "bar"; foobar = self.foo + self.bar; }; in super // g self super + # = self: { foo = "foo"; bar = "bar"; foobar = self.foo + self.bar; } // g self { foo = "foo"; bar = "bar"; foobar = self.foo + self.bar; } + # = self: { foo = "foo"; bar = "bar"; foobar = self.foo + self.bar; } // { foo = "foo" + " + "; } + # = self: { foo = "foo + "; bar = "bar"; foobar = self.foo + self.bar; } + # extends = f: rattrs: self: let super = rattrs self; in super // f self super; # Compose two extending functions of the type expected by 'extends' diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix index be73a6d252f0f..73b065689d06b 100644 --- a/lib/systems/parse.nix +++ b/lib/systems/parse.nix @@ -82,6 +82,9 @@ rec { aarch64 = { bits = 64; significantByte = littleEndian; family = "arm"; version = "8"; }; aarch64_be = { bits = 64; significantByte = bigEndian; family = "arm"; version = "8"; }; + i386 = { bits = 32; significantByte = littleEndian; family = "x86"; }; + i486 = { bits = 32; significantByte = littleEndian; family = "x86"; }; + i586 = { bits = 32; significantByte = littleEndian; family = "x86"; }; i686 = { bits = 32; significantByte = littleEndian; family = "x86"; }; x86_64 = { bits = 64; significantByte = littleEndian; family = "x86"; }; |