uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
20
nixos/tests/nix-ld.nix
Normal file
20
nixos/tests/nix-ld.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
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 $(cat ${pkgs.nix-ld}/nix-support/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")
|
||||
'';
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue