catalyst-browser: init at 3.9.4 (#350552)
[NixPkgs.git] / pkgs / development / tools / analysis / hopper / default.nix
bloba3ceed9c43e0e0c868bcde7833f20eeeaee50e09
1 { stdenv
2 , fetchurl
3 , lib
4 , autoPatchelfHook
5 , wrapQtAppsHook
6 , gnustep
7 , libbsd
8 , libffi_3_3
9 , ncurses6
12 stdenv.mkDerivation rec {
13   pname = "hopper";
14   version = "5.5.3";
15   rev = "v4";
17   src = fetchurl {
18     url = "https://d2ap6ypl1xbe4k.cloudfront.net/Hopper-${rev}-${version}-Linux-demo.pkg.tar.xz";
19     hash = "sha256-xq9ZVg1leHm/tq6LYyQLa8p5dDwBd64Jt92uMoE0z58=";
20   };
22   sourceRoot = ".";
24   nativeBuildInputs = [
25     autoPatchelfHook
26     wrapQtAppsHook
27   ];
29   buildInputs = [
30     gnustep.libobjc
31     libbsd
32     libffi_3_3
33     ncurses6
34   ];
36   installPhase = ''
37     runHook preInstall
39     mkdir -p $out/bin
40     mkdir -p $out/lib
41     mkdir -p $out/share
43     cp $sourceRoot/opt/hopper-${rev}/bin/Hopper $out/bin/hopper
44     cp \
45       --archive \
46       $sourceRoot/opt/hopper-${rev}/lib/libBlocksRuntime.so* \
47       $sourceRoot/opt/hopper-${rev}/lib/libdispatch.so* \
48       $sourceRoot/opt/hopper-${rev}/lib/libgnustep-base.so* \
49       $sourceRoot/opt/hopper-${rev}/lib/libHopperCore.so* \
50       $sourceRoot/opt/hopper-${rev}/lib/libkqueue.so* \
51       $sourceRoot/opt/hopper-${rev}/lib/libobjcxx.so* \
52       $sourceRoot/opt/hopper-${rev}/lib/libpthread_workqueue.so* \
53       $out/lib
55     cp -r $sourceRoot/usr/share $out
57     runHook postInstall
58   '';
60   postFixup = ''
61     substituteInPlace "$out/share/applications/hopper-${rev}.desktop" \
62       --replace "Exec=/opt/hopper-${rev}/bin/Hopper" "Exec=$out/bin/hopper"
63   '';
65   meta = with lib; {
66     homepage = "https://www.hopperapp.com/index.html";
67     description = "MacOS and Linux Disassembler";
68     license = licenses.unfree;
69     maintainers = with maintainers; [
70       Enteee
71     ];
72     platforms = platforms.linux;
73   };