depot/third_party/nixpkgs/pkgs/applications/misc/minergate-cli/default.nix
Default email a5adf1ddd8 Project import generated by Copybara.
GitOrigin-RevId: b3616bd96400ce0252c241d76fcafb64389defc6
2021-01-15 23:18:51 +01:00

36 lines
1,003 B
Nix

{ fetchurl, lib, stdenv, dpkg, makeWrapper, openssl }:
stdenv.mkDerivation {
version = "8.2";
pname = "minergate-cli";
src = fetchurl {
url = "https://minergate.com/download/ubuntu-cli";
sha256 = "393c5ba236f6f92c449496fcda9509f4bfd3887422df98ffa59b3072124a99d8";
};
nativeBuildInputs = [ dpkg makeWrapper ];
phases = [ "installPhase" ];
installPhase = ''
dpkg-deb -x $src $out
pgm=$out/opt/minergate-cli/minergate-cli
interpreter=${stdenv.glibc}/lib/ld-linux-x86-64.so.2
patchelf --set-interpreter "$interpreter" $pgm
wrapProgram $pgm --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ openssl stdenv.cc.cc ]}
rm $out/usr/bin/minergate-cli
mkdir -p $out/bin
ln -s $pgm $out/bin
'';
meta = with lib; {
description = "Minergate CPU/GPU console client mining software";
homepage = "https://www.minergate.com/";
license = licenses.unfree;
maintainers = with maintainers; [ bfortz ];
platforms = [ "x86_64-linux" ];
};
}