587713944a
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
39 lines
954 B
Nix
39 lines
954 B
Nix
{ system ? builtins.currentSystem,
|
|
config ? {},
|
|
pkgs ? import ../.. { inherit system config; }
|
|
}:
|
|
let
|
|
inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest;
|
|
shared =
|
|
{ config, 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 $(cat ${config.programs.nix-ld.package}/nix-support/ldpath)
|
|
'')
|
|
];
|
|
};
|
|
in
|
|
{
|
|
nix-ld = makeTest {
|
|
name = "nix-ld";
|
|
nodes.machine = shared;
|
|
testScript = ''
|
|
start_all()
|
|
machine.succeed("hello")
|
|
'';
|
|
};
|
|
nix-ld-rs = makeTest {
|
|
name = "nix-ld-rs";
|
|
nodes.machine = {
|
|
imports = [ shared ];
|
|
programs.nix-ld.package = pkgs.nix-ld-rs;
|
|
};
|
|
testScript = ''
|
|
start_all()
|
|
machine.succeed("hello")
|
|
'';
|
|
};
|
|
}
|