ethminer: do not propagate host flags to nvcc and remove clang stdenv dependency

This commit is contained in:
Andy Chun @noneucat 2021-01-18 13:35:11 -08:00
parent fe42dee030
commit cf42508bbd

View file

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