1 { lib, stdenv, fetchFromGitHub, cmake }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
10 rev = "4b65e3f275739ea5aa798d4ad083c4cb10e29149";
11 sha256 = "169vdh55wsbn6fl58lpzqx64v6ifzh7krykav33x1d9hsk98qjqh";
16 nativeBuildInputs = [ cmake ];
19 substituteInPlace test/loader.c \
20 --replace \"/lib64/ld-linux-x86-64.so.2 \""$(cat $NIX_CC/nix-support/dynamic-linker)" \
21 --replace \"/lib/ld-linux-x86-64.so.2 \""$(cat $NIX_CC/nix-support/dynamic-linker)" \
22 --replace \"/lib/ld-linux.so.2 \""$(cat $NIX_CC/nix-support/dynamic-linker)" \
23 --replace \"/lib32/ld-linux.so.2 \""$(cat $NIX_CC/nix-support/dynamic-linker)"
27 LD_LIBRARY_PATH=$(pwd)/src make test
31 description = "Hot patching executables on Linux using .so file injection";
32 homepage = src.meta.homepage;
33 license = licenses.bsd3;
35 platforms = ["i686-linux" "x86_64-linux"];