From b67d9209498c0c5239be0f70fa20e18323b1dd41 Mon Sep 17 00:00:00 2001 From: Philipp Middendorf Date: Wed, 1 Mar 2023 11:06:22 +0100 Subject: [PATCH] crystfel: fix for aarch64-linux --- .../science/physics/crystfel/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/physics/crystfel/default.nix b/pkgs/applications/science/physics/crystfel/default.nix index 0a981f0adf4e0ea..5b5f38ce41682d3 100644 --- a/pkgs/applications/science/physics/crystfel/default.nix +++ b/pkgs/applications/science/physics/crystfel/default.nix @@ -1,5 +1,6 @@ { lib , stdenv +, gccStdenv , fetchurl , fetchFromGitHub , fetchpatch @@ -36,7 +37,7 @@ }: let - libccp4 = stdenv.mkDerivation rec { + libccp4 = gccStdenv.mkDerivation rec { pname = "libccp4"; version = "6.5.1"; src = fetchurl { @@ -48,8 +49,16 @@ let nativeBuildInputs = [ gfortran m4 ]; buildInputs = [ hdf5 gsl ]; + # see https://github.com/NixOS/nixpkgs/issues/140041 + hardeningDisable = [ "all" ]; + configureFlags = [ "FFLAGS=-fallow-argument-mismatch" ]; + configurePhase = '' + ./configure + cat config.log + ''; + # libccp4 tries to read syminfo.lib by looking at an environment variable, which hinders reproducibility. # We hard-code this by providing a little patch and then passing the absolute path to syminfo.lib as a # preprocessor flag. @@ -224,7 +233,7 @@ stdenv.mkDerivation rec { downloadPage = "https://www.desy.de/~twhite/crystfel/download.html"; license = licenses.gpl3Plus; maintainers = with maintainers; [ pmiddend ]; - platforms = [ "x86_64-linux" "x86_64-darwin" ]; + platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" ]; }; }