about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libffi
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libffi')
-rw-r--r--nixpkgs/pkgs/development/libraries/libffi/3.3.nix4
-rw-r--r--nixpkgs/pkgs/development/libraries/libffi/default.nix13
-rw-r--r--nixpkgs/pkgs/development/libraries/libffi/libffi-powerpc64.patch23
3 files changed, 12 insertions, 28 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libffi/3.3.nix b/nixpkgs/pkgs/development/libraries/libffi/3.3.nix
index a1e2ff8c5888..b6837c6523f7 100644
--- a/nixpkgs/pkgs/development/libraries/libffi/3.3.nix
+++ b/nixpkgs/pkgs/development/libraries/libffi/3.3.nix
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
 
   inherit doCheck;
 
-  checkInputs = [ dejagnu ];
+  nativeCheckInputs = [ dejagnu ];
 
   meta = with lib; {
     description = "A foreign function call interface library";
@@ -60,5 +60,7 @@ stdenv.mkDerivation rec {
     license = licenses.mit;
     maintainers = with maintainers; [ armeenm ];
     platforms = platforms.all;
+    # never built on aarch64-darwin since first introduction in nixpkgs
+    broken = stdenv.isDarwin && stdenv.isAarch64;
   };
 }
diff --git a/nixpkgs/pkgs/development/libraries/libffi/default.nix b/nixpkgs/pkgs/development/libraries/libffi/default.nix
index 4c3e00150abf..681f9cbfb229 100644
--- a/nixpkgs/pkgs/development/libraries/libffi/default.nix
+++ b/nixpkgs/pkgs/development/libraries/libffi/default.nix
@@ -5,15 +5,16 @@
   # dejagnu also requires tcl which can't be built statically at the moment
 , doCheck ? !(stdenv.hostPlatform.isStatic)
 , dejagnu
+, nix-update-script
 }:
 
 stdenv.mkDerivation rec {
   pname = "libffi";
-  version = "3.4.2";
+  version = "3.4.4";
 
   src = fetchurl {
     url = "https://github.com/libffi/libffi/releases/download/v${version}/${pname}-${version}.tar.gz";
-    sha256 = "081nx7wpzds168jbr59m34n6s3lyiq6r8zggvqxvlslsc4hvf3sl";
+    sha256 = "sha256-1mxWrSWags8qnfxAizK/XaUjcVALhHRff7i2RXEt9nY=";
   };
 
   # Note: this package is used for bootstrapping fetchurl, and thus
@@ -21,7 +22,6 @@ stdenv.mkDerivation rec {
   # cgit) that are needed here should be included directly in Nixpkgs as
   # files.
   patches = [
-    ./libffi-powerpc64.patch
   ];
 
   strictDeps = true;
@@ -44,6 +44,7 @@ stdenv.mkDerivation rec {
 
   preCheck = ''
     # The tests use -O0 which is not compatible with -D_FORTIFY_SOURCE.
+    NIX_HARDENING_ENABLE=''${NIX_HARDENING_ENABLE/fortify3/}
     NIX_HARDENING_ENABLE=''${NIX_HARDENING_ENABLE/fortify/}
   '';
 
@@ -51,7 +52,11 @@ stdenv.mkDerivation rec {
 
   inherit doCheck;
 
-  checkInputs = [ dejagnu ];
+  nativeCheckInputs = [ dejagnu ];
+
+  passthru = {
+    updateScript = nix-update-script { };
+  };
 
   meta = with lib; {
     description = "A foreign function call interface library";
diff --git a/nixpkgs/pkgs/development/libraries/libffi/libffi-powerpc64.patch b/nixpkgs/pkgs/development/libraries/libffi/libffi-powerpc64.patch
deleted file mode 100644
index 5748ac084982..000000000000
--- a/nixpkgs/pkgs/development/libraries/libffi/libffi-powerpc64.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-https://github.com/libffi/libffi/issues/668
---- a/src/powerpc/linux64.S
-+++ b/src/powerpc/linux64.S
-@@ -29,6 +29,8 @@
- #include <fficonfig.h>
- #include <ffi.h>
- 
-+	.machine altivec
-+
- #ifdef POWERPC64
- 	.hidden	ffi_call_LINUX64
- 	.globl	ffi_call_LINUX64
---- a/src/powerpc/linux64_closure.S
-+++ b/src/powerpc/linux64_closure.S
-@@ -30,6 +30,8 @@
- 
- 	.file	"linux64_closure.S"
- 
-+	.machine altivec
-+
- #ifdef POWERPC64
- 	FFI_HIDDEN (ffi_closure_LINUX64)
- 	.globl  ffi_closure_LINUX64