nixpkgs/pkgs/development/libraries/ethash/default.nix
Daniël de Kok 142a041d39 ethash: remove buildInputs
When reviewing #98054, I noticed that this package has a bunch of
buildInputs that are unused. There are no references to OpenCL, mesa,
boost, cryptopp, or openmpi in the source code. The package compiles
fine with these buildInputs removed.
2020-09-30 19:27:53 +02:00

48 lines
1.1 KiB
Nix

{ stdenv, fetchFromGitHub, cmake, gbenchmark, gtest }:
stdenv.mkDerivation rec {
pname = "ethash";
version = "0.5.2";
src =
fetchFromGitHub {
owner = "chfast";
repo = "ethash";
rev = "v${version}";
sha256 = "0shr3m33raxy9j2mpm3q9mdbchs3nhgfaywidyxgmwqaiw1xpyif";
};
nativeBuildInputs = [
cmake
];
checkInputs = [
gbenchmark
gtest
];
#preConfigure = ''
# sed -i 's/GTest::main//' test/unittests/CMakeLists.txt
# cat test/unittests/CMakeLists.txt
# ln -sfv ${gtest.src}/googletest gtest
#'';
# NOTE: disabling tests due to gtest issue
cmakeFlags = [
"-DHUNTER_ENABLED=OFF"
"-DETHASH_BUILD_TESTS=OFF"
#"-Dbenchmark_DIR=${gbenchmark}/lib/cmake/benchmark"
#"-DGTest_DIR=${gtest.dev}/lib/cmake/GTest"
#"-DGTest_DIR=${gtest.src}/googletest"
#"-DCMAKE_PREFIX_PATH=${gtest.dev}/lib/cmake"
];
meta = with stdenv.lib; {
description = "PoW algorithm for Ethereum 1.0 based on Dagger-Hashimoto";
homepage = "https://github.com/ethereum/ethash";
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ nand0p ];
license = licenses.asl20;
};
}