forked from lix-project/lix
9279174dde
in attribute set pattern matches. This allows defining a function that takes *at least* the listed attributes, while ignoring additional attributes. For instance, {stdenv, fetchurl, fuse, ...}: stdenv.mkDerivation { ... }; defines a function that requires an attribute set that contains the specified attributes but ignores others. The main advantage is that we can then write in all-packages.nix aefs = import ../bla/aefs pkgs; instead of aefs = import ../bla/aefs { inherit stdenv fetchurl fuse; }; This saves a lot of typing (not to mention not having to update all-packages.nix with purely mechanical changes). It saves as much typing as the "args: with args;" style, but has the advantage that the function arguments are properly declared (not implicit in what the body of the "with" uses). |
||
---|---|---|
.. | ||
eval-fail-abort.nix | ||
eval-fail-assert.nix | ||
eval-fail-blackhole.nix | ||
eval-fail-missing-arg.nix | ||
eval-fail-remove.nix | ||
eval-fail-scope-5.nix | ||
eval-fail-substring.nix | ||
eval-fail-to-path.nix | ||
eval-fail-undeclared-arg.nix | ||
eval-okay-arithmetic.exp | ||
eval-okay-arithmetic.nix | ||
eval-okay-attrnames.exp | ||
eval-okay-attrnames.nix | ||
eval-okay-attrs.exp | ||
eval-okay-attrs.nix | ||
eval-okay-attrs2.exp | ||
eval-okay-attrs2.nix | ||
eval-okay-autoargs.exp | ||
eval-okay-autoargs.flags | ||
eval-okay-autoargs.nix | ||
eval-okay-builtins.exp | ||
eval-okay-builtins.nix | ||
eval-okay-closure.exp.xml | ||
eval-okay-closure.nix | ||
eval-okay-concat.exp | ||
eval-okay-concat.nix | ||
eval-okay-context.exp | ||
eval-okay-context.nix | ||
eval-okay-empty-args.exp | ||
eval-okay-empty-args.nix | ||
eval-okay-eq.exp.disabled | ||
eval-okay-eq.nix | ||
eval-okay-flatten.exp | ||
eval-okay-flatten.nix | ||
eval-okay-getenv.exp | ||
eval-okay-getenv.nix | ||
eval-okay-if.exp | ||
eval-okay-if.nix | ||
eval-okay-ind-string.exp | ||
eval-okay-ind-string.nix | ||
eval-okay-let.exp | ||
eval-okay-let.nix | ||
eval-okay-list.exp | ||
eval-okay-list.nix | ||
eval-okay-listToAttrs.nix | ||
eval-okay-listToAttrs.out | ||
eval-okay-logic.exp | ||
eval-okay-logic.nix | ||
eval-okay-map.exp | ||
eval-okay-map.nix | ||
eval-okay-new-let.exp | ||
eval-okay-new-let.nix | ||
eval-okay-pathexists.exp | ||
eval-okay-pathexists.nix | ||
eval-okay-patterns.exp | ||
eval-okay-patterns.nix | ||
eval-okay-readfile.exp | ||
eval-okay-readfile.nix | ||
eval-okay-remove.exp | ||
eval-okay-remove.nix | ||
eval-okay-scope-1.exp | ||
eval-okay-scope-1.nix | ||
eval-okay-scope-2.exp | ||
eval-okay-scope-2.nix | ||
eval-okay-scope-3.exp | ||
eval-okay-scope-3.nix | ||
eval-okay-scope-4.exp | ||
eval-okay-scope-4.nix | ||
eval-okay-scope-6.exp | ||
eval-okay-scope-6.nix | ||
eval-okay-string.exp | ||
eval-okay-string.nix | ||
eval-okay-substring.exp | ||
eval-okay-substring.nix | ||
eval-okay-to-xml.exp | ||
eval-okay-to-xml.nix | ||
eval-okay-versions.exp | ||
eval-okay-versions.nix | ||
eval-okay-with.exp | ||
eval-okay-with.nix | ||
eval-okay-xml.exp.xml | ||
eval-okay-xml.nix | ||
lib.nix | ||
parse-fail-dup-attrs-1.nix | ||
parse-fail-dup-attrs-2.nix | ||
parse-fail-dup-attrs-3.nix | ||
parse-fail-dup-formals.nix | ||
parse-fail-patterns-1.nix | ||
parse-fail-regression-20060610.nix | ||
parse-fail-undef-var-2.nix | ||
parse-fail-undef-var.nix | ||
parse-okay-1.exp | ||
parse-okay-1.nix | ||
parse-okay-crlf.exp | ||
parse-okay-crlf.nix | ||
parse-okay-regression-20041027.exp | ||
parse-okay-regression-20041027.nix | ||
parse-okay-subversion.exp | ||
parse-okay-subversion.nix | ||
parse-okay-url.exp | ||
parse-okay-url.nix |