1 { lib, stdenv, fetchurl }:
3 # Note: this package is used for bootstrapping fetchurl, and thus
4 # cannot use fetchpatch! All mutable patches (generated by GitHub or
5 # cgit) that are needed here should be included directly in Nixpkgs as
8 stdenv.mkDerivation rec {
13 url = "https://github.com/NixOS/${pname}/releases/download/${version}/${pname}-${version}.tar.bz2";
14 sha256 = "sha256-9ANtPuTY4ijewb7/8PbkbYpA6eVw4AaOOdd+YuLIvcI=";
19 setupHook = [ ./setup-hook.sh ];
21 enableParallelBuilding = true;
23 # fails 8 out of 24 tests, problems when loading libc.so.6
24 doCheck = stdenv.name == "stdenv-linux"
25 # test scripts require unprefixed bintools binaries
26 # https://github.com/NixOS/patchelf/issues/417
27 && stdenv.cc.targetPrefix == "";
30 homepage = "https://github.com/NixOS/patchelf";
31 license = licenses.gpl3Plus;
32 description = "A small utility to modify the dynamic linker and RPATH of ELF executables";
33 mainProgram = "patchelf";
34 maintainers = [ maintainers.eelco ];
35 platforms = platforms.all;