Change:
sha256 = "0p846q1l66k3rnd512sncp26zpv411b8ahi145sghfcsz9w8abc4"; }; <del> postPatch = '' for f in Makefile.linux ../UniversalDetector/Makefile.linux ; do substituteInPlace $f  --replace "= gcc" "=${stdenv.cc.targetPrefix}cc"  --replace "= g++" "=${stdenv.cc.targetPrefix}c++"  --replace "-DGNU_RUNTIME=1" ""  --replace "-fgnu-runtime" "-fobjc-nonfragile-abi" done </del> <ins> postPatch = if stdenv.isDarwin then '' substituteInPlace "./XADMaster.xcodeproj/project.pbxproj"  --replace "libstdc++.6.dylib" "libc++.1.dylib" '' else '' for f in Makefile.linux ../UniversalDetector/Makefile.linux ; do substituteInPlace $f  --replace "= gcc" "=${stdenv.cc.targetPrefix}cc"  --replace "= g++" "=${stdenv.cc.targetPrefix}c++"  --replace "-DGNU_RUNTIME=1" ""  --replace "-fgnu-runtime" "-fobjc-nonfragile-abi" done </ins> <del> # we need to build inside this directory as well, so we have to make it writeable chmod +w ../UniversalDetector -R ''; </del> <ins> # we need to build inside this directory as well, so we have to make it writeable chmod +w ../UniversalDetector -R ''; </ins> <del> buildInputs = [ gnustep.base bzip2 icu openssl wavpack zlib ]; </del> <ins> buildInputs = [ bzip2 icu openssl wavpack zlib ] ++ lib.optionals stdenv.isLinux [ gnustep.base ] ++ lib.optionals stdenv.isDarwin [ Foundation AppKit ]; </ins> <del> nativeBuildInputs = [ gnustep.make installShellFiles ]; </del> <ins> nativeBuildInputs = [ installShellFiles ] ++ lib.optionals stdenv.isLinux [ gnustep.make ] ++ lib.optionals stdenv.isDarwin [ xcbuildHook ]; xcbuildFlags = lib.optionals stdenv.isDarwin [ "-target unar" "-target lsar" "-configuration Release" "MACOSX_DEPLOYMENT_TARGET=10.12" # Fix "ld: file not found: /nix/store/*-clang-7.1.0/lib/arc/libarclite_macosx." error # Disabling ARC may leak memory, however since this program is generally not used for # long periods of time, it shouldn't be an issue "CLANG_LINK_OBJC_RUNTIME=NO" ]; makefile = lib.optionalString (!stdenv.isDarwin) "Makefile.linux"; </ins> enableParallelBuilding = true; dontConfigure = true; <del> makefile = "Makefile.linux"; </del> sourceRoot = "./source/XADMaster"; installPhase = '' runHook preInstall <del> install -Dm555 -t $out/bin lsar unar </del> <ins> install -Dm555 -t $out/bin ${lib.optionalString stdenv.isDarwin "Products/Release/"}{lsar,unar} </ins> for f in lsar unar; do installManPage ./Extra/$f.? installShellCompletion --bash --name $f ./Extra/$f.bash_completion

Discussion:
Sadly doesn't build on macOS right now, so we can't use this on macOS. If someone could make work on macOS, it would be great. I did try to do it here but could get it to fix the link issue: Originally posted by in
If someone wants to know what is the link error I am getting, here is the build log: The error: As far I understand from searching, is proprietary so we can't link to it directly. Still, I am really curious on why it is trying to build with ARC enabled since I am not passing as parameter to .
Have you tried passing ?
Not sure how to pass it, I tried this: Same error.
To make it clear: it doesn't seem that is picking this option. Searching from my buffer if it was being passed I didn't found any references for .
Here is a tip: you can check compiler flags by passing to
It does seem to be passing it, but linker still tries to link with . I also tried this. Same thing:
This works here:
Thanks Finally it works. Just doing some checks and clean-up and I am going to open a PR.
Maybe we should use Text API files, similar to what we do when linking against ?