about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/misc/patchelf/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/misc/patchelf/default.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/misc/patchelf/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/misc/patchelf/default.nix b/nixpkgs/pkgs/development/tools/misc/patchelf/default.nix
new file mode 100644
index 000000000000..c1e283ece129
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/misc/patchelf/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl }:
+
+# Note: this package is used for bootstrapping fetchurl, and thus
+# cannot use fetchpatch! All mutable patches (generated by GitHub or
+# cgit) that are needed here should be included directly in Nixpkgs as
+# files.
+
+stdenv.mkDerivation rec {
+  pname = "patchelf";
+  version = "0.13";
+
+  src = fetchurl {
+    url = "https://github.com/NixOS/${pname}/releases/download/${version}/${pname}-${version}.tar.bz2";
+    sha256 = "1v8px6g0zvhfxqa1inmdqfj4gc8dm70x7874hri4s48szjyd8zjc";
+  };
+
+  setupHook = [ ./setup-hook.sh ];
+
+  # fails 8 out of 24 tests, problems when loading libc.so.6
+  doCheck = stdenv.name == "stdenv-linux";
+
+  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;
+  };
+}