mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
crystfel: 0.11.0 -> 0.11.1 (#348763)
This commit is contained in:
commit
2e76e61c3c
@ -187,10 +187,10 @@ let
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "crystfel";
|
||||
version = "0.11.0";
|
||||
version = "0.11.1";
|
||||
src = fetchurl {
|
||||
url = "https://www.desy.de/~twhite/crystfel/crystfel-${version}.tar.gz";
|
||||
sha256 = "sha256-ogNHWYfbxRmB5TdK8K0JpcCnYOOyXapQGSPh8mfp+Tc=";
|
||||
sha256 = "sha256-vZuN9dYnowySC/OX0EZB0mbhoBOyRiOWfX9d6sl1lKQ=";
|
||||
};
|
||||
nativeBuildInputs = [ meson pkg-config ninja flex bison doxygen opencl-headers makeWrapper ]
|
||||
++ lib.optionals withGui [ wrapGAppsHook3 ];
|
||||
@ -220,9 +220,6 @@ stdenv.mkDerivation rec {
|
||||
# on darwin at least, we need to link to a separate argp library;
|
||||
# this patch adds a test for this and the necessary linker options
|
||||
./link-to-argp-standalone-if-needed.patch
|
||||
# hotfix for an issue that occurs (at least) on NixOS:
|
||||
# if the temporary path is too long, we get a segfault
|
||||
./gui-path-issue.patch
|
||||
];
|
||||
|
||||
# CrystFEL calls mosflm by searching PATH for it. We could've create a wrapper script that sets the PATH, but
|
||||
|
@ -1,27 +0,0 @@
|
||||
diff --git a/src/gui_index.c b/src/gui_index.c
|
||||
index 2cc8e8db..13be77d5 100644
|
||||
--- a/src/gui_index.c
|
||||
+++ b/src/gui_index.c
|
||||
@@ -540,6 +540,7 @@ static void delete_gui_tempdir(char *tmpdir)
|
||||
{
|
||||
char *path;
|
||||
int i;
|
||||
+ size_t pathlen;
|
||||
|
||||
/* List of files which it's safe to delete */
|
||||
char *files[] = {"gmon.out", "mosflm.lp", "SUMMARY", "XDS.INP",
|
||||
@@ -552,11 +553,12 @@ static void delete_gui_tempdir(char *tmpdir)
|
||||
|
||||
if ( tmpdir == NULL ) return;
|
||||
|
||||
- path = calloc(strlen(tmpdir)+64, 1);
|
||||
+ pathlen = strlen(tmpdir)+64;
|
||||
+ path = calloc(pathlen, 1);
|
||||
if ( path == NULL ) return;
|
||||
|
||||
for ( i=0; i<n_files; i++ ) {
|
||||
- snprintf(path, 127, "%s/%s", tmpdir, files[i]);
|
||||
+ snprintf(path, pathlen, "%s/%s", tmpdir, files[i]);
|
||||
unlink(path);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user