nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 autoreconfHook,
5 fetchFromGitHub,
6 unstableGitUpdater,
7}:
8
9stdenv.mkDerivation {
10 pname = "patchelf";
11 version = "0.18.0-unstable-2025-08-13";
12
13 src = fetchFromGitHub {
14 owner = "NixOS";
15 repo = "patchelf";
16 rev = "b49de1b3384e7928bf0df9a889fe5a4e7b3fbddf";
17 sha256 = "sha256-0AGK+ZPZDc7zTVAmG6jAAynQhh4nP8skVwOEV5hZKh0=";
18 };
19
20 # Drop test that fails on musl (?)
21 postPatch = lib.optionalString stdenv.hostPlatform.isMusl ''
22 substituteInPlace tests/Makefile.am \
23 --replace "set-rpath-library.sh" ""
24 '';
25
26 setupHook = [ ./setup-hook.sh ];
27
28 nativeBuildInputs = [ autoreconfHook ];
29 buildInputs = [ ];
30
31 doCheck = !stdenv.hostPlatform.isDarwin;
32
33 passthru = {
34 updateScript = unstableGitUpdater {
35 url = "https://github.com/NixOS/patchelf.git";
36 };
37 };
38
39 meta = {
40 homepage = "https://github.com/NixOS/patchelf";
41 license = lib.licenses.gpl3;
42 description = "Small utility to modify the dynamic linker and RPATH of ELF executables";
43 mainProgram = "patchelf";
44 maintainers = [ ];
45 platforms = lib.platforms.all;
46 };
47}