# build with: # nix-build --show-trace -E 'with import {}; callPackage ./default.nix { boost = boost.override { enableStatic = true; }; }' -K { stdenv, fetchFromGitHub, patchelf, cmake, boost }: let boostStatic = boost.override { enableStatic = true; }; in stdenv.mkDerivation rec { version = "master"; name = "nheqminer-${version}"; src = fetchFromGitHub { owner = "nicehash"; repo = "nheqminer"; rev = "b9900ff8e3c6f8e5a46af18db454f2a2082d9f46"; sha256 = "06alzgpbwhhavqgin7ds8aza7skhnh8pcz6hqwsj5db6160c6hr5"; }; NIX_LDFLAGS="-lpthread"; cmakeFlags = [ "-DBOOST_LIBRARYDIR=${boostStatic.out}/lib" "-DUSE_CUDA_DJEZO=OFF" ]; buildInputs = [ cmake boost ]; preConfigure = '' pushd cpu_xenoncat/asm_linux chmod +x fasm bash assemble.sh popd # the installer looks for this relative path mkdir -p nheqminer/cpu_xenoncat/asm_linux ln -sf $(pwd)/cpu_xenoncat/asm_linux/equihash_avx1.o nheqminer/cpu_xenoncat/asm_linux/equihash_avx1.o ln -sf $(pwd)/cpu_xenoncat/asm_linux/equihash_avx2.o nheqminer/cpu_xenoncat/asm_linux/equihash_avx2.o ''; postInstall = '' echo "Running postInstall phase" pwd mkdir -p $out/bin cp nheqminer $out/bin/ ''; }