1{ stdenv, fetchurl, curl, jansson, perl }:
2
3stdenv.mkDerivation rec {
4 name = "cpuminer-${version}";
5 version = "2.5.0";
6
7 src = fetchurl {
8 url = "mirror://sourceforge/cpuminer/pooler-${name}.tar.gz";
9 sha256 = "1xalrfrk5hvh1jh9kbqhib2an82ypd46vl9glaxhz3rbjld7c5pa";
10 };
11
12 patchPhase = if stdenv.cc.isClang then "${perl}/bin/perl ./nomacro.pl" else null;
13
14 buildInputs = [ curl jansson ];
15
16 configureFlags = [ "CFLAGS=-O3" ];
17
18 meta = with stdenv.lib; {
19 homepage = https://github.com/pooler/cpuminer;
20 description = "CPU miner for Litecoin and Bitcoin";
21 license = licenses.gpl2;
22 platforms = platforms.all;
23 maintainers = with maintainers; [ pSub ];
24 };
25}