nixpkgs/pkgs/development/libraries/ethash/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, cmake, gbenchmark, gtest }:
stdenv.mkDerivation rec {
pname = "ethash";
2021-12-06 18:31:30 +00:00
version = "0.8.0";
src =
fetchFromGitHub {
owner = "chfast";
repo = "ethash";
rev = "v${version}";
2021-12-06 18:31:30 +00:00
sha256 = "sha256-4SJk4niSpLPjymwTCD0kHOrqpMf+vE3J/O7DiffUSJ4=";
};
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 lib; {
description = "PoW algorithm for Ethereum 1.0 based on Dagger-Hashimoto";
homepage = "https://github.com/ethereum/ethash";
2021-03-08 14:56:33 +00:00
platforms = platforms.unix;
maintainers = with maintainers; [ ];
license = licenses.asl20;
};
}