mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 13:43:22 +00:00
4a7f99d55d
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
37 lines
1010 B
Nix
37 lines
1010 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 : ${stdenv.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" ];
|
|
};
|
|
}
|