diff options
author | Brian McKenna <brian@brianmckenna.org> | 2016-07-25 14:12:29 +1000 |
---|---|---|
committer | Rok Garbas <rok@garbas.si> | 2016-07-25 06:12:29 +0200 |
commit | c816d053bcfae77d6d6533bd8c66cf75a8686bda (patch) | |
tree | 2087c6387a2778d7c66b9bffbfa8e01d1b5fd7ba /pkgs/development/mobile/genymotion | |
parent | 245168060372cf84ce34fae8af6402b948d33689 (diff) |
genymotion: init at 2.7.2 (#17203)
Diffstat (limited to 'pkgs/development/mobile/genymotion')
-rw-r--r-- | pkgs/development/mobile/genymotion/default.nix | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/pkgs/development/mobile/genymotion/default.nix b/pkgs/development/mobile/genymotion/default.nix new file mode 100644 index 000000000000..f21c25a60f7c --- /dev/null +++ b/pkgs/development/mobile/genymotion/default.nix @@ -0,0 +1,73 @@ +{ stdenv, requireFile, makeWrapper, which, zlib, mesa_noglu, glib, xorg, libxkbcommon +# For glewinfo +, libXmu, libXi, libXext }: + +let + packages = [ + stdenv.cc.cc zlib glib xorg.libX11 libxkbcommon libXmu libXi libXext + ]; + libPath = "${stdenv.lib.makeLibraryPath packages}:${mesa_noglu.driverLink}/lib"; +in +stdenv.mkDerivation rec { + name = "genymotion-${version}"; + version = "2.7.2"; + src = requireFile { + url = https://www.genymotion.com/account/login/; + name = "genymotion-${version}-linux_x64.bin"; + sha256 = "0j1dzry6wf6cw3yr318z81rmj79r6w5l6vpilm7m9h786jrgywa1"; + }; + + buildInputs = [ makeWrapper which ]; + + unpackPhase = '' + mkdir ${name} + echo "y" | sh $src -d ${name} + sourceRoot=${name} + ''; + + installPhase = '' + mkdir -p $out/bin $out/libexec + mv genymotion $out/libexec/ + ''; + + fixupPhase = '' + patchInterpreter() { + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + "$out/libexec/genymotion/$1" + } + + patchExecutable() { + patchInterpreter "$1" + makeWrapper "$out/libexec/genymotion/$1" "$out/bin/$1" \ + --set "LD_LIBRARY_PATH" "${libPath}" + } + + patchTool() { + patchInterpreter "tools/$1" + wrapProgram "$out/libexec/genymotion/tools/$1" \ + --set "LD_LIBRARY_PATH" "${libPath}" + } + + patchExecutable genymotion + patchExecutable player + + patchTool adb + patchTool aapt + patchTool glewinfo + + rm $out/libexec/genymotion/libxkbcommon* + ''; + + meta = { + description = "Fast and easy Android emulation"; + longDescription = '' + Genymotion is a relatively fast Android emulator which comes with + pre-configured Android (x86 with OpenGL hardware acceleration) images, + suitable for application testing. + ''; + homepage = https://www.genymotion.com/; + license = stdenv.lib.licenses.unfree; + platforms = stdenv.lib.platforms.linux; + maintainers = [ stdenv.lib.maintainers.puffnfresh ]; + }; +} |