nixpkgs/pkgs/tools/misc/cpuminer-multi/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

35 lines
955 B
Nix

{ lib, stdenv, fetchFromGitHub, curl, jansson, autoconf, automake
, aesni ? stdenv.hostPlatform.aesSupport }:
let
rev = "8393e03089c0abde61bd5d72aba8f926c3d6eca4";
date = "20160316";
in
stdenv.mkDerivation {
name = "cpuminer-multi-${date}-${stdenv.lib.strings.substring 0 7 rev}";
src = fetchFromGitHub {
owner = "hyc";
repo = "cpuminer-multi";
inherit rev;
sha256 = "11dg4rra4dgfb9x6q85irn0hrkx2lkwyrdpgdh10pag09s3vhy4v";
};
buildInputs = [ autoconf automake curl jansson ];
preConfigure = ''
./autogen.sh
'';
configureFlags = [ (if aesni then "--enable-aes-ni" else "--disable-aes-ni") ];
meta = with lib; {
description = "Multi-algo CPUMiner";
homepage = "https://github.com/wolf9466/cpuminer-multi";
license = licenses.gpl2;
maintainers = [ maintainers.ehmry ];
# does not build on i686 https://github.com/lucasjones/cpuminer-multi/issues/27
platforms = [ "x86_64-linux" ];
};
}