Skip to content

Commit

Permalink
crystfel: 0.10.1 → 0.10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
pmiddend committed Feb 27, 2023
1 parent f03c72d commit fca0501
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
16 changes: 10 additions & 6 deletions pkgs/applications/science/physics/crystfel/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
, stdenv
, fetchurl
, fetchFromGitHub
, fetchpatch
, cmake
, lz4
, bzip2
, gfortran
, m4
, hdf5
, gsl
, slurm
, unzip
, makeWrapper
, meson
Expand Down Expand Up @@ -161,10 +161,10 @@ let
in
stdenv.mkDerivation rec {
pname = "crystfel";
version = "0.10.1";
version = "0.10.2";
src = fetchurl {
url = "https://www.desy.de/~twhite/${pname}/${pname}-${version}.tar.gz";
sha256 = "0i9d5ggalic7alj97dxjdys7010kxhm2cb4lwakvigl023j8ms79";
sha256 = "sha256-nCO9ndDKS54bVN9IhFBiCVNzqk7BsCljXFrOmlx+sP4=";
};
nativeBuildInputs = [ meson pkg-config ninja flex bison doxygen opencl-headers makeWrapper ]
++ lib.optionals withGui [ wrapGAppsHook ];
Expand All @@ -186,12 +186,16 @@ stdenv.mkDerivation rec {
argp-standalone
memorymappingHook
]
# slurm is not available for Darwin; when it is, remove the condition
++ lib.optionals (!stdenv.isDarwin) [ slurm ]
# hdf5-external-filter-plugins doesn't link on Darwin
++ lib.optionals (withBitshuffle && !stdenv.isDarwin) [ hdf5-external-filter-plugins ];

patches = [ ./link-to-argp-standalone-if-needed.patch ];
patches = [
./link-to-argp-standalone-if-needed.patch
(fetchpatch {
url = "https://gitlab.desy.de/thomas.white/crystfel/-/commit/3c54d59e1c13aaae716845fed2585770c3ca9d14.diff";
hash = "sha256-oaJNBQQn0c+z4p1pnW4osRJA2KdKiz4hWu7uzoKY7wc=";
})
];

# CrystFEL calls mosflm by searching PATH for it. We could've create a wrapper script that sets the PATH, but
# we'd have to do that for every CrystFEL executable (indexamajig, crystfel, partialator). Better to just
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
diff --git a/meson.build b/meson.build
index efc9002b..070f37e4 100644
index 59bbcfb7..dd75d4e2 100644
--- a/meson.build
+++ b/meson.build
@@ -34,6 +34,12 @@ if slurmdep.found()
conf_data.set10('HAVE_SLURM', 1)
@@ -80,6 +80,12 @@ if cc.has_function('clock_gettime', prefix: '#include <time.h>')
conf_data.set10('HAVE_CLOCK_GETTIME', true)
endif

+if build_machine.system() == 'darwin' or build_machine.system() == 'freebsd' or not cc.links('#include <argp.h>\nstatic error_t parse_opt (int key, char *arg, struct argp_state *state) { argp_usage(state); return 0; }; void main() {}')
Expand All @@ -12,15 +12,15 @@ index efc9002b..070f37e4 100644
+ argpdep = dependency('', required : false)
+endif
+
# Find HDF5 using inbuilt Meson methods. Requires Meson >= 0.50.0
hdf5dep = dependency('hdf5', language: 'c', required: true)
# ************************ libcrystfel (subdir) ************************

@@ -180,7 +186,7 @@ if zmqdep.found()
endif
subdir('libcrystfel')
@@ -180,7 +186,7 @@ endif

executable('indexamajig', indexamajig_sources,
- dependencies: [mdep, libcrystfeldep, gsldep, pthreaddep, zmqdep],
+ dependencies: [mdep, libcrystfeldep, gsldep, pthreaddep, zmqdep, argpdep],
install: true,
install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib')
indexamajig = executable('indexamajig', indexamajig_sources,
dependencies: [mdep, libcrystfeldep, gsldep,
- pthreaddep, zmqdep, asapodep],
+ pthreaddep, zmqdep, asapodep, argpdep],
install: true,
install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib')

0 comments on commit fca0501

Please sign in to comment.