nixpkgs-suyu/lib/tests
Andrew Childs 741377b300 lib/customization: propagate function arguments in callPackagesWith
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; }
2024-02-28 15:29:08 +02:00
..
modules Merge pull request #284512 from hercules-ci/lib-types-unique-merge 2024-02-10 02:52:45 +01:00
packages-from-directory lib/tests/packages-from-directory: make sure all .nix files parse 2024-01-31 20:30:17 +01:00
check-eval.nix
filesystem.sh lib.filesystem: Don't test Nix-specific error messages 2023-11-01 18:56:03 +01:00
maintainer-module.nix
maintainers.nix
misc.nix lib/customization: propagate function arguments in callPackagesWith 2024-02-28 15:29:08 +02:00
modules.sh Merge pull request #284512 from hercules-ci/lib-types-unique-merge 2024-02-10 02:52:45 +01:00
nix-for-tests.nix lib.tests: build nix without flaky aws-sdk-cpp 2023-11-18 20:19:10 -08:00
release.nix lib/tests/test-with-nix.nix: init 2024-02-23 11:07:08 +01:00
sources.sh
systems.nix
teams.nix
test-to-plist-expected.plist
test-with-nix.nix lib/tests/test-with-nix.nix: init 2024-02-23 11:07:08 +01:00