1 { lib, stdenv, fetchurl, autoreconfHook, fetchFromGitHub, unstableGitUpdater }:
3 stdenv.mkDerivation rec {
5 version = "unstable-2024-01-15";
7 src = fetchFromGitHub {
10 rev = "7c2f768bf9601268a4e71c2ebe91e2011918a70f";
11 sha256 = "sha256-PPXqKY2hJng4DBVE0I4xshv/vGLUskL7jl53roB8UdU=";
14 # Drop test that fails on musl (?)
15 postPatch = lib.optionalString stdenv.hostPlatform.isMusl ''
16 substituteInPlace tests/Makefile.am \
17 --replace "set-rpath-library.sh" ""
20 setupHook = [ ./setup-hook.sh ];
22 nativeBuildInputs = [ autoreconfHook ];
25 doCheck = !stdenv.isDarwin;
28 updateScript = unstableGitUpdater {
29 url = "https://github.com/NixOS/patchelf.git";
34 homepage = "https://github.com/NixOS/patchelf";
35 license = licenses.gpl3;
36 description = "A small utility to modify the dynamic linker and RPATH of ELF executables";
37 mainProgram = "patchelf";
38 maintainers = [ maintainers.eelco ];
39 platforms = platforms.all;