11 stdenv = llvmPackages.libcxxStdenv;
15 version = "0-unstable-2018-05-02";
17 src = fetchFromGitHub {
20 rev = "464a90fdfd06a54c9da5d1a3725ed6229c0d3d60";
21 hash = "sha256-0N3+tr8XUsn3WhJNsPVknumBrfMgDawTEXVRkIs/IV8=";
25 substituteInPlace ld-mac.cc \
26 --replace-fail 'loadLibMac(mypath)' 'loadLibMac("${placeholder "out"}/lib/")' \
27 --replace-fail 'libCoreFoundation.so' '${opencflite}/lib/libCoreFoundation.so'
28 substituteInPlace libmac/stack_protector-obsd.c \
29 --replace-fail 'sys/sysctl.h' 'linux/sysctl.h'
42 env.NIX_CFLAGS_COMPILE = "-Wno-error=unused-command-line-argument";
47 install -vD libmac.so "$out/lib/libmac.so"
49 for bin in extract macho2elf ld-mac; do
50 install -vD "$bin" "$out/bin/$bin"
57 description = "Mach-O loader for Linux";
58 homepage = "https://github.com/shinh/maloader";
59 license = lib.licenses.bsd2;
60 maintainers = with lib.maintainers; [ wegank ];
61 inherit (opencflite.meta) platforms;