about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/minergate/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/misc/minergate/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/misc/minergate/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/misc/minergate/default.nix b/nixpkgs/pkgs/applications/misc/minergate/default.nix
new file mode 100644
index 000000000000..f6ec20b0df7e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/misc/minergate/default.nix
@@ -0,0 +1,36 @@
+{ fetchurl, lib, stdenv, dpkg, makeWrapper, fontconfig, freetype, openssl, xorg, xkeyboard_config }:
+
+stdenv.mkDerivation {
+  version = "8.1";
+  pname = "minergate";
+  src = fetchurl {
+    url = "https://minergate.com/download/ubuntu";
+    sha256 = "1dbbbb8e0735cde239fca9e82c096dcc882f6cecda20bba7c14720a614c16e13";
+  };
+
+  nativeBuildInputs = [ dpkg makeWrapper ];
+
+  phases = [ "installPhase" ];
+
+  installPhase = ''
+    dpkg-deb -x $src $out
+    pgm=$out/opt/minergate/minergate
+
+    interpreter=${stdenv.glibc}/lib/ld-linux-x86-64.so.2
+    patchelf --set-interpreter "$interpreter" $pgm
+
+    wrapProgram $pgm --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ fontconfig freetype openssl stdenv.cc.cc xorg.libX11 xorg.libxcb ]} --prefix "QT_XKB_CONFIG_ROOT" ":" "${xkeyboard_config}/share/X11/xkb"
+
+    rm $out/usr/bin/minergate
+    mkdir -p $out/bin
+    ln -s $out/opt/minergate/minergate $out/bin
+  '';
+
+  meta = with lib; {
+    description = "Minergate CPU/GPU mining software";
+    homepage = "https://www.minergate.com/";
+    license = licenses.unfree;
+    maintainers = with maintainers; [ bfortz ];
+    platforms = [ "x86_64-linux" ];
+};
+}