From d7fb15024fd2afffbd03b525937103f9d9e526f8 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Thu, 28 Mar 2019 21:30:13 -0700 Subject: [PATCH 1/4] Bump patchelf to 0.10 This release contains three years of bug fixes and improvements. --- pkgs/development/tools/misc/patchelf/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/misc/patchelf/default.nix b/pkgs/development/tools/misc/patchelf/default.nix index 77d03f299f4..355d3979822 100644 --- a/pkgs/development/tools/misc/patchelf/default.nix +++ b/pkgs/development/tools/misc/patchelf/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl }: stdenv.mkDerivation rec { - name = "patchelf-0.9"; + name = "patchelf-0.10"; src = fetchurl { url = "https://nixos.org/releases/patchelf/${name}/${name}.tar.bz2"; - sha256 = "a0f65c1ba148890e9f2f7823f4bedf7ecad5417772f64f994004f59a39014f83"; + sha256 = "1wzwvnlyf853hw9zgqq5522bvf8gqadk8icgqa41a5n7593csw7n"; }; setupHook = [ ./setup-hook.sh ]; From f345dc1dadfc28119080f43f215ecb7ac80d26d4 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Mon, 1 Apr 2019 07:26:03 -0700 Subject: [PATCH 2/4] Bump patchelfUnstable to 0.10 This is to reflect the bump for regular version. We are leaving patchelfUnstable b/c in the future we may need it to get the very latest patches to patchelf again. --- pkgs/development/tools/misc/patchelf/unstable.nix | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/pkgs/development/tools/misc/patchelf/unstable.nix b/pkgs/development/tools/misc/patchelf/unstable.nix index c673bd26109..401380b8301 100644 --- a/pkgs/development/tools/misc/patchelf/unstable.nix +++ b/pkgs/development/tools/misc/patchelf/unstable.nix @@ -1,14 +1,12 @@ -{ stdenv, fetchFromGitHub, autoreconfHook }: +{ stdenv, fetchurl, autoreconfHook }: stdenv.mkDerivation rec { - pname = "patchelf"; - version = "0.10-pre-20190328"; + name = "patchelf-${version}"; + version = "0.10"; - src = fetchFromGitHub { - owner = "NixOS"; - repo = "patchelf"; - rev = "e1e39f3639e39360ceebb2f7ed533cede4623070"; - sha256 = "09q1b1yqfzg1ih51v7qjh55vxfdbd8x5anycl8sfz6qy107wr02k"; + src = fetchurl { + url = "https://nixos.org/releases/patchelf/${name}/${name}.tar.bz2"; + sha256 = "1wzwvnlyf853hw9zgqq5522bvf8gqadk8icgqa41a5n7593csw7n"; }; # Drop test that fails on musl (?) From 0611b32e9250fd47c0fb8ef59645381d4c9a6f2a Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Mon, 1 Apr 2019 09:28:55 -0700 Subject: [PATCH 3/4] patchelf: fixed tests for musl The recipe is copied from patchelfUnstable. --- .../development/tools/misc/patchelf/default.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/misc/patchelf/default.nix b/pkgs/development/tools/misc/patchelf/default.nix index 355d3979822..db8bb4f4243 100644 --- a/pkgs/development/tools/misc/patchelf/default.nix +++ b/pkgs/development/tools/misc/patchelf/default.nix @@ -1,16 +1,27 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl, autoreconfHook }: stdenv.mkDerivation rec { - name = "patchelf-0.10"; + name = "patchelf-${version}"; + version = "0.10"; src = fetchurl { url = "https://nixos.org/releases/patchelf/${name}/${name}.tar.bz2"; sha256 = "1wzwvnlyf853hw9zgqq5522bvf8gqadk8icgqa41a5n7593csw7n"; }; + # Drop test that fails on musl (?) + postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' + substituteInPlace tests/Makefile.am \ + --replace "set-rpath-library.sh" "" + ''; + setupHook = [ ./setup-hook.sh ]; - doCheck = false; # fails 8 out of 24 tests, problems when loading libc.so.6 + nativeBuildInputs = [ autoreconfHook ]; + buildInputs = [ ]; + + # if not Musl, fails 8 out of 25 tests, problems when loading libc.so.6 + doCheck = stdenv.hostPlatform.isMusl; meta = with stdenv.lib; { homepage = https://nixos.org/patchelf.html; From 59bed0a7b3248b8cf5a174097508fdf35988a4ef Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Mon, 1 Apr 2019 13:44:47 -0700 Subject: [PATCH 4/4] Adjust patchelfUnstable to patchelf derivation layout --- pkgs/development/tools/misc/patchelf/unstable.nix | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pkgs/development/tools/misc/patchelf/unstable.nix b/pkgs/development/tools/misc/patchelf/unstable.nix index 401380b8301..f5ff1c74bcc 100644 --- a/pkgs/development/tools/misc/patchelf/unstable.nix +++ b/pkgs/development/tools/misc/patchelf/unstable.nix @@ -13,10 +13,6 @@ stdenv.mkDerivation rec { postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' substituteInPlace tests/Makefile.am \ --replace "set-rpath-library.sh" "" - '' + - # extend version identifier to more informative than "0.10". - '' - echo -n ${version} > version ''; setupHook = [ ./setup-hook.sh ]; @@ -26,11 +22,11 @@ stdenv.mkDerivation rec { doCheck = !stdenv.isDarwin; - meta = { + meta = with stdenv.lib; { homepage = https://nixos.org/patchelf.html; - license = "GPL"; + license = licenses.gpl3; description = "A small utility to modify the dynamic linker and RPATH of ELF executables"; - maintainers = [ stdenv.lib.maintainers.eelco ]; - platforms = stdenv.lib.platforms.all; + maintainers = [ maintainers.eelco ]; + platforms = platforms.all; }; }