2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, libminc }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "ebtks";
|
2021-07-21 07:28:18 +00:00
|
|
|
version = "unstable-2017-09-23";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "BIC-MNI";
|
2024-01-25 14:12:00 +00:00
|
|
|
repo = "EBTKS";
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = "67e4e197d8a32d6462c9bdc7af44d64ebde4fb5c";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-+MIRE2NdRH7IQrstK3WRqft6l9I+UGD6j0G7Q6LhOKg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
# error: use of undeclared identifier 'finite'; did you mean 'isfinite'?
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace templates/EBTKS/SimpleArray.h \
|
|
|
|
--replace "#define FINITE(x) finite(x)" "#define FINITE(x) isfinite(x)"
|
2024-01-25 14:12:00 +00:00
|
|
|
''
|
|
|
|
# error: ISO C++17 does not allow 'register' storage class specifier
|
|
|
|
+ ''
|
|
|
|
find . -type f -exec sed -i -e 's/register //g' {} +
|
2022-11-21 17:40:18 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ libminc ];
|
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/cmake" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2024-01-25 14:12:00 +00:00
|
|
|
homepage = "https://github.com/BIC-MNI/EBTKS";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Library for working with MINC files";
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.free;
|
|
|
|
};
|
|
|
|
}
|