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). |
||
---|---|---|
.. | ||
lang | ||
add.sh | ||
build-hook.hook.sh | ||
build-hook.nix.in | ||
build-hook.sh | ||
check-refs.nix.in | ||
check-refs.sh | ||
common.sh.in | ||
dependencies.builder0.sh | ||
dependencies.builder1.sh | ||
dependencies.builder2.sh | ||
dependencies.nix.in | ||
dependencies.sh | ||
export.sh | ||
fallback.sh | ||
filter-source.nix.in | ||
filter-source.sh | ||
fixed.builder1.sh | ||
fixed.builder2.sh | ||
fixed.nix.in | ||
fixed.sh | ||
gc-concurrent.builder.sh | ||
gc-concurrent.nix.in | ||
gc-concurrent.sh | ||
gc-concurrent2.builder.sh | ||
gc-concurrent2.nix.in | ||
gc-runtime.nix.in | ||
gc-runtime.sh | ||
gc.sh | ||
hash-check.nix | ||
hash.sh | ||
init.sh | ||
install-package.sh | ||
lang.sh | ||
locking.builder.sh | ||
locking.nix.in | ||
locking.sh | ||
logging.sh | ||
Makefile.am | ||
misc.sh | ||
nix-build.sh | ||
nix-pull.sh | ||
nix-push.sh | ||
parallel.builder.sh | ||
parallel.nix.in | ||
parallel.sh | ||
referrers.sh | ||
remote-store.sh | ||
simple.builder.sh | ||
simple.nix.in | ||
simple.sh | ||
substituter.sh | ||
substituter2.sh | ||
substitutes.sh | ||
substitutes2.sh | ||
user-envs.builder.sh | ||
user-envs.nix.in | ||
user-envs.sh | ||
verify.sh |