genymotion: refactor src from requireFile to fetchurl

The old src url was updated by the host, making the required file inaccessible. The new url links directly to the required file. This direct link allows us to use fetchurl rather than requireFile.

genymotion: refactor src url

Fixed revisions:
1) Uses `pname`.
2) URL uses version variable in path. Data type for `url` was changed from path to string.

genymotion: refactor src url

Removed redundant `name` definition.

fixed typo in URL

changed requireFile to fetchurl
This commit is contained in:
Alex Ameen 2019-05-27 00:46:05 -05:00 committed by baddecisionsalex
parent 9745c3b64a
commit 4b46acd498

View file

@ -1,4 +1,4 @@
{ stdenv, requireFile, makeWrapper, which, zlib, libGL, glib, xorg, libxkbcommon
{ stdenv, fetchurl, makeWrapper, which, zlib, libGL, glib, xorg, libxkbcommon
, xdg_utils
# For glewinfo
, libXmu, libXi, libXext }:
@ -10,10 +10,10 @@ let
libPath = "${stdenv.lib.makeLibraryPath packages}";
in
stdenv.mkDerivation rec {
name = "genymotion-${version}";
pname = "genymotion";
version = "2.8.0";
src = requireFile {
url = https://www.genymotion.com/download/;
src = fetchurl {
url = "https://dl.genymotion.com/releases/genymotion-${version}/genymotion-${version}-linux_x64.bin";
name = "genymotion-${version}-linux_x64.bin";
sha256 = "0lvfdlpmmsyq2i9gs4mf6a8fxkfimdr4rhyihqnfhjij3fzxz4lk";
};
@ -24,12 +24,12 @@ stdenv.mkDerivation rec {
mkdir -p phony-home $out/share/applications
export HOME=$TMP/phony-home
mkdir ${name}
echo "y" | sh $src -d ${name}
sourceRoot=${name}
mkdir ${pname}
echo "y" | sh $src -d ${pname}
sourceRoot=${pname}
substitute phony-home/.local/share/applications/genymobile-genymotion.desktop \
$out/share/applications/genymobile-genymotion.desktop --replace "$TMP/${name}" "$out/libexec"
$out/share/applications/genymobile-genymotion.desktop --replace "$TMP/${pname}" "$out/libexec"
'';
installPhase = ''