2021-01-21 18:00:13 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, gbenchmark, gtest }:
|
2019-03-21 22:42:26 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ethash";
|
2021-01-18 17:25:00 +01:00
|
|
|
version = "0.6.0";
|
2019-03-21 22:42:26 +01:00
|
|
|
|
|
|
|
src =
|
|
|
|
fetchFromGitHub {
|
|
|
|
owner = "chfast";
|
|
|
|
repo = "ethash";
|
|
|
|
rev = "v${version}";
|
2021-01-18 17:25:00 +01:00
|
|
|
sha256 = "sha256-N30v9OZwTmDbltPPmeSa0uOGJhos1VzyS5zY9vVCWfA=";
|
2019-03-21 22:42:26 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
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"
|
|
|
|
];
|
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2019-03-21 22:42:26 +01:00
|
|
|
description = "PoW algorithm for Ethereum 1.0 based on Dagger-Hashimoto";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/ethereum/ethash";
|
2021-03-08 15:56:33 +01:00
|
|
|
platforms = platforms.unix;
|
2021-05-14 16:00:41 +02:00
|
|
|
maintainers = with maintainers; [ ];
|
2019-03-21 22:42:26 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|