about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/misc/patchelf/unstable.nix
blob: 740015dbe98441d2c30e55552baa89849c95235f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ lib, stdenv, fetchurl, autoreconfHook, fetchFromGitHub }:

stdenv.mkDerivation rec {
  name = "patchelf-${version}";
  version = "2021-11-16";

  src = fetchFromGitHub {
    owner = "NixOS";
    repo = "patchelf";
    rev = "a174cf3006baf31e0e9eaa62bc9adead93af63f7";
    sha256 = "sha256-cKZ4DE70R5XiIqfnIVAl2s7a1bJxaaPpuCmxs3pxFRU=";
  };

  # Drop test that fails on musl (?)
  postPatch = lib.optionalString stdenv.hostPlatform.isMusl ''
    substituteInPlace tests/Makefile.am \
      --replace "set-rpath-library.sh" ""
  '';

  setupHook = [ ./setup-hook.sh ];

  nativeBuildInputs = [ autoreconfHook ];
  buildInputs = [ ];

  doCheck = !stdenv.isDarwin;

  meta = with lib; {
    homepage = "https://github.com/NixOS/patchelf";
    license = licenses.gpl3;
    description = "A small utility to modify the dynamic linker and RPATH of ELF executables";
    maintainers = [ maintainers.eelco ];
    platforms = platforms.all;
  };
}