nix-ld: 2.0.3 -> 2.0.4 (#399334)
This commit is contained in:
@@ -22,7 +22,7 @@ in
|
||||
{
|
||||
meta.maintainers = [ lib.maintainers.mic92 ];
|
||||
options.programs.nix-ld = {
|
||||
enable = lib.mkEnableOption ''nix-ld, Documentation: <https://github.com/Mic92/nix-ld>'';
|
||||
enable = lib.mkEnableOption ''nix-ld, Documentation: <https://github.com/nix-community/nix-ld>'';
|
||||
package = lib.mkPackageOption pkgs "nix-ld" { };
|
||||
libraries = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.package;
|
||||
|
||||
@@ -914,7 +914,7 @@ in
|
||||
nifi = runTestOn [ "x86_64-linux" ] ./web-apps/nifi.nix;
|
||||
nitter = handleTest ./nitter.nix { };
|
||||
nix-config = handleTest ./nix-config.nix { };
|
||||
nix-ld = handleTest ./nix-ld.nix { };
|
||||
nix-ld = runTest ./nix-ld.nix;
|
||||
nix-misc = handleTest ./nix/misc.nix { };
|
||||
nix-upgrade = handleTest ./nix/upgrade.nix { inherit (pkgs) nixVersions; };
|
||||
nix-required-mounts = runTest ./nix-required-mounts;
|
||||
|
||||
+10
-28
@@ -1,14 +1,12 @@
|
||||
{ ... }:
|
||||
{
|
||||
system ? builtins.currentSystem,
|
||||
config ? { },
|
||||
pkgs ? import ../.. { inherit system config; },
|
||||
}:
|
||||
let
|
||||
inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest;
|
||||
shared =
|
||||
name = "nix-ld";
|
||||
|
||||
nodes.machine =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.runCommand "patched-hello" { } ''
|
||||
install -D -m755 ${pkgs.hello}/bin/hello $out/bin/hello
|
||||
@@ -16,25 +14,9 @@ let
|
||||
'')
|
||||
];
|
||||
};
|
||||
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")
|
||||
'';
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
machine.succeed("hello")
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -8,19 +8,17 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "nix-ld";
|
||||
version = "2.0.3";
|
||||
version = "2.0.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mic92";
|
||||
owner = "nix-community";
|
||||
repo = "nix-ld";
|
||||
rev = version;
|
||||
hash = "sha256-NRkLjdMtVfC6dD1gEbYZWFEtbmC2xfD6ft1IP7l76Vw=";
|
||||
hash = "sha256-ULoitJD5bMu0pFvh35cY5EEYywxj4e2fYOpqZwKB1lk=";
|
||||
};
|
||||
|
||||
patches = [ ./rust-1.83.patch ];
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-2CFdUZbKFl7cf6dik6XextuGG2vLM9oNS8rIyzLnfM4=";
|
||||
cargoHash = "sha256-cDbszVjZcomag0HZvXM+17SjDiGS07iPj78zgsXstHc=";
|
||||
|
||||
hardeningDisable = [ "stackprotector" ];
|
||||
|
||||
@@ -47,11 +45,11 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
passthru.tests = nixosTests.nix-ld;
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Run unpatched dynamic binaries on NixOS";
|
||||
homepage = "https://github.com/Mic92/nix-ld";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ mic92 ];
|
||||
platforms = platforms.linux;
|
||||
homepage = "https://github.com/nix-community/nix-ld";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ mic92 ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
--- a/src/arch.rs
|
||||
+++ b/src/arch.rs
|
||||
@@ -142,7 +142,7 @@ cfg_match! {
|
||||
|
||||
#[naked]
|
||||
unsafe extern "C" fn entry_trampoline() -> ! {
|
||||
- core::arch::asm!(
|
||||
+ core::arch::naked_asm!(
|
||||
"lea r10, [rip + {context}]",
|
||||
"mov r11, [r10 + {size} * 1]", // .env_entry
|
||||
"test r11, r11",
|
||||
@@ -153,7 +153,6 @@ cfg_match! {
|
||||
"jmp [rip + {context}]",
|
||||
context = sym TRAMPOLINE_CONTEXT,
|
||||
size = const core::mem::size_of::<*const u8>(),
|
||||
- options(noreturn),
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -162,7 +161,7 @@ cfg_match! {
|
||||
|
||||
#[naked]
|
||||
unsafe extern "C" fn entry_trampoline() -> ! {
|
||||
- core::arch::asm!(
|
||||
+ core::arch::naked_asm!(
|
||||
"adrp x8, {context}",
|
||||
"ldr x9, [x8, {env_entry_off}]", // .env_entry
|
||||
"cbz x9, 2f",
|
||||
@@ -174,7 +173,6 @@ cfg_match! {
|
||||
context = sym TRAMPOLINE_CONTEXT,
|
||||
env_entry_off = const TrampolineContext::ENV_ENTRY_OFFSET,
|
||||
env_string_off = const TrampolineContext::ENV_STRING_OFFSET,
|
||||
- options(noreturn),
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user