mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 00:24:18 +00:00
3616cfb8d9
Unlike regular input-addressed or fixed-output derivations, floating and deferred derivations do not have their store path available at evaluation time, so their outPath is a placeholder. The following changes are needed for replaceDependencies to continue working: * Detect the placeholder and retrieve the store path using another IFD hack when collecting the rewrite plan. * Try to obtain the derivation name needed for replaceDirectDependencies from the derivation arguments if a placeholder is detected. * Move the length mismatch detection to build time, since the placeholder has a fixed length which is unrelated to the store path.
20 lines
498 B
Nix
20 lines
498 B
Nix
import ../make-test-python.nix (
|
|
{ pkgs, ... }:
|
|
{
|
|
name = "replace-dependencies";
|
|
meta.maintainers = with pkgs.lib.maintainers; [ alois31 ];
|
|
|
|
nodes.machine =
|
|
{ ... }:
|
|
{
|
|
nix.settings.experimental-features = [ "ca-derivations" ];
|
|
system.extraDependencies = [ pkgs.stdenvNoCC ];
|
|
};
|
|
|
|
testScript = ''
|
|
start_all()
|
|
machine.succeed("nix-build --option substitute false ${pkgs.path}/nixos/tests/replace-dependencies/guest.nix")
|
|
'';
|
|
}
|
|
)
|