python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / hotpatch / default.nix
blob84803159a2b3cb46597bca73775bb806060a950d
1 { lib, stdenv, fetchFromGitHub, cmake }:
3 stdenv.mkDerivation rec {
4   pname = "hotpatch";
5   version = "0.2";
7   src = fetchFromGitHub {
8     owner = "vikasnkumar";
9     repo = "hotpatch";
10     rev = "4b65e3f275739ea5aa798d4ad083c4cb10e29149";
11     sha256 = "169vdh55wsbn6fl58lpzqx64v6ifzh7krykav33x1d9hsk98qjqh";
12   };
14   doCheck = true;
16   nativeBuildInputs = [ cmake ];
18   preConfigure = ''
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)"
24   '';
26   checkPhase = ''
27     LD_LIBRARY_PATH=$(pwd)/src make test
28   '';
30   meta = with lib; {
31     description = "Hot patching executables on Linux using .so file injection";
32     homepage = src.meta.homepage;
33     license = licenses.bsd3;
34     maintainers = [ ];
35     platforms = ["i686-linux" "x86_64-linux"];
36   };