741377b300
makeOverridable is very careful to ensure the arguments to the overridden function are the same as the input function. As a result, the arguments of hello.override are exactly the same as the original arguments of the hello function that produced the derivation. However, callPackagesWith calls makeOverridable with a lambda that does not propagate the arguments. The override function for a package instantiated with callPackagesWith will not have the original arguments. For example: nix-repl> lib.functionArgs hello.override { callPackage = false; fetchurl = false; hello = false; lib = false; nixos = false; stdenv = false; testers = false; } nix-repl> lib.functionArgs openssl.override { } By copying the arguments onto the inner lambda before passing it to makeOverridable, we can make callPackage and callPackages behave the same. nix-repl> lib.functionArgs openssl.override { buildPackages = false; coreutils = false; cryptodev = false; enableSSL2 = true; enableSSL3 = true; fetchurl = false; lib = false; perl = false; removeReferencesTo = false; static = true; stdenv = false; withCryptodev = true; withPerl = true; } |
||
---|---|---|
.. | ||
modules | ||
packages-from-directory | ||
check-eval.nix | ||
filesystem.sh | ||
maintainer-module.nix | ||
maintainers.nix | ||
misc.nix | ||
modules.sh | ||
nix-for-tests.nix | ||
release.nix | ||
sources.sh | ||
systems.nix | ||
teams.nix | ||
test-to-plist-expected.plist | ||
test-with-nix.nix |