nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

nix-ld: 2.0.3 -> 2.0.4 (#399334)

authored by

Jörg Thalheim and committed by
GitHub
7169b5d6 455beb1a

+21 -77
+1 -1
nixos/modules/programs/nix-ld.nix
··· 22 22 { 23 23 meta.maintainers = [ lib.maintainers.mic92 ]; 24 24 options.programs.nix-ld = { 25 - enable = lib.mkEnableOption ''nix-ld, Documentation: <https://github.com/Mic92/nix-ld>''; 25 + enable = lib.mkEnableOption ''nix-ld, Documentation: <https://github.com/nix-community/nix-ld>''; 26 26 package = lib.mkPackageOption pkgs "nix-ld" { }; 27 27 libraries = lib.mkOption { 28 28 type = lib.types.listOf lib.types.package;
+1 -1
nixos/tests/all-tests.nix
··· 914 914 nifi = runTestOn [ "x86_64-linux" ] ./web-apps/nifi.nix; 915 915 nitter = handleTest ./nitter.nix { }; 916 916 nix-config = handleTest ./nix-config.nix { }; 917 - nix-ld = handleTest ./nix-ld.nix { }; 917 + nix-ld = runTest ./nix-ld.nix; 918 918 nix-misc = handleTest ./nix/misc.nix { }; 919 919 nix-upgrade = handleTest ./nix/upgrade.nix { inherit (pkgs) nixVersions; }; 920 920 nix-required-mounts = runTest ./nix-required-mounts;
+10 -28
nixos/tests/nix-ld.nix
··· 1 + { ... }: 1 2 { 2 - system ? builtins.currentSystem, 3 - config ? { }, 4 - pkgs ? import ../.. { inherit system config; }, 5 - }: 6 - let 7 - inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest; 8 - shared = 3 + name = "nix-ld"; 4 + 5 + nodes.machine = 9 6 { config, pkgs, ... }: 10 7 { 11 8 programs.nix-ld.enable = true; 9 + 12 10 environment.systemPackages = [ 13 11 (pkgs.runCommand "patched-hello" { } '' 14 12 install -D -m755 ${pkgs.hello}/bin/hello $out/bin/hello ··· 14 16 '') 15 17 ]; 16 18 }; 17 - in 18 - { 19 - nix-ld = makeTest { 20 - name = "nix-ld"; 21 - nodes.machine = shared; 22 - testScript = '' 23 - start_all() 24 - machine.succeed("hello") 25 - ''; 26 - }; 27 - nix-ld-rs = makeTest { 28 - name = "nix-ld-rs"; 29 - nodes.machine = { 30 - imports = [ shared ]; 31 - programs.nix-ld.package = pkgs.nix-ld-rs; 32 - }; 33 - testScript = '' 34 - start_all() 35 - machine.succeed("hello") 36 - ''; 37 - }; 19 + 20 + testScript = '' 21 + start_all() 22 + machine.succeed("hello") 23 + ''; 38 24 }
+9 -11
pkgs/by-name/ni/nix-ld/package.nix
··· 8 8 9 9 rustPlatform.buildRustPackage rec { 10 10 pname = "nix-ld"; 11 - version = "2.0.3"; 11 + version = "2.0.4"; 12 12 13 13 src = fetchFromGitHub { 14 - owner = "mic92"; 14 + owner = "nix-community"; 15 15 repo = "nix-ld"; 16 16 rev = version; 17 - hash = "sha256-NRkLjdMtVfC6dD1gEbYZWFEtbmC2xfD6ft1IP7l76Vw="; 17 + hash = "sha256-ULoitJD5bMu0pFvh35cY5EEYywxj4e2fYOpqZwKB1lk="; 18 18 }; 19 19 20 - patches = [ ./rust-1.83.patch ]; 21 - 22 20 useFetchCargoVendor = true; 23 - cargoHash = "sha256-2CFdUZbKFl7cf6dik6XextuGG2vLM9oNS8rIyzLnfM4="; 21 + cargoHash = "sha256-cDbszVjZcomag0HZvXM+17SjDiGS07iPj78zgsXstHc="; 24 22 25 23 hardeningDisable = [ "stackprotector" ]; 26 24 ··· 45 47 46 48 passthru.tests = nixosTests.nix-ld; 47 49 48 - meta = with lib; { 50 + meta = { 49 51 description = "Run unpatched dynamic binaries on NixOS"; 50 - homepage = "https://github.com/Mic92/nix-ld"; 51 - license = licenses.mit; 52 - maintainers = with maintainers; [ mic92 ]; 53 - platforms = platforms.linux; 52 + homepage = "https://github.com/nix-community/nix-ld"; 53 + license = lib.licenses.mit; 54 + maintainers = with lib.maintainers; [ mic92 ]; 55 + platforms = lib.platforms.linux; 54 56 }; 55 57 }
-36
pkgs/by-name/ni/nix-ld/rust-1.83.patch
··· 1 - --- a/src/arch.rs 2 - +++ b/src/arch.rs 3 - @@ -142,7 +142,7 @@ cfg_match! { 4 - 5 - #[naked] 6 - unsafe extern "C" fn entry_trampoline() -> ! { 7 - - core::arch::asm!( 8 - + core::arch::naked_asm!( 9 - "lea r10, [rip + {context}]", 10 - "mov r11, [r10 + {size} * 1]", // .env_entry 11 - "test r11, r11", 12 - @@ -153,7 +153,6 @@ cfg_match! { 13 - "jmp [rip + {context}]", 14 - context = sym TRAMPOLINE_CONTEXT, 15 - size = const core::mem::size_of::<*const u8>(), 16 - - options(noreturn), 17 - ) 18 - } 19 - } 20 - @@ -162,7 +161,7 @@ cfg_match! { 21 - 22 - #[naked] 23 - unsafe extern "C" fn entry_trampoline() -> ! { 24 - - core::arch::asm!( 25 - + core::arch::naked_asm!( 26 - "adrp x8, {context}", 27 - "ldr x9, [x8, {env_entry_off}]", // .env_entry 28 - "cbz x9, 2f", 29 - @@ -174,7 +173,6 @@ cfg_match! { 30 - context = sym TRAMPOLINE_CONTEXT, 31 - env_entry_off = const TrampolineContext::ENV_ENTRY_OFFSET, 32 - env_string_off = const TrampolineContext::ENV_STRING_OFFSET, 33 - - options(noreturn), 34 - ) 35 - } 36 - }