nixpkgs/nixos/tests/nix-ld.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
470 B
Nix
Raw Normal View History

2022-03-15 12:22:18 +00:00
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
2022-05-14 15:02:37 +00:00
patchelf $out/bin/hello --set-interpreter $(cat ${pkgs.nix-ld}/nix-support/ldpath)
2022-03-15 12:22:18 +00:00
'')
];
};
testScript = ''
start_all()
2022-12-18 00:35:04 +00:00
machine.succeed("hello")
2022-03-15 12:22:18 +00:00
'';
})