This website requires JavaScript.
Explore
Help
Sign in
max
/
nix-super
Watch
1
Star
0
Fork
You've already forked nix-super
0
mirror of
https://github.com/privatevoid-net/nix-super.git
synced
2024-11-27 08:16:14 +02:00
Code
Issues
Projects
Releases
Packages
Wiki
Activity
Actions
90039e0863
nix-super
/
tests
/
lang
/
eval-okay-patterns.exp
2 lines
28 B
Text
Raw
Normal View
History
Unescape
Escape
* Added an experimental feature suggested by Andres: ellipses ("...") 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).
2008-08-14 17:00:44 +03:00
Str("abcxyzDDDDEFghijk",[])
Reference in a new issue
Copy permalink