summary refs log tree commit diff
diff options
context:
space:
mode:
authorRick van Schijndel <Mindavi@users.noreply.github.com>2022-05-05 21:19:10 +0200
committerGitHub <noreply@github.com>2022-05-05 21:19:10 +0200
commitcce50c11ef0543d6cac071300d56490581db57e4 (patch)
tree1a1bc73e0ea989481c77c568acc93db5a6181471
parentaefe9741c83138af358ec15582dbe4d82e2b3515 (diff)
parent0d03ca8d0cda430b5dd50f5c421ad10a7ca218ea (diff)
downloadnixpkgs-cce50c11ef0543d6cac071300d56490581db57e4.tar
nixpkgs-cce50c11ef0543d6cac071300d56490581db57e4.tar.gz
nixpkgs-cce50c11ef0543d6cac071300d56490581db57e4.tar.bz2
nixpkgs-cce50c11ef0543d6cac071300d56490581db57e4.tar.lz
nixpkgs-cce50c11ef0543d6cac071300d56490581db57e4.tar.xz
nixpkgs-cce50c11ef0543d6cac071300d56490581db57e4.tar.zst
nixpkgs-cce50c11ef0543d6cac071300d56490581db57e4.zip
Merge pull request #169857 from armeenm/bump-hopper
hopper: 4.5.29 -> 5.5.3; libffi_3_3: init
-rw-r--r--maintainers/maintainer-list.nix6
-rw-r--r--pkgs/development/libraries/libffi/3.3.nix64
-rw-r--r--pkgs/development/tools/analysis/hopper/default.nix28
-rw-r--r--pkgs/top-level/all-packages.nix1
4 files changed, 83 insertions, 16 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index 012dbc0613a..8b760f0c1fe 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -972,6 +972,12 @@
     githubId = 1118815;
     name = "Vikram Narayanan";
   };
+  armeenm = {
+    email = "mahdianarmeen@gmail.com";
+    github = "armeenm";
+    githubId = 29145250;
+    name = "Armeen Mahdian";
+  };
   armijnhemel = {
     email = "armijn@tjaldur.nl";
     github = "armijnhemel";
diff --git a/pkgs/development/libraries/libffi/3.3.nix b/pkgs/development/libraries/libffi/3.3.nix
new file mode 100644
index 00000000000..a1e2ff8c588
--- /dev/null
+++ b/pkgs/development/libraries/libffi/3.3.nix
@@ -0,0 +1,64 @@
+{ lib, stdenv, fetchurl, fetchpatch
+, autoreconfHook
+
+, doCheck ? true # test suite depends on dejagnu which cannot be used during bootstrapping
+, dejagnu
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libffi";
+  version = "3.3";
+
+  src = fetchurl {
+    url = "https://github.com/libffi/libffi/releases/download/v${version}/${pname}-${version}.tar.gz";
+    hash = "sha256-cvunkicD3fp6Ao1ROsFahcjVTI1n9V+lpIAohdxlIFY=";
+  };
+
+  patches = [];
+
+  outputs = [ "out" "dev" "man" "info" ];
+
+  configureFlags = [
+    "--with-gcc-arch=generic" # no detection of -march= or -mtune=
+    "--enable-pax_emutramp"
+
+    # Causes issues in downstream packages which misuse ffi_closure_alloc
+    # Reenable once these issues are fixed and merged:
+    # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6155
+    # https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/283
+    "--disable-exec-static-tramp"
+  ];
+
+  preCheck = ''
+    # The tests use -O0 which is not compatible with -D_FORTIFY_SOURCE.
+    NIX_HARDENING_ENABLE=''${NIX_HARDENING_ENABLE/fortify/}
+  '';
+
+  dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; # Don't run the native `strip' when cross-compiling.
+
+  inherit doCheck;
+
+  checkInputs = [ dejagnu ];
+
+  meta = with lib; {
+    description = "A foreign function call interface library";
+    longDescription = ''
+      The libffi library provides a portable, high level programming
+      interface to various calling conventions.  This allows a
+      programmer to call any function specified by a call interface
+      description at run-time.
+
+      FFI stands for Foreign Function Interface.  A foreign function
+      interface is the popular name for the interface that allows code
+      written in one language to call code written in another
+      language.  The libffi library really only provides the lowest,
+      machine dependent layer of a fully featured foreign function
+      interface.  A layer must exist above libffi that handles type
+      conversions for values passed between the two languages.
+    '';
+    homepage = "http://sourceware.org/libffi/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ armeenm ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/development/tools/analysis/hopper/default.nix b/pkgs/development/tools/analysis/hopper/default.nix
index b169877f5c1..d7b519b04c3 100644
--- a/pkgs/development/tools/analysis/hopper/default.nix
+++ b/pkgs/development/tools/analysis/hopper/default.nix
@@ -3,36 +3,35 @@
 , lib
 , autoPatchelfHook
 , wrapQtAppsHook
-, libbsd
-, python27
 , gmpxx
-, ncurses5
 , gnustep
-, libffi
+, libbsd
+, libffi_3_3
+, ncurses6
 }:
+
 stdenv.mkDerivation rec {
   pname = "hopper";
-  version = "4.5.29";
-  rev = "v${lib.versions.major version}";
+  version = "5.5.3";
+  rev = "v4";
 
   src = fetchurl {
-    url = "https://d2ap6ypl1xbe4k.cloudfront.net/Hopper-${rev}-${version}-Linux.pkg.tar.xz";
-    sha256 = "1v1pff5fiv41khvrnlpdks2vddjnvziyn14qqj6v26snyhwi86zh";
+    url = "https://d2ap6ypl1xbe4k.cloudfront.net/Hopper-${rev}-${version}-Linux-demo.pkg.tar.xz";
+    hash = "sha256-xq9ZVg1leHm/tq6LYyQLa8p5dDwBd64Jt92uMoE0z58=";
   };
 
   sourceRoot = ".";
 
   nativeBuildInputs = [
-    wrapQtAppsHook
     autoPatchelfHook
+    wrapQtAppsHook
   ];
 
   buildInputs = [
-    libbsd
-    python27
-    gmpxx
-    ncurses5
     gnustep.libobjc
+    libbsd
+    libffi_3_3
+    ncurses6
   ];
 
   installPhase = ''
@@ -54,9 +53,6 @@ stdenv.mkDerivation rec {
       $sourceRoot/opt/hopper-${rev}/lib/libpthread_workqueue.so* \
       $out/lib
 
-    # we already ship libffi.so.7
-    ln -s ${lib.getLib libffi}/lib/libffi.so $out/lib/libffi.so.6
-
     cp -r $sourceRoot/usr/share $out
 
     runHook postInstall
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index ebdcc6c3aa2..612f3dcd699 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -18598,6 +18598,7 @@ with pkgs;
   libffcall = callPackage ../development/libraries/libffcall { };
 
   libffi = callPackage ../development/libraries/libffi { };
+  libffi_3_3 = callPackage ../development/libraries/libffi/3.3.nix { };
   libffiBoot = libffi.override {
     doCheck = false;
   };