8a45d4525b
GitOrigin-RevId: 710fed5a2483f945b14f4a58af2cd3676b42d8c8
20 lines
588 B
Nix
20 lines
588 B
Nix
import ./make-test-python.nix ({ lib, pkgs, ...} :
|
|
{
|
|
name = "nix-ld";
|
|
nodes.machine = { pkgs, ... }: {
|
|
programs.nix-ld.enable = true;
|
|
environment.systemPackages = [
|
|
(pkgs.runCommand "patched-hello" {} ''
|
|
install -D -m755 ${pkgs.hello}/bin/hello $out/bin/hello
|
|
patchelf $out/bin/hello --set-interpreter ${pkgs.nix-ld.ldPath}
|
|
'')
|
|
];
|
|
};
|
|
testScript = ''
|
|
start_all()
|
|
path = "${pkgs.stdenv.cc}/nix-support/dynamic-linker"
|
|
with open(path) as f:
|
|
real_ld = f.read().strip()
|
|
machine.succeed(f"NIX_LD={real_ld} hello")
|
|
'';
|
|
})
|