summaryrefslogtreecommitdiffstats
path: root/jeschli/2configs/own-pkgs/hopper/default.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2019-11-12 19:18:31 +0100
committertv <tv@krebsco.de>2019-11-12 19:18:31 +0100
commiteaefd713c281e8802e4ff902b35a17b8b39f2b16 (patch)
treeed7521ae3c0c49dce87045c213618179042174ae /jeschli/2configs/own-pkgs/hopper/default.nix
parent46cdc3ed4238965553d734b614b212fd96cba447 (diff)
parent4b5e3cbc6155ee807a9b6c474972df3e4fcd237b (diff)
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'jeschli/2configs/own-pkgs/hopper/default.nix')
-rw-r--r--jeschli/2configs/own-pkgs/hopper/default.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/jeschli/2configs/own-pkgs/hopper/default.nix b/jeschli/2configs/own-pkgs/hopper/default.nix
new file mode 100644
index 000000000..569fc6aaf
--- /dev/null
+++ b/jeschli/2configs/own-pkgs/hopper/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, fetchurl, pkgs, makeWrapper, lib }:
+
+stdenv.mkDerivation rec {
+ name = "${pname}-${version}";
+ pname = "hopper";
+ version = "4.5.16";
+ rev = "v${lib.versions.major version}";
+
+ src = fetchurl {
+ url = "https://d2ap6ypl1xbe4k.cloudfront.net/Hopper-${rev}-${version}-Linux.pkg.tar.xz";
+ sha256 = "0gjnn7f6ibfx46k4bbj8ra7k04s0mrpq7316brgzks6x5yd1m584";
+ };
+
+ sourceRoot = ".";
+
+ ldLibraryPath = with pkgs; stdenv.lib.makeLibraryPath [
+libbsd.out libffi.out gmpxx.out python27Full.out python27Packages.libxml2.out qt5.qtbase zlib xlibs.libX11.out xorg_sys_opengl.out xlibs.libXrender.out gcc-unwrapped.lib
+ ];
+
+ nativeBuildInputs = [ makeWrapper ];
+
+ installPhase = ''
+ mkdir -p $out/bin
+ mkdir -p $out/lib
+ mkdir -p $out/share
+ cp $sourceRoot/opt/hopper-${rev}/bin/Hopper $out/bin/hopper
+ cp -r $sourceRoot/opt/hopper-${rev}/lib $out
+ cp -r $sourceRoot/usr/share $out/share
+ patchelf \
+ --set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 \
+ $out/bin/hopper
+ # Details: https://nixos.wiki/wiki/Qt
+ wrapProgram $out/bin/hopper \
+ --suffix LD_LIBRARY_PATH : ${ldLibraryPath} \
+ --suffix QT_PLUGIN_PATH : ${pkgs.qt5.qtbase}/lib/qt-${pkgs.qt5.qtbase.qtCompatVersion}/plugins
+ '';
+
+ meta = {
+ homepage = "https://www.hopperapp.com/index.html";
+ description = "A macOS and Linux Disassembler";
+ license = stdenv.lib.licenses.unfree;
+ maintainers = [ stdenv.lib.maintainers.luis ];
+ platforms = stdenv.lib.platforms.linux;
+ };
+}