Merge pull request #109838 from noneucat/fix/ethminer

This commit is contained in:
Sandro 2021-06-05 16:52:34 +02:00 committed by GitHub
commit d01dd5444d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 10 deletions

View file

@ -147,6 +147,10 @@ stdenv.mkDerivation rec {
mkdir -p $out/nix-support
echo "cmakeFlags+=' -DCUDA_TOOLKIT_ROOT_DIR=$out'" >> $out/nix-support/setup-hook
# Set the host compiler to be used by nvcc for CMake-based projects:
# https://cmake.org/cmake/help/latest/module/FindCUDA.html#input-variables
echo "cmakeFlags+=' -DCUDA_HOST_COMPILER=${gcc}/bin'" >> $out/nix-support/setup-hook
# Move some libraries to the lib output so that programs that
# depend on them don't pull in this entire monstrosity.
mkdir -p $lib/lib

View file

@ -1,7 +1,6 @@
{
lib,
stdenv,
clangStdenv,
fetchFromGitHub,
opencl-headers,
cmake,
@ -17,13 +16,9 @@
openssl,
pkg-config,
cli11
}@args:
}:
# Note that this requires clang < 9.0 to build, and currently
# clangStdenv provides clang 7.1 which satisfies the requirement.
let stdenv = if cudaSupport then clangStdenv else args.stdenv;
in stdenv.mkDerivation rec {
stdenv.mkDerivation rec {
pname = "ethminer";
version = "0.19.0";
@ -43,9 +38,11 @@ in stdenv.mkDerivation rec {
"-DAPICORE=ON"
"-DETHDBUS=OFF"
"-DCMAKE_BUILD_TYPE=Release"
] ++ lib.optionals (!cudaSupport) [
] ++ (if cudaSupport then [
"-DCUDA_PROPAGATE_HOST_FLAGS=off"
] else [
"-DETHASHCUDA=OFF" # on by default
];
]);
nativeBuildInputs = [
cmake
@ -81,6 +78,5 @@ in stdenv.mkDerivation rec {
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ atemu ];
license = licenses.gpl3Only;
broken = cudaSupport;
};
}