nixpkgs-suyu/nixos/tests/nix-ld.nix

18 lines
470 B
Nix
Raw Normal View History

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